From 9c47dcfbd3b7b408d5ffd0729dd9dc2fe1aaa983 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 1 May 2013 12:56:19 -0700 Subject: [PATCH] Retain welcome-message as frontpage setting if present. --- e107_admin/update_routines.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index 1e8008e9d..1d2c5b335 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -650,11 +650,14 @@ function update_706_to_800($type='') // } // Front page prefs (logic has changed) - if (!isset($pref['frontpage_force'])) - { // Just set basic options; no real method of converting the existing + if (!isset($pref['frontpage_force'])) // Just set basic options; no real method of converting the existing + { if ($just_check) return update_needed('Change front page prefs'); $pref['frontpage_force'] = array(e_UC_PUBLIC => ''); - $pref['frontpage'] = array(e_UC_PUBLIC => 'news.php'); + + $fpdef = vartrue($pref['frontpage']['all']) == 'index.php' ? 'index.php' : 'news.php'; + + $pref['frontpage'] = array(e_UC_PUBLIC => $fpdef); // $_pdateMessages[] = LAN_UPDATE_38; //FIXME $log->logMessage(LAN_UPDATE_20."frontpage",E_MESSAGE_DEBUG); $do_save = TRUE;