diff --git a/class2.php b/class2.php index 13a94df84..b2c7248f3 100644 --- a/class2.php +++ b/class2.php @@ -823,6 +823,7 @@ if (!function_exists('checkvalidtheme')) { // arg1 = theme to check //global $ADMIN_DIRECTORY, $tp, $e107; + global $sql; $e107 = e107::getInstance(); $tp = e107::getParser(); $ADMIN_DIRECTORY = $e107->getFolder('admin'); @@ -846,15 +847,27 @@ if (!function_exists('checkvalidtheme')) define('PREVIEWTHEMENAME', $themeArray[$id]); define('THEME', e_THEME.$themeArray[$id].'/'); define('THEME_ABS', e_THEME_ABS.$themeArray[$id].'/'); - + + $legacy = (file_exists( e_THEME_ABS.$themeArray[$id].'/theme.xml') === false); + + define('THEME_LEGACY',$legacy); return; } + + $sql->db_Mark_time("Theme Check"); + if (@fopen(e_THEME.$theme_check.'/theme.php', 'r')) + // if (is_readable(e_THEME.$theme_check.'/theme.php')) { define('THEME', e_THEME.$theme_check.'/'); define('THEME_ABS', e_THEME_ABS.$theme_check.'/'); + + $legacy = (file_exists(e_THEME.$theme_check.'/theme.xml') === false); + + define('THEME_LEGACY',$legacy); + $e107->site_theme = $theme_check; } else @@ -889,6 +902,8 @@ if (!function_exists('checkvalidtheme')) } } + $sql->db_Mark_time("Theme Check End"); + $themes_dir = $e107->getFolder('themes'); $e107->http_theme_dir = "{$e107->server_path}{$themes_dir}{$e107->site_theme}/"; } @@ -916,6 +931,8 @@ if (!class_exists('e107table', false)) private $adminThemeClass = ''; public $frontend = null; private $uniqueId = null; + private $content = array(); + private $contentTypes = array('header','footer','text','title','image', 'list'); function __construct() @@ -944,6 +961,23 @@ if (!class_exists('e107table', false)) } + /** + * Set Advanced Menu content (beyond just $caption and $text) + * @param string $type header|footer|text|title|image + * @param string $val + */ + public function setContent($type, $val) + { + if(!in_array($type,$this->contentTypes)) + { + return false; + } + + $this->content[$type] = (string) $val; + } + + + /** * @param $caption string caption text * @param $text string @@ -1017,17 +1051,27 @@ if (!class_exists('e107table', false)) { $thm = new $this->themeClass(); } + + $options = $this->content; + + $options['uniqueId'] = $this->uniqueId; + $options['menuArea'] = $this->eMenuArea; + $options['menuCount'] = $this->eMenuCount; + $options['menuTotal'] = varset($this->eMenuTotal[$this->eMenuArea]); + $options['setStyle'] = $this->eSetStyle; + if(is_object(vartrue($thm))) { - $thm->tablestyle($caption, $text, $mode, array('uniqueId'=>$this->uniqueId, 'menuArea'=>$this->eMenuArea, 'menuCount'=>$this->eMenuCount, 'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]), 'setStyle'=>$this->eSetStyle)); + $thm->tablestyle($caption, $text, $mode, $options); } else { - tablestyle($caption, $text, $mode, array('uniqueId'=>$this->uniqueId, 'menuArea'=>$this->eMenuArea,'menuCount'=>$this->eMenuCount,'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]),'setStyle'=>$this->eSetStyle)); + tablestyle($caption, $text, $mode, $options); } $this->uniqueId = null; + $this->content = array(); } @@ -1869,6 +1913,7 @@ function init_session() define('USERIMAGE', $user->get('user_image')); define('USERPHOTO', $user->get('user_sess')); define('USERJOINED', $user->get('user_join')); + define('USERCURRENTVISIT', $user->get('user_currentvisit')); define('USERVISITS', $user->get('user_visits')); define('USERSIGNATURE', $user->get('user_signature')); diff --git a/e107_admin/admin.php b/e107_admin/admin.php index ca4fb2a44..09003add2 100644 --- a/e107_admin/admin.php +++ b/e107_admin/admin.php @@ -303,7 +303,7 @@ class admin_start $lans = array('x'=>$link, 'y'=>LAN_PLUGIN); $message = $tp->lanVars(LAN_NEWER_VERSION_OF_X, $lans); - $message .= " ".$tp->toGlyph('fa-cloud-download').""; + $message .= " ".$tp->toGlyph('fa-arrow-circle-o-down').""; e107::getMessage()->addInfo($message); @@ -350,7 +350,7 @@ class admin_start $caption = LAN_DOWNLOAD.": ".$versions[$folder]['name']." ".$versions[$folder]['version']; $message = $tp->lanVars(LAN_NEWER_VERSION_OF_X, $lans); - $message .= " ".$tp->toGlyph('fa-cloud-download').""; + $message .= " ".$tp->toGlyph('fa-arrow-circle-o-down').""; e107::getMessage()->addInfo($message); @@ -507,7 +507,7 @@ class admin_start $frm = e107::getForm(); $text = $frm->open('deprecatedFiles', 'post'); - $text .= "The following old files can be safely deleted from your system: "; + $text .= ADLAN_186; $text .= "