More deprecated php methods

This commit is contained in:
Tony Landis 2009-03-25 22:30:13 -06:00
parent c2dfaaf4e0
commit 3b81e69651
6 changed files with 9 additions and 9 deletions

View File

@ -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://')) {

View File

@ -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);
}
}

View File

@ -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 = '';

View File

@ -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];

View File

@ -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);

View File

@ -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: