mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
stripos 함수대신에 preg_match를 사용하도록 코드 변경 (stripos는 php5용)
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3532 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
366f9dae99
commit
28d9bd25b1
2 changed files with 5 additions and 5 deletions
|
|
@ -80,7 +80,7 @@
|
|||
list($lang_prefix, $lang_text) = explode(',',$val);
|
||||
$lang_text = trim($lang_text);
|
||||
$lang_supported[$lang_prefix] = $lang_text;
|
||||
if(!$this->lang_type && stripos($_SERVER['HTTP_ACCEPT_LANGUAGE'],$lang_prefix)!==false) {
|
||||
if(!$this->lang_type && preg_match('/'.$lang_prefix.'/i',$_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||
$this->lang_type = $lang_prefix;
|
||||
setcookie('lang_type', $this->lang_type, time()+60*60*24*365, '/');
|
||||
}
|
||||
|
|
@ -504,7 +504,7 @@
|
|||
**/
|
||||
function _setUploadedArgument() {
|
||||
if($this->_getRequestMethod() != 'POST') return;
|
||||
if(stripos($_SERVER['CONTENT_TYPE'],"multipart/form-data")===false) return;
|
||||
if(!preg_match("/multipart\/form-data/i",$_SERVER['CONTENT_TYPE'])) return;
|
||||
if(!$_FILES) return;
|
||||
|
||||
foreach($_FILES as $key => $val) {
|
||||
|
|
@ -714,7 +714,7 @@
|
|||
function _addJsFile($file) {
|
||||
if(in_array($file, $this->js_files)) return;
|
||||
|
||||
if(stripos($file,'http://')===false) $file = str_replace(realpath("."), ".", realpath($file));
|
||||
if(!preg_match('/^http:\/\//i',$file)) $file = str_replace(realpath("."), ".", realpath($file));
|
||||
$this->js_files[] = $file;
|
||||
}
|
||||
|
||||
|
|
@ -749,7 +749,7 @@
|
|||
function _addCSSFile($file) {
|
||||
if(in_array($file, $this->css_files)) return;
|
||||
|
||||
if(stripos($file,'http://')===false) $file = str_replace(realpath("."), ".", realpath($file));
|
||||
if(preg_match('/^http:\/\//i',$file)) $file = str_replace(realpath("."), ".", realpath($file));
|
||||
$this->css_files[] = $file;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@
|
|||
for($i=0;$i<count($supported_list);$i++) {
|
||||
$db_type = $supported_list[$i];
|
||||
|
||||
if(version_compare(phpversion(), '5.0') < 0 && stripos($db_type, 'pdo') !== false) continue;
|
||||
if(version_compare(phpversion(), '5.0') < 0 && preg_match('/pdo/i',$db_type) !== false) continue;
|
||||
|
||||
$class_name = sprintf("DB%s%s", strtoupper(substr($db_type,0,1)), strtolower(substr($db_type,1)));
|
||||
$class_file = sprintf("./classes/db/%s.class.php", $class_name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue