diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index 6e4be92d1..81dbc1c4c 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -854,7 +854,7 @@ class e107 } if(class_exists($class_name, false)) { - e107::setRegistry($id, new $class_name($vars)); + self::setRegistry($id, new $class_name($vars)); } return self::getRegistry($id); @@ -936,8 +936,8 @@ class e107 if($name == 'core') // prevent loop between pref and cache handlers. { - e107::getCache()->UserCacheActive = self::getPref('cachestatus'); - e107::getCache()->SystemCacheActive = self::getPref('syscachestatus'); + self::getCache()->UserCacheActive = self::getPref('cachestatus'); + self::getCache()->SystemCacheActive = self::getPref('syscachestatus'); } } @@ -1131,8 +1131,8 @@ class e107 */ public static function setThemePref($pref_name, $pref_value = null) { - if(is_array($pref_name)) return e107::getConfig()->set('sitetheme_pref', $pref_name); - return e107::getConfig()->updatePref('sitetheme_pref/'.$pref_name, $pref_value, false); + if(is_array($pref_name)) return self::getConfig()->set('sitetheme_pref', $pref_name); + return self::getConfig()->updatePref('sitetheme_pref/'.$pref_name, $pref_value, false); } @@ -1558,8 +1558,8 @@ class e107 if(null === $config) { $config = array( - 'base_url' => e107::getUrl()->create('system/xup/endpoint', array(), array('full' => true)), - 'providers' => e107::getPref('social_login', array()), + 'base_url' => self::getUrl()->create('system/xup/endpoint', array(), array('full' => true)), + 'providers' => self::getPref('social_login', array()), 'debug_mode' => false, 'debug_file' => '' ); @@ -1851,7 +1851,7 @@ class e107 */ public static function library($action = '', $library = null, $variant = null) { - $libraryHandler = e107::getLibrary(); + $libraryHandler = self::getLibrary(); switch($action) { @@ -1860,7 +1860,7 @@ class e107 break; case 'load': - $cdn = (bool) e107::getPref('e_jslib_cdn', true); + $cdn = (bool) self::getPref('e_jslib_cdn', true); $debug = (bool) deftrue('e_DEBUG'); // Try to detect and load CDN version. @@ -1959,7 +1959,7 @@ class e107 return null; } - $jshandler = e107::getJs(); + $jshandler = self::getJs(); $jshandler->setDependency($dep); switch ($type) @@ -2057,7 +2057,7 @@ class e107 return null; } - $jshandler = e107::getJs(); + $jshandler = self::getJs(); $jshandler->setDependency($dep); switch ($type) @@ -2171,7 +2171,7 @@ class e107 } - e107::js('footer-inline', $text); + self::js('footer-inline', $text); } @@ -2209,15 +2209,15 @@ class e107 { if($name == 'description') { - e107::getUrl()->response()->addMetaDescription($content); //Cam: TBD + self::getUrl()->response()->addMetaDescription($content); //Cam: TBD } if($name == 'keywords') { - e107::getUrl()->response()->addMetaKeywords($content); //Cam: TBD + self::getUrl()->response()->addMetaKeywords($content); //Cam: TBD } - return e107::getUrl()->response()->addMeta($name, $content, $extended); + return self::getUrl()->response()->addMeta($name, $content, $extended); } /** @@ -2287,7 +2287,7 @@ class e107 { $new_addon = array(); - $sql = e107::getDb(); // Might be used by older plugins. + $sql = self::getDb(); // Might be used by older plugins. $filename = $addonName; // e.g. 'e_cron'; if(!$className) @@ -2331,7 +2331,7 @@ class e107 */ public static function callMethod($class_name, $method_name, $param=null, $param2=null) { - $mes = e107::getMessage(); + $mes = self::getMessage(); if(is_object($class_name) || class_exists($class_name)) { @@ -2382,7 +2382,7 @@ class e107 switch($for ) { case 'admin': - $for = e107::getPref('admintheme'); + $for = self::getPref('admintheme'); break; case 'front': @@ -2393,7 +2393,7 @@ class e107 } else { - $for = isset($user_pref['sitetheme']) ? $user_pref['sitetheme'] : e107::getPref('sitetheme'); + $for = isset($user_pref['sitetheme']) ? $user_pref['sitetheme'] : self::getPref('sitetheme'); } break; @@ -2574,7 +2574,7 @@ class e107 if(ADMIN && E107_DBG_INCLUDES) { - e107::getMessage()->addDebug( "Attempting to load Template File: ".$path ); + self::getMessage()->addDebug( "Attempting to load Template File: ".$path ); } $id = str_replace('/', '_', $id); @@ -2786,7 +2786,7 @@ class e107 { if(E107_DBG_BBSC) { - e107::getMessage()->addDebug("Found wrapper: ".$SC_WRAPPER); + self::getMessage()->addDebug("Found wrapper: ".$SC_WRAPPER); } self::scStyle($SC_WRAPPER); } @@ -2796,7 +2796,7 @@ class e107 { if(E107_DBG_BBSC) { - e107::getMessage()->addDebug("Found ID wrapper: ".$wrapper); + self::getMessage()->addDebug("Found ID wrapper: ".$wrapper); } self::setRegistry($wrapperRegPath, $$wrapper); } @@ -2865,7 +2865,7 @@ class e107 * e107::coreLan('comment'); * * // import defeinitions from /e107_languages/[CurrentLanguage]/admin/lan_banlist.php - * e107::coreLan('banlist', true); + * self::coreLan('banlist', true); * * * @param string $fname filename without the extension part (e.g. 'comment') @@ -2875,12 +2875,12 @@ class e107 public static function coreLan($fname, $admin = false) { $cstring = 'corelan/'.e_LANGUAGE.'_'.$fname.($admin ? '_admin' : '_front'); - if(e107::getRegistry($cstring)) return; + if(self::getRegistry($cstring)) return; $fname = ($admin ? 'admin/' : '').'lan_'.preg_replace('/[^\w]/', '', trim($fname, '/')).'.php'; $path = e_LANGUAGEDIR.e_LANGUAGE.'/'.$fname; - e107::setRegistry($cstring, true); + self::setRegistry($cstring, true); self::includeLan($path, false); } @@ -2915,7 +2915,7 @@ class e107 public static function plugLan($plugin, $fname = '', $flat = false) { $cstring = 'pluglan/'.e_LANGUAGE.'_'.$plugin.'_'.$fname.($flat ? '_1' : '_0'); - if(e107::getRegistry($cstring)) return; + if(self::getRegistry($cstring)) return; $plugin = preg_replace('/[^\w]/', '', $plugin); @@ -2946,11 +2946,11 @@ class e107 if(deftrue('E107_DBG_INCLUDES')) { - e107::getMessage()->addDebug("Attempting to Load: ".$path); + self::getMessage()->addDebug("Attempting to Load: ".$path); } - e107::setRegistry($cstring, true); + self::setRegistry($cstring, true); self::includeLan($path, false); } @@ -2987,7 +2987,7 @@ class e107 else $theme = e_THEME.preg_replace('#[^\w/]#', '', $theme).'/languages/'; $cstring = 'themelan/'.$theme.$fname.($flat ? '_1' : '_0'); - if(e107::getRegistry($cstring)) return; + if(self::getRegistry($cstring)) return; if($fname) $fname = e_LANGUAGE.($flat ? '_' : '/').preg_replace('#[^\w/]#', '', trim($fname, '/')); else $fname = e_LANGUAGE; @@ -2996,10 +2996,10 @@ class e107 if(E107_DBG_INCLUDES) { - e107::getMessage()->addDebug("Attempting to Load: ".$path); + self::getMessage()->addDebug("Attempting to Load: ".$path); } - e107::setRegistry($cstring, true); + self::setRegistry($cstring, true); self::includeLan($path, false); } @@ -3104,11 +3104,11 @@ class e107 if(!$tmp = self::getRegistry('core/e107/addons/e_url')) { - $tmp = e107::getAddonConfig('e_url'); + $tmp = self::getAddonConfig('e_url'); self::setRegistry('core/e107/addons/e_url',$tmp); } - $tp = e107::getParser(); + $tp = self::getParser(); $pref = self::getPref('e_url_alias'); $sefActive = self::getPref('e_url_list'); @@ -3149,7 +3149,7 @@ class e107 { if(!isset($row[$v])) { - e107::getMessage()->addDebug("Missing value for ".$v." in ".$plugin."/e_url.php - '".$key."'"); + self::getMessage()->addDebug("Missing value for ".$v." in ".$plugin."/e_url.php - '".$key."'"); $active = false; break; } @@ -3220,7 +3220,7 @@ class e107 if(!empty($plugin)) { - e107::getMessage()->addDebug("e_url.php in ".e_PLUGIN.$plugin." is missing the key: ".$key.". Or, you may need to scan your plugin directories to register e_url.php"); + self::getMessage()->addDebug("e_url.php in ".e_PLUGIN.$plugin." is missing the key: ".$key.". Or, you may need to scan your plugin directories to register e_url.php"); } return false; @@ -3406,7 +3406,7 @@ class e107 return (isset($ret)) ? $ret : ""; } } - if (e107::getPref('noLanguageSubs') || (e_LANGUAGE == 'English')) + if (self::getPref('noLanguageSubs') || (e_LANGUAGE == 'English')) { return FALSE; // No point looking for the English files twice } @@ -3496,12 +3496,12 @@ class e107 $_SERVER['PHP_SELF'] = (($pos = stripos($_SERVER['PHP_SELF'], '.php')) !== false ? substr($_SERVER['PHP_SELF'], 0, $pos+4) : $_SERVER['PHP_SELF']); // setup some php options - e107::ini_set('magic_quotes_runtime', 0); - e107::ini_set('magic_quotes_sybase', 0); - e107::ini_set('arg_separator.output', '&'); - e107::ini_set('session.use_only_cookies', 1); - e107::ini_set('session.use_trans_sid', 0); - e107::ini_set('session.cookie_httponly', 1); // cookie won't be accessible by scripting languages, such as JavaScript. Can effectively help to reduce identity theft through XSS attacks + self::ini_set('magic_quotes_runtime', 0); + self::ini_set('magic_quotes_sybase', 0); + self::ini_set('arg_separator.output', '&'); + self::ini_set('session.use_only_cookies', 1); + self::ini_set('session.use_trans_sid', 0); + self::ini_set('session.cookie_httponly', 1); // cookie won't be accessible by scripting languages, such as JavaScript. Can effectively help to reduce identity theft through XSS attacks // Ensure thet '.' is the first part of the include path $inc_path = explode(PATH_SEPARATOR, ini_get('include_path')); @@ -3509,7 +3509,7 @@ class e107 { array_unshift($inc_path, '.'); $inc_path = implode(PATH_SEPARATOR, $inc_path); - e107::ini_set('include_path', $inc_path); + self::ini_set('include_path', $inc_path); } unset($inc_path); @@ -4244,7 +4244,7 @@ class e107 */ public static function canCache($set = null) { - $_data = e107::getSession()->get('__sessionBrowserCache'); + $_data = self::getSession()->get('__sessionBrowserCache'); if(!is_array($_data)) $_data = array(); if(null === $set) @@ -4259,7 +4259,7 @@ class e107 if(false !== $check) { unset($_data[$check]); - e107::getSession()->set('__sessionBrowserCache', $_data); + self::getSession()->set('__sessionBrowserCache', $_data); return; } } @@ -4272,7 +4272,7 @@ class e107 if(empty($set) || !is_string($set) || in_array($set, $_data)) return; $_data[] = $set; - e107::getSession()->set('__sessionBrowserCache', array_unique($_data)); + self::getSession()->set('__sessionBrowserCache', array_unique($_data)); } /** @@ -4342,7 +4342,7 @@ class e107 */ public function getip() { - return e107::getIPHandler()->getIP(FALSE); + return self::getIPHandler()->getIP(FALSE); } /** @@ -4356,7 +4356,7 @@ class e107 public function ipEncode($ip, $div = ':') { - return e107::getIPHandler()->ipEncode($ip); + return self::getIPHandler()->ipEncode($ip); } /** @@ -4371,7 +4371,7 @@ class e107 */ public function ipdecode($ip, $IP4Legacy = TRUE) { - return e107::getIPHandler()->ipDecode($ip, $IP4Legacy); + return self::getIPHandler()->ipDecode($ip, $IP4Legacy); } /** @@ -4569,7 +4569,7 @@ class e107 break; } - $filename = e107::getHandlerPath($className, true); + $filename = self::getHandlerPath($className, true); //TODO add debug screen Auto-loaded classes - ['core: '.$filename.' - '.$className]; break; } @@ -4586,55 +4586,55 @@ class e107 switch ($name) { case 'tp': - $ret = e107::getParser(); + $ret = self::getParser(); break; case 'sql': - $ret = e107::getDb(); + $ret = self::getDb(); break; case 'ecache': - $ret = e107::getCache(); + $ret = self::getCache(); break; case 'arrayStorage': - $ret = e107::getArrayStorage(); + $ret = self::getArrayStorage(); break; case 'e_event': - $ret = e107::getEvent(); + $ret = self::getEvent(); break; case 'ns': - $ret = e107::getRender(); + $ret = self::getRender(); break; case 'url': - $ret = e107::getUrl(); + $ret = self::getUrl(); break; case 'admin_log': - $ret = e107::getAdminLog(); + $ret = self::getAdminLog(); break; case 'override': - $ret = e107::getSingleton('override', e_HANDLER.'override_class.php'); + $ret = self::getSingleton('override', e_HANDLER.'override_class.php'); break; case 'notify': - $ret = e107::getNotify(); + $ret = self::getNotify(); break; case 'e_online': - $ret = e107::getOnline(); + $ret = self::getOnline(); break; case 'eIPHandler': - $ret = e107::getIPHandler(); + $ret = self::getIPHandler(); break; case 'user_class': - $ret = e107::getUserClass(); + $ret = self::getUserClass(); break; default: @@ -4717,7 +4717,7 @@ class e107 return false; } - $xml = e107::getXml(); + $xml = self::getXml(); $file = "https://e107.org/releases.php"; if(!$xdata = $xml->loadXMLfile($file,true,false)) { @@ -4736,7 +4736,7 @@ class e107 } - e107::getDebug()->log("New Version:".$newVersion); + self::getDebug()->log("New Version:".$newVersion); if(version_compare($curVersion,$newVersion) === -1) {