ereg를 모두 preg로 변경

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3528 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-01-15 09:07:59 +00:00
parent 3a6cb4f7f2
commit 502b5a7a88
32 changed files with 75 additions and 75 deletions

View file

@ -388,7 +388,7 @@
if (is_dir($path."/".$entry)) {
$this->deleteThumbnailFile($path."/".$entry);
} else {
if(!eregi('^thumbnail_([^\.]*)\.jpg$',$entry)) continue;
if(!preg_match('/^thumbnail_([^\.]*)\.jpg$/i',$entry)) continue;
@unlink($path.'/'.$entry);
}
}

View file

@ -90,7 +90,7 @@
if($obj->allow_comment!='Y') $obj->allow_comment = 'N';
if($obj->lock_comment!='Y') $obj->lock_comment = 'N';
if($obj->allow_trackback!='Y') $obj->allow_trackback = 'N';
if($obj->homepage && !eregi('^http:\/\/',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage;
if($obj->homepage && !preg_match('/^http:\/\//i',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage;
if($obj->notify_message != 'Y') $obj->notify_message = 'N';
// $extra_vars를 serialize
@ -182,7 +182,7 @@
if($obj->allow_comment!='Y') $obj->allow_comment = 'N';
if($obj->lock_comment!='Y') $obj->lock_comment = 'N';
if($obj->allow_trackback!='Y') $obj->allow_trackback = 'N';
if($obj->homepage && !eregi('^http:\/\/',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage;
if($obj->homepage && !preg_match('/^http:\/\//i',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage;
if($obj->notify_message != 'Y') $obj->notify_message = 'N';
// $extra_vars를 serialize

View file

@ -180,7 +180,7 @@
$url = trim($this->get('homepage'));
if(!$url) return;
if(!eregi("^http:\/\/",$url)) $url = "http://".$url;
if(!preg_match("/^http:\/\//i",$url)) $url = "http://".$url;
return $url;
}
@ -441,7 +441,7 @@
if(count($file_list)) {
foreach($file_list as $file) {
if($file->direct_download!='Y') continue;
if(!eregi("(jpg|png|jpeg|gif)$",$file->source_filename)) continue;
if(!preg_match("/(jpg|png|jpeg|gif)$/i",$file->source_filename)) continue;
$filename = $file->uploaded_filename;
if(!file_exists($filename)) continue;
@ -458,7 +458,7 @@
preg_match_all("!http:\/\/([^ ^\"^']*?)\.(jpg|png|gif|jpeg)!is", $content, $matches, PREG_SET_ORDER);
for($i=0;$i<count($matches);$i++) {
$src = $matches[$i][0];
if(ereg('\/(common|modules|widgets|addons|layouts)\/', $src)) continue;
if(preg_match('/\/(common|modules|widgets|addons|layouts)\//i', $src)) continue;
else {
$target_src = $src;
break;