From a9eb2bd7278c3adb0b54f2a8fcc2ea27a1d23466 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 10 Feb 2016 19:38:03 -0800 Subject: [PATCH] Clear JS/CSS Cache after theme change. --- e107_admin/header.php | 2 +- e107_admin/update_routines.php | 10 ++++++---- e107_handlers/theme_handler.php | 4 +++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/e107_admin/header.php b/e107_admin/header.php index 983d823dc..11f200bad 100644 --- a/e107_admin/header.php +++ b/e107_admin/header.php @@ -55,7 +55,7 @@ function loadJSAddons() e107::css('core', 'bootstrap-select/bootstrap-select.min.css', 'jquery'); e107::js('core', 'bootstrap-select/bootstrap-select.min.js', 'jquery', 2); - e107::css('core', 'bootstrap-multiselect/css/bootstrap-multiselect.css', 'jquery'); +// e107::css('core', 'bootstrap-multiselect/css/bootstrap-multiselect.css', 'jquery'); e107::js('core', 'bootstrap-multiselect/js/bootstrap-multiselect.js', 'jquery', 2); // TODO: remove typeahead. diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index d862c2b55..a9d6215fa 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -703,9 +703,10 @@ function update_706_to_800($type='') if(e107::getDb()->select("core", "*", $serialz_qry)) { if($just_check) return update_needed('Convert serialized core prefs'); - while ($row = e107::getDb()->fetch(MYSQL_ASSOC)) + while ($row = e107::getDb()->fetch()) { - $status = e107::getDb('sql2')->update('core',"e107_value=\"".convert_serialized($row['e107_value'])."\" WHERE e107_name='".$row['e107_name']."'") ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR; + + $status = e107::getDb('sql2')->update('core',"e107_value=\"".convert_serialized($row['e107_value'])."\" WHERE e107_name='".$row['e107_name']."'") ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR; $log->addDebug(LAN_UPDATE_22.$row['e107_name'].": ". $status); } @@ -1896,10 +1897,11 @@ function get_default_prefs() return $pref; } -function convert_serialized($serializedData) +function convert_serialized($serializedData, $type='') { $arrayData = unserialize($serializedData); - return e107::serialize($arrayData,FALSE); + $data = e107::serialize($arrayData,FALSE); + return $data; } diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index a0fb9c76e..2dee979bf 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -1744,10 +1744,12 @@ class themeHandler if($contentCheck === true) { - $sql->db_Delete("menus", "menu_layout !='' "); + $sql->delete("menus", "menu_layout !='' "); } e107::getCache()->clear(); + e107::getCache()->clearAll('js'); + e107::getCache()->clearAll('css'); if($core->save()) {