diff options
Diffstat (limited to 'engine/lib/upgrades/2011010101.php')
| -rw-r--r-- | engine/lib/upgrades/2011010101.php | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/engine/lib/upgrades/2011010101.php b/engine/lib/upgrades/2011010101.php index eac5810c4..f4411ee20 100644 --- a/engine/lib/upgrades/2011010101.php +++ b/engine/lib/upgrades/2011010101.php @@ -21,8 +21,8 @@ $r = update_data($q); // rewrite all plugin:setting:* to ELGG_PLUGIN_USER_SETTING_PREFIX . * $q = "UPDATE {$db_prefix}private_settings - SET name = replace(name, 'plugin:setting', '" . ELGG_PLUGIN_USER_SETTING_PREFIX . "') - WHERE name LIKE 'plugin:setting:%'"; + SET name = replace(name, 'plugin:settings:', '" . ELGG_PLUGIN_USER_SETTING_PREFIX . "') + WHERE name LIKE 'plugin:settings:%'"; $r = update_data($q); @@ -66,10 +66,33 @@ if ($old_enabled_plugins) { // invalidate caches elgg_invalidate_simplecache(); -elgg_filepath_cache_reset(); +elgg_reset_system_cache(); // clean up. remove_metadata($site->guid, 'pluginorder'); remove_metadata($site->guid, 'enabled_plugins'); -elgg_set_ignore_access($old_id);
\ No newline at end of file +elgg_set_ignore_access($old_id); + +/** + * @hack + * + * We stop the upgrade at this point because plugins weren't given the chance to + * load due to the new plugin code introduced with Elgg 1.8. Instead, we manually + * set the version and start the upgrade process again. + * + * The variables from upgrade_code() are available because this script was included + */ +if ($upgrade_version > $version) { + datalist_set('version', $upgrade_version); +} + +// add ourselves to the processed_upgrades. +$processed_upgrades[] = '2011010101.php'; + +$processed_upgrades = array_unique($processed_upgrades); +elgg_set_processed_upgrades($processed_upgrades); + +_elgg_upgrade_unlock(); + +forward('upgrade.php'); |
