aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/upgrades/2011010101.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/upgrades/2011010101.php')
-rw-r--r--engine/lib/upgrades/2011010101.php25
1 files changed, 24 insertions, 1 deletions
diff --git a/engine/lib/upgrades/2011010101.php b/engine/lib/upgrades/2011010101.php
index be1adac1a..f4411ee20 100644
--- a/engine/lib/upgrades/2011010101.php
+++ b/engine/lib/upgrades/2011010101.php
@@ -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);
+
+/**
+ * @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');