Index: trunk/kernel/include/modules.php =================================================================== diff -u -r310 -r315 --- trunk/kernel/include/modules.php (.../modules.php) (revision 310) +++ trunk/kernel/include/modules.php (.../modules.php) (revision 315) @@ -5,6 +5,9 @@ setcookie("CookiesTest", "1"); +// if branches that uses if($mod_prefix) or like that will never be executed +// due global variable $mod_prefix is never defined + $ExtraVars = array(); function ParseEnv() @@ -169,7 +172,7 @@ } else { - $t = $var_list["t"]; + $t = isset($var_list['t']) ? $var_list['t'] : ''; if(!is_numeric($t)) { if(!is_object($theme)) @@ -521,18 +524,14 @@ global $i_Keys, $objConfig, $pathtoroot; $vars = parse_portal_ini($pathtoroot."config.php"); + // globalize vars from config while($key = key($vars)) { - $key = "g_".$key; - global $$key; - $$key = current($vars); //variable variables - if(strlen($$key)>80) - { - $lic = base64_decode($$key); - } + $GLOBALS["g_".$key] = current($vars); next($vars); } - //$lic = base64_decode($g_License); + $lic = base64_decode($GLOBALS['g_License']); // this works in all cases + _ParseLicense($lic); $modules = array(); if(!_IsLocalSite(_GetDomain())) @@ -839,7 +838,7 @@ } } -if(is_numeric($var_list["t"])) +if( isset($var_list['t']) && is_numeric($var_list['t'])) { if( !isset($CurrentTheme) ) $CurrentTheme = null; if(!is_object($CurrentTheme)) @@ -857,7 +856,7 @@ LogEntry("Loading Module action scripts\n"); ## Global Referer Template -$_local_t = $var_list["t"]; +$_local_t = isset($var_list['t']) ? $var_list['t'] : ''; if(is_array($mod_prefix)) { @@ -870,6 +869,7 @@ if( !strlen($admin) ) $admin = "admin"; $adminURL = $rootURL.$admin; $imagesURL = $adminURL."/images"; + if(_ModuleLicensed($modules_loaded[$key])) { $mod = $pathtoroot.$folder_name."module_init.php"; @@ -880,7 +880,9 @@ $mod = $pathtoroot.$folder_name."searchaction.php"; if( file_exists($mod) ) require_once($mod); + } + } if($FrontEnd==1 || $FrontEnd==2) {