코드 정리, 세션 없어서 전송받은 srl참고 할 때 권한 확인

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6540 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
misol 2009-06-14 11:17:19 +00:00
parent 1a6c988db1
commit 4ac4a8cd21
4 changed files with 268 additions and 241 deletions

View file

@ -312,8 +312,8 @@
function getSummary($str_size = 50, $tail = '...') {
$content = $this->getContent(false,false);
// 줄바꿈이 있을 때, 공백문자 삽입
$content = preg_replace('!(<br[\s]*/{0,1}>[\s]*)+!is', ' ', $content);
// 줄바꿈이 있을 때, 공백문자 삽입
$content = preg_replace('!(<br[\s]*/{0,1}>[\s]*)+!is', ' ', $content);
// </p>, </div>, </li> 등의 태그를 공백 문자로 치환
$content = str_replace(array('</p>', '</div>', '</li>'), ' ', $content);
@ -324,8 +324,8 @@
// < , > , " 를 치환
$content = str_replace(array('&lt;','&gt;','&quot;','&nbsp;'), array('<','>','"',' '), $content);
// 연속된 공백문자 삭제
$content = preg_replace('/ ( +)/is', ' ', $content);
// 연속된 공백문자 삭제
$content = preg_replace('/ ( +)/is', ' ', $content);
// 문자열을 자름
$content = trim(cut_str($content, $str_size, $tail));
@ -560,7 +560,7 @@
$cnt = count($matches);
for($i=0;$i<$cnt;$i++) {
$target_src = trim($matches[$i][2]);
if(!preg_match("/\.(jpg|png|jpeg|gif|bmp)$/i",$target_src)) continue;
if(!preg_match("/\.(jpg|png|jpeg|gif|bmp)$/i",$target_src)) continue;
if(preg_match('/\/(common|modules|widgets|addons|layouts)\//i', $target_src)) continue;
else {
if(!preg_match('/^(http|https):\/\//i',$target_src)) $target_src = Context::getRequestUri().$target_src;