Index: branches/5.2.x/core/units/admin/admin_tag_processor.php =================================================================== diff -u -N -r14092 -r14095 --- branches/5.2.x/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 14092) +++ branches/5.2.x/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 14095) @@ -1,6 +1,6 @@ SelectParam($params, 'name,const'); - safeDefine($name, $params['value']); - } - /** * Allows to execute js script after the page is fully loaded * @@ -49,7 +43,7 @@ return $params['default']; } - return $this->Application->Phrase( replaceModuleSection($params['phrase']) ); + return $this->Application->Phrase( kUtil::replaceModuleSection($params['phrase']) ); } /** @@ -60,7 +54,7 @@ */ function GetSectionIcon($params) { - return replaceModuleSection($params['icon']); + return kUtil::replaceModuleSection($params['icon']); } /** @@ -98,7 +92,7 @@ $template = $section_data['url']['t']; unset($section_data['url']['t']); $section_data['section_url'] = $this->Application->HREF($template, '', $section_data['url']); - $ret .= $this->Application->ParseBlock( array_merge_recursive2($params, $section_data) ); + $ret .= $this->Application->ParseBlock( array_merge($params, $section_data) ); if (!isset($section_data['children'])) { return $ret; } @@ -131,7 +125,7 @@ $section_data =& $sections_helper->getSectionData($section); if (!$section_data) { - trigger_error('Use of undefined section "' . $section . '" in "' . __METHOD__ . '"', E_USER_ERROR); + throw new Exception('Use of undefined section "' . $section . '" in "' . __METHOD__ . '"'); return ''; } @@ -209,7 +203,7 @@ unset($section_data['url']['t']); $section_data['section_url'] = $this->Application->HREF($template, '', $section_data['url']); - $ret = $this->Application->ParseBlock( array_merge_recursive2($params, $section_data) ); + $ret = $this->Application->ParseBlock( array_merge($params, $section_data) ); return $ret; } @@ -302,7 +296,7 @@ // restore template $section_data['url']['t'] = $template; - $ret .= $this->Application->ParseBlock( array_merge_recursive2($params, $section_data) ); + $ret .= $this->Application->ParseBlock( array_merge($params, $section_data) ); $params['section_name'] = $section_name; } @@ -315,7 +309,7 @@ $sections_helper =& $this->Application->recallObject('SectionsHelper'); $section_data =& $sections_helper->getSectionData($section_name); - $block_params = array_merge_recursive2($section_data, Array('name' => $params['render_as'], 'section_name' => $section_name)); + $block_params = array_merge($section_data, Array('name' => $params['render_as'], 'section_name' => $section_name)); $ret = ''; foreach ($section_data['permissions'] as $perm_name) { @@ -329,7 +323,7 @@ function ModuleInclude($params) { foreach ($params as $param_name => $param_value) { - $params[$param_name] = replaceModuleSection($param_value); + $params[$param_name] = kUtil::replaceModuleSection($param_value); } $m =& $this->Application->recallObject('m_TagProcessor'); @@ -487,11 +481,11 @@ if ($pass_through) { // add pass_through to selector url if any $params['pass_through'] = implode(',', array_keys($pass_through)); - $params = array_merge_recursive2($params, $pass_through); + $params = array_merge($params, $pass_through); } // user can override default parameters (except pass_through of course) - $params = array_merge_recursive2($default_params, $params); + $params = array_merge($default_params, $params); $main_processor =& $this->Application->recallObject('m_TagProcessor'); return $main_processor->T($params); @@ -575,7 +569,7 @@ $this->Application->RemoveVar('PermCache_UpdateRequired'); if ($this->Application->ConfigValue('QuickCategoryPermissionRebuild')) { - $updater =& $this->Application->recallObject('kPermCacheUpdater'); + $updater =& $this->Application->makeClass('kPermCacheUpdater'); /* @var $updater kPermCacheUpdater */ $updater->OneStepRun(); @@ -724,12 +718,14 @@ * * @param Array $params * @return bool + * @todo Could be a duplicate of kMainTagProcessor::ConstOn */ function ConstOn($params) { $constant_name = $this->SelectParam($params, 'name,const'); $debug_mode = isset($params['debug_mode']) && $params['debug_mode'] ? $this->Application->isDebugMode() : true; - return $debug_mode && constOn($constant_name); + + return $debug_mode && kUtil::constOn($constant_name); } /** @@ -778,7 +774,7 @@ return $persistent ? false : $this->MainFrameLink($params); } - $vars = array_merge_recursive2($vars, $params); + $vars = array_merge($vars, $params); $t = $vars['t']; unset($vars['t'], $vars['persistent']); @@ -1076,7 +1072,7 @@ $super_admin_ips = defined('SA_IP') ? SA_IP : false; $auth_bypass_ips = $this->Application->ConfigValue('HTTPAuthBypassIPs'); - if (($auth_bypass_ips && ipMatch($auth_bypass_ips)) || ($super_admin_ips && ipMatch($super_admin_ips))) { + if (($auth_bypass_ips && kUtil::ipMatch($auth_bypass_ips)) || ($super_admin_ips && kUtil::ipMatch($super_admin_ips))) { // user ip is in ip bypass list return true; }