diff --git a/includes/phplayers/layersmenu-common.inc.php b/includes/phplayers/layersmenu-common.inc.php index 04f7aa3e..78e4ee56 100644 --- a/includes/phplayers/layersmenu-common.inc.php +++ b/includes/phplayers/layersmenu-common.inc.php @@ -484,7 +484,7 @@ function setMenuStructureFile($tree_file) */ function setMenuStructureString($tree_string) { - $this->menuStructure = ereg_replace(chr(13), '', $tree_string); // Microsoft Stupidity Suppression + $this->menuStructure = preg_replace("/".chr(13)."/", '', $tree_string); // Microsoft Stupidity Suppression if ($this->menuStructure == '') { $this->error('setMenuStructureString: empty string.'); return false; @@ -790,7 +790,7 @@ function _postParse( for ($cnt=$this->_firstItem[$menu_name]; $cnt<=$this->_lastItem[$menu_name]; $cnt++) { // this counter scans all nodes of the new menu $this->tree[$cnt]['child_of_root_node'] = ($this->tree[$cnt]['level'] == 1); $this->tree[$cnt]['parsed_text'] = stripslashes($this->tree[$cnt]['text']); - $this->tree[$cnt]['parsed_href'] = (ereg_replace(' ', '', $this->tree[$cnt]['href']) == '') ? '#' : $this->prependedUrl . $this->tree[$cnt]['href']; + $this->tree[$cnt]['parsed_href'] = (preg_replace('/ /', '', $this->tree[$cnt]['href']) == '') ? '#' : $this->prependedUrl . $this->tree[$cnt]['href']; $this->tree[$cnt]['parsed_title'] = ($this->tree[$cnt]['title'] == '') ? '' : ' title="' . stripslashes($this->tree[$cnt]['title']) . '"'; $fooimg = $this->icondir . $this->tree[$cnt]['icon']; if ($this->tree[$cnt]['icon'] != '' && (substr($this->tree[$cnt]['icon'], 0, 7) == 'http://' || substr($this->tree[$cnt]['icon'], 0, 8) == 'https://')) { diff --git a/modules/core/auth_generate_admin_menu.inc.php b/modules/core/auth_generate_admin_menu.inc.php index 767e765b..fcd26686 100644 --- a/modules/core/auth_generate_admin_menu.inc.php +++ b/modules/core/auth_generate_admin_menu.inc.php @@ -47,7 +47,7 @@ function auth_generate_admin_menu($menu_obj) if(empty($meth_arr[2])) $page = $module.':'.$method; else - $page = eregi_replace('%%', $module, $meth_arr[2]); + $page = preg_replace('/%%/', $module, $meth_arr[2]); $module_arr[$i]["methods"][] = Array('name' => $method_name, 'page' => $page); @@ -71,7 +71,7 @@ function auth_generate_admin_menu($menu_obj) if(empty($meth_arr[2])) $page = $module.':'.$method; else - $page = eregi_replace('%%', $module, $meth_arr[2]); + $page = preg_replace('/%%/', $module, $meth_arr[2]); $module_arr[$i]["sub_methods"][$ii][] = Array('name' => $method_name, 'page' => $page); } } diff --git a/modules/core/database.inc.php b/modules/core/database.inc.php index 1cde55df..7bd5b9e4 100644 --- a/modules/core/database.inc.php +++ b/modules/core/database.inc.php @@ -159,7 +159,7 @@ function sqlConditions( &$db, $Conditions=false, $Tables=false ) $where = " WHERE "; if($Conditions) { - if(ereg('::', $Conditions) ) { + if(preg_match('/::/', $Conditions) ) { $s = explode('::', $Conditions); $ii=1; $Conditions = ''; diff --git a/modules/core/method.inc.php b/modules/core/method.inc.php index b40f6a2a..93e02d54 100644 --- a/modules/core/method.inc.php +++ b/modules/core/method.inc.php @@ -29,7 +29,7 @@ class CORE_method { if(!empty($VAR['do'][$i])) { - if(ereg(":", $VAR['do'][$i])) + if(preg_match("/:/", $VAR['do'][$i])) { $identifier = explode(':',$VAR['do'][$i]); $module = $identifier[0]; diff --git a/modules/core/theme.inc.php b/modules/core/theme.inc.php index 6124e4e9..69e46cd5 100644 --- a/modules/core/theme.inc.php +++ b/modules/core/theme.inc.php @@ -77,7 +77,7 @@ class CORE_theme $i++; } } - $url = ereg_replace('tid=default_admin', '', $url); + $url = preg_replace('/tid=default_admin/', '', $url); $smarty->assign('mainFrameUrl', $url); $this_template = 'file:'.PATH_THEMES.''.THEME_NAME.'/template.tpl'; $smarty->display($this_template); diff --git a/modules/db_mapping/db_mapping.inc.php b/modules/db_mapping/db_mapping.inc.php index 09b86e2d..b37588f0 100644 --- a/modules/db_mapping/db_mapping.inc.php +++ b/modules/db_mapping/db_mapping.inc.php @@ -356,7 +356,7 @@ class db_mapping $this->construct(); $type = "view"; - $this->method["$type"] = split(",", $this->method["$type"]); + $this->method["$type"] = explode(",", $this->method["$type"]); $db = new CORE_database; $db->view($VAR, $this, $type); @@ -624,7 +624,7 @@ class db_mapping { if($file_name != '..' && $file_name != '.') { - $result[$count]['name'] = eregi_replace('.php', '', $file_name); + $result[$count]['name'] = preg_replace('/.php/', '', $file_name); $result[$count]['id'] = $count; ### Get the status of this plugin: