1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-14 09:32:17 +02:00

Legacy shortcode related - fixed DB update detect/run

This commit is contained in:
SecretR 2013-02-11 14:56:43 +02:00
parent 9e587e0f18
commit 2a58184f81

View File

@ -1060,6 +1060,20 @@ function update_706_to_800($type='')
// ------------------- Populate Plugin Table With Changes ------------------
if (!isset($pref['shortcode_legacy_list']))
{
if ($just_check) return update_needed('Legacy shortcode conversion');
// Reset, legacy and new shortcode list will be generated in plugin update routine
$pref['shortcode_legacy_list'] = array();
$pref['shortcode_list'] = array();
save_prefs();
$ep = e107::getPlugin();
$ep->update_plugins_table($mode); // scan for e_xxx changes and save to plugin table.
$ep->save_addon_prefs($mode); // generate global e_xxx_list prefs from plugin table.
}
// This has to be done after the table is upgraded
if($sql->db_Select('plugin', 'plugin_category', "plugin_category = ''"))
{
@ -1429,15 +1443,6 @@ function update_70x_to_706($type='')
$sql->db_Select_gen("ALTER TABLE `".MPREFIX."generic` ADD INDEX `gen_type` (`gen_type`);");
}
}
if (!isset($pref['shortcode_legacy_list']))
{
if ($just_check) return update_needed();
// Reset, legacy and new shortcode list will be generated in plugin update routine
$pref['shortcode_legacy_list'] = array();
$pref['shortcode_list'] = array();
save_prefs();
}
if (!$just_check)
{