1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-26 01:11:28 +02:00

Issue #3263 Upgrade routine added for 2.1.7 > 2.1.8

This commit is contained in:
Cameron
2018-07-13 12:51:44 -07:00
parent eef5753f9f
commit 26d72ff21e

View File

@@ -122,6 +122,8 @@ if (!$dont_check_update)
$LAN_UPDATE_4 = deftrue('LAN_UPDATE_4',"Update from [x] to [y]"); // in case language-pack hasn't been upgraded.
$LAN_UPDATE_5 = deftrue('LAN_UPDATE_5', "Core database structure");
$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['214_to_215'] = array('master'=>false, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('2.1.4','2.1.5')), 'message'=> null, 'hide_when_complete'=>true);
@@ -561,6 +563,37 @@ function update_core_database($type = '')
return $just_check;
}
/**
* @param string $type
* @return bool true = no update required, and false if update required.
*/
function update_217_to_218($type='')
{
$just_check = ($type == 'do') ? false : true;
$e_user_list = e107::getPref('e_user_list');
if(empty($e_user_list['user'])) // check e107_plugins/user/e_user.php is registered.
{
if($just_check)
{
return update_needed("user/e_user.php need to be registered"); // NO LAN.
}
e107::getPlug()->clearCache()->buildAddonPrefLists();
}
//todo add check for post_html pref value.
return $just_check;
}
/**
* @param string $type
* @return bool true = no update required, and false if update required.