mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Cleanup
This commit is contained in:
30
class2.php
30
class2.php
@@ -362,12 +362,12 @@ if(E107_DEBUG_LEVEL && isset($db_debug) && is_object($db_debug))
|
|||||||
//
|
//
|
||||||
// I: Sanity check on e107_config.php
|
// I: Sanity check on e107_config.php
|
||||||
// e107_config.php upgrade check
|
// e107_config.php upgrade check
|
||||||
// FIXME - obsolete check, rewrite it
|
// obsolete check, rewrite it
|
||||||
if (!$ADMIN_DIRECTORY && !$DOWNLOADS_DIRECTORY)
|
// if (!$ADMIN_DIRECTORY && !$DOWNLOADS_DIRECTORY)
|
||||||
{
|
// {
|
||||||
message_handler('CRITICAL_ERROR', 8, ': generic, ', 'e107_config.php');
|
// message_handler('CRITICAL_ERROR', 8, ': generic, ', 'e107_config.php');
|
||||||
exit;
|
// exit;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
// J: MYSQL INITIALIZATION
|
// J: MYSQL INITIALIZATION
|
||||||
@@ -685,7 +685,7 @@ $sql->db_Mark_Time('Misc resources. Online user tracking, cache');
|
|||||||
$e107cache = e107::getCache(); //TODO - find & replace $e107cache, $e107->ecache
|
$e107cache = e107::getCache(); //TODO - find & replace $e107cache, $e107->ecache
|
||||||
|
|
||||||
//DEPRECATED, BC, call the method only when needed, $e107->override caught by __get()
|
//DEPRECATED, BC, call the method only when needed, $e107->override caught by __get()
|
||||||
$override = e107::getSingleton('override', true); //TODO - find & replace $override, $e107->override
|
$override = e107::getSingleton('override', true);
|
||||||
|
|
||||||
//DEPRECATED, BC, call the method only when needed, $e107->user_class caught by __get()
|
//DEPRECATED, BC, call the method only when needed, $e107->user_class caught by __get()
|
||||||
$e_userclass = e107::getUserClass(); //TODO - find & replace $e_userclass, $e107->user_class
|
$e_userclass = e107::getUserClass(); //TODO - find & replace $e_userclass, $e107->user_class
|
||||||
@@ -851,12 +851,12 @@ if (!function_exists('checkvalidtheme'))
|
|||||||
$legacy = (file_exists( e_THEME_ABS.$themeArray[$id].'/theme.xml') === false);
|
$legacy = (file_exists( e_THEME_ABS.$themeArray[$id].'/theme.xml') === false);
|
||||||
|
|
||||||
define('THEME_LEGACY',$legacy);
|
define('THEME_LEGACY',$legacy);
|
||||||
|
unset($action);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql->db_Mark_time("Theme Check");
|
$sql->db_Mark_Time("Theme Check");
|
||||||
|
|
||||||
if (@fopen(e_THEME.$theme_check.'/theme.php', 'r'))
|
if (@fopen(e_THEME.$theme_check.'/theme.php', 'r'))
|
||||||
// if (is_readable(e_THEME.$theme_check.'/theme.php'))
|
// if (is_readable(e_THEME.$theme_check.'/theme.php'))
|
||||||
@@ -903,7 +903,7 @@ if (!function_exists('checkvalidtheme'))
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql->db_Mark_time("Theme Check End");
|
$sql->db_Mark_Time("Theme Check End");
|
||||||
|
|
||||||
$themes_dir = $e107->getFolder('themes');
|
$themes_dir = $e107->getFolder('themes');
|
||||||
$e107->http_theme_dir = "{$e107->server_path}{$themes_dir}{$e107->site_theme}/";
|
$e107->http_theme_dir = "{$e107->server_path}{$themes_dir}{$e107->site_theme}/";
|
||||||
@@ -967,8 +967,10 @@ if (!class_exists('e107table', false))
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Advanced Page/Menu content (beyond just $caption and $text)
|
* Set Advanced Page/Menu content (beyond just $caption and $text)
|
||||||
|
*
|
||||||
* @param string $type header|footer|text|title|image|list
|
* @param string $type header|footer|text|title|image|list
|
||||||
* @param string $val
|
* @param string $val
|
||||||
|
* @return bool|e107table
|
||||||
*/
|
*/
|
||||||
public function setContent($type, $val)
|
public function setContent($type, $val)
|
||||||
{
|
{
|
||||||
@@ -1363,8 +1365,8 @@ if(!defined("THEME_LAYOUT"))
|
|||||||
{
|
{
|
||||||
$user_pref = e107::getUser()->getPref();
|
$user_pref = e107::getUser()->getPref();
|
||||||
$pref = e107::getPref();
|
$pref = e107::getPref();
|
||||||
$cusPagePref = (varset($user_pref['sitetheme_custompages'])) ? $user_pref['sitetheme_custompages'] : varset($pref['sitetheme_custompages']);
|
$cusPagePref = (!empty($user_pref['sitetheme_custompages'])) ? $user_pref['sitetheme_custompages'] : varset($pref['sitetheme_custompages'],array());
|
||||||
$cusPageDef = (!isset($user_pref['sitetheme_deflayout'])) ? varset($pref['sitetheme_deflayout']) : $user_pref['sitetheme_deflayout'];
|
$cusPageDef = (empty($user_pref['sitetheme_deflayout'])) ? varset($pref['sitetheme_deflayout'],'') : $user_pref['sitetheme_deflayout'];
|
||||||
$deflayout = e107::getTheme()->getThemeLayout($cusPagePref, $cusPageDef);
|
$deflayout = e107::getTheme()->getThemeLayout($cusPagePref, $cusPageDef);
|
||||||
|
|
||||||
define("THEME_LAYOUT",$deflayout);
|
define("THEME_LAYOUT",$deflayout);
|
||||||
@@ -1697,6 +1699,8 @@ function get_user_data($uid, $extra = '')
|
|||||||
e107::getMessage()->addDebug('Deprecated get_user_data() backtrace:<pre>'."\n".print_r(debug_backtrace(null,2), true).'</pre>');
|
e107::getMessage()->addDebug('Deprecated get_user_data() backtrace:<pre>'."\n".print_r(debug_backtrace(null,2), true).'</pre>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset($extra);
|
||||||
|
|
||||||
$var = array();
|
$var = array();
|
||||||
$user = e107::getSystemUser($uid, true);
|
$user = e107::getSystemUser($uid, true);
|
||||||
if($user)
|
if($user)
|
||||||
@@ -2496,7 +2500,7 @@ class error_handler
|
|||||||
*/
|
*/
|
||||||
function trigger_error($information, $level)
|
function trigger_error($information, $level)
|
||||||
{
|
{
|
||||||
trigger_error($information);
|
trigger_error($information, $level);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user