From f815d91beca142a486cc82ef08f6bc5234a49dcf Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 11 Mar 2021 09:44:37 -0800 Subject: [PATCH] Issue #4442 Global lan check for news added to upgrade routine. --- e107_admin/update_routines.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index f30835443..b714a6afd 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -114,7 +114,7 @@ if (!$dont_check_update) // $dbupdate['217_to_218'] = array('master'=>false, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('2.1.7','2.1.8')), 'message'=> null, 'hide_when_complete'=>true); $dbupdate['706_to_800'] = array('master'=>true, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('1.x','2.0')), 'message'=> LAN_UPDATE_29, 'hide_when_complete'=>true); - $dbupdate['20x_to_220'] = array('master'=>true, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('2.x','2.2.0')), 'message'=> null, 'hide_when_complete'=>false); + $dbupdate['20x_to_231'] = array('master'=>true, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('2.x','2.3.1')), 'message'=> null, 'hide_when_complete'=>false); @@ -626,7 +626,7 @@ function update_core_database($type = '') * @param string $type * @return bool true = no update required, and false if update required. */ - function update_20x_to_230($type='') + function update_20x_to_231($type='') { $sql = e107::getDb(); @@ -635,6 +635,19 @@ function update_core_database($type = '') $pref = e107::getPref(); + if(!isset($pref['lan_global_list']['news'])) + { + if($just_check) + { + return update_needed("News is missing from global lan list. "); + } + + $plgClass = e107::getPlugin(); + $plgClass->plugFolder = 'news'; + $plgClass->XmlLanguageFiles('refresh'); + } + + if(!$sql->select('core_media_cat', 'media_cat_id', "media_cat_category = '_icon_svg' LIMIT 1")) { if($just_check) @@ -725,6 +738,9 @@ function update_core_database($type = '') + + + return $just_check;