diff --git a/class2.php b/class2.php index 557007653..3dd48be55 100644 --- a/class2.php +++ b/class2.php @@ -875,7 +875,17 @@ if (!class_exists('e107table', false)) // $this->themeClass = e107::getPref('sitetheme')."_theme"; // disabled at the moment. $this->adminThemeClass = e107::getPref('admintheme')."_admintheme"; // Check for a class. } - + + + /** + * @param $style + */ + function setStyle($style) + { + $this->eSetStyle = $style; + } + + /** * @param $caption string caption text * @param $text string diff --git a/e107_admin/menus.php b/e107_admin/menus.php index 8a434fd46..9630d01f1 100644 --- a/e107_admin/menus.php +++ b/e107_admin/menus.php @@ -765,10 +765,10 @@ class e_layout global $style; $style = $this->style; - - echo $tp->parsetemplate($head); + + echo $tp->parseTemplate($head); // echo "
MAIN CONTENT
"; - echo $tp->parsetemplate($foot); + echo $tp->parseTemplate($foot); } diff --git a/e107_core/shortcodes/single/setstyle.php b/e107_core/shortcodes/single/setstyle.php index 97d426a8a..9f29b080c 100644 --- a/e107_core/shortcodes/single/setstyle.php +++ b/e107_core/shortcodes/single/setstyle.php @@ -6,7 +6,7 @@ global $style; // BC $style = $parm; // BC - e107::getRender()->eSetStyle = $parm; + e107::getRender()->setStyle($parm); } ?> diff --git a/e107_handlers/menumanager_class.php b/e107_handlers/menumanager_class.php index b751dee20..5617a5ba4 100644 --- a/e107_handlers/menumanager_class.php +++ b/e107_handlers/menumanager_class.php @@ -807,13 +807,14 @@ class e_menuManager { // ----------------------------------------------------------------------- function menuDeactivate() - { // Get current menu name - global $admin_log; + { + $sql = e107::getDb(); $sql2 = e107::getDb(); //echo "FOUND= ".$this->menuId; $error = false; + $message = ''; if($sql->gen('SELECT menu_name, menu_location, menu_order FROM #menus WHERE menu_id = '.$this->menuId.' LIMIT 1')) { @@ -832,14 +833,14 @@ class e_menuManager { else { //menu_location=0 does NOT exist, let's just convert this to it - if(!$sql2->db_Update("menus", "menu_location=0, menu_order=0, menu_class=0, menu_pages='' WHERE menu_id=".$this->menuId)) + if(!$sql2->update("menus", "menu_location=0, menu_order=0, menu_class=0, menu_pages='' WHERE menu_id=".$this->menuId)) { $message = "FAILED"; $error = true; } } //Move all menus up (reduces order number) that have a higher menu order number than one deactivated, in the selected location. - $sql->db_Update("menus", "menu_order=menu_order-1 WHERE menu_location={$row['menu_location']} AND menu_order > {$row['menu_order']} AND menu_layout = '".$this->dbLayout."' "); + $sql->update("menus", "menu_order=menu_order-1 WHERE menu_location={$row['menu_location']} AND menu_order > {$row['menu_order']} AND menu_layout = '".$this->dbLayout."' "); e107::getLog()->add('MENU_04',$row['menu_name'].'[!br!]'.$row['menu_location'].'[!br!]'.$row['menu_order'].'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,''); } else @@ -855,10 +856,13 @@ class e_menuManager { // ---------------------------------------------------------------------- + /** + * Move a Menu + */ function menuMove() {// Get current menu name - global $admin_log,$sql; + $sql = e107::getDb(); if($sql->select('menus', 'menu_name', 'menu_id='.$this->menuId, 'default')) { @@ -1182,13 +1186,22 @@ class e_menuManager { $tp = e107::getParser(); $ns = e107::getRender(); - + $menuLayout = ($this->curLayout != $pref['sitetheme_deflayout']) ? $this->curLayout : ""; if(strstr($str, "LOGO")) { echo $tp->parseTemplate("{LOGO}"); } + elseif(strstr($str, "SETSTYLE")) + { + $tmp = explode("=", $str); + $style = preg_replace("/\{SETSTYLE=(.*?)\}/si", "\\1", $str); + + $this->style = $style; + $ns->setStyle($style); + + } elseif(strstr($str, "SITENAME")) { echo "[SiteName]"; @@ -1335,16 +1348,10 @@ class e_menuManager { } } - echo $menuText; - } - else if(strstr($str, "SETSTYLE")) - { - $tmp = explode("=", $str); - $style = preg_replace("/\{SETSTYLE=(.*?)\}/si", "\\1", $str); - - $this->style = $style; - + + $ns->tablerender('', $menuText); } + else if(strstr($str, "SITEDISCLAIMER")) { echo "[Sitedisclaimer]";