diff --git a/class2.php b/class2.php
index 13a94df84..eff84b133 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();
}
@@ -1673,10 +1717,31 @@ function save_prefs($table = 'core', $uid = USERID, $row_val = '')
e107::getMessage()->addDebug('Deprecated save_prefs() backtrace:
- ".e107::getParser()->toHTML(LANG_LAN_140, true)." |
-
- |