From 3b295750a02fbdb7f3ea6a3d75cf6260df6a2d46 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Thu, 27 Dec 2012 16:59:49 -0500 Subject: Fixes #4882. Added upgrade for The Wire to register thewire objects as ElggWire class. --- mod/thewire/start.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mod/thewire/start.php') diff --git a/mod/thewire/start.php b/mod/thewire/start.php index 1ba48263a..8b01cc57a 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -67,6 +67,8 @@ function thewire_init() { elgg_register_action("thewire/delete", "$action_base/delete.php"); elgg_register_plugin_hook_handler('unit_test', 'system', 'thewire_test'); + + elgg_register_event_handler('upgrade', 'system', 'thewire_run_upgrades'); } /** @@ -462,3 +464,12 @@ function thewire_test($hook, $type, $value, $params) { $value[] = $CONFIG->pluginspath . 'thewire/tests/regex.php'; return $value; } + +function thewire_run_upgrades() { + $path = dirname(__FILE__) . '/upgrades/'; + $files = elgg_get_upgrade_files($path); + + foreach ($files as $file) { + include $path . $file; + } +} \ No newline at end of file -- cgit v1.2.3