From 784d386c36660b89870b90c077932f634d82d102 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 25 May 2013 22:30:10 -0700 Subject: [PATCH] Don't re-install theme during upgrade unless data is missing. --- e107_admin/includes/infopanel.php | 3 ++- e107_admin/update_routines.php | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/e107_admin/includes/infopanel.php b/e107_admin/includes/infopanel.php index 9129f8ed0..3f72994b0 100644 --- a/e107_admin/includes/infopanel.php +++ b/e107_admin/includes/infopanel.php @@ -670,8 +670,9 @@ EOF; if(file_exists(e_PLUGIN."awstats/awstats.graph.php")) { require_once(e_PLUGIN."awstats/awstats.graph.php"); + $stat = new awstats; - if($data) + if($data = $stat->getData()) { return $data; } diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index dcc77cba2..5bc848099 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -1604,15 +1604,19 @@ function update_706_to_800($type='') if (!$just_check) // Running the Upgrade Process. { - $th = e107::getSingleton('themeHandler'); - $tmp = $th->getThemeInfo($pref['sitetheme']); - if($th->setTheme($pref['sitetheme'], false)) + + if(!is_array($pref['sitetheme_layouts']) || !vartrue($pref['sitetheme_deflayout'])) { - $log->addDebug("Updated SiteTheme prefs"); - } - else - { - $log->addDebug("Couldn't update SiteTheme prefs"); + $th = e107::getSingleton('themeHandler'); + $tmp = $th->getThemeInfo($pref['sitetheme']); + if($th->setTheme($pref['sitetheme'], false)) + { + $log->addDebug("Updated SiteTheme prefs"); + } + else + { + $log->addDebug("Couldn't update SiteTheme prefs"); + } } $log->toFile('upgrade_v1_to_v2');