1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 13:17:24 +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 ------------------ // ------------------- 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 // This has to be done after the table is upgraded
if($sql->db_Select('plugin', 'plugin_category', "plugin_category = ''")) if($sql->db_Select('plugin', 'plugin_category', "plugin_category = ''"))
{ {
@@ -1430,15 +1444,6 @@ function update_70x_to_706($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) if (!$just_check)
{ {
// update new fields // update new fields