mirror of
https://github.com/e107inc/e107.git
synced 2025-07-30 19:30:25 +02:00
Added update routine from 2.1.9 to 2.2.0
This commit is contained in:
@@ -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['219_to_220'] = array('master'=>false, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('2.1.9','2.2.0')), 'message'=> null, 'hide_when_complete'=>true);
|
||||
|
||||
$dbupdate['218_to_219'] = array('master'=>false, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('2.1.8','2.1.9')), 'message'=> null, 'hide_when_complete'=>true);
|
||||
|
||||
$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);
|
||||
@@ -564,6 +566,21 @@ function update_core_database($type = '')
|
||||
}
|
||||
|
||||
|
||||
function update_219_to_220($type='')
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$just_check = ($type == 'do') ? false : true;
|
||||
|
||||
// add new pref contact_privacypolicy
|
||||
if (!e107::getPref('contact_privacypolicy', ''))
|
||||
{
|
||||
e107::getConfig()->setPref('contact_privacypolicy', '')->save(false, true);
|
||||
}
|
||||
|
||||
return $just_check;
|
||||
}
|
||||
|
||||
|
||||
function update_218_to_219($type='')
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
@@ -598,15 +615,15 @@ function update_core_database($type = '')
|
||||
|
||||
$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();
|
||||
}
|
||||
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.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Make sure, that the pref "post_script" contains one of the allowed userclasses
|
||||
|
Reference in New Issue
Block a user