aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/version.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-05-11 12:02:55 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-05-11 12:02:55 +0000
commitd742ec2f2062d35513a7c6250e0bcc83b9936693 (patch)
tree64832cf4fcd24be15031ae79d050edb56db0b7ad /engine/lib/version.php
parent0392a14bd687d5cb5e5ff4ddc9cdc9f71e1c5cbe (diff)
downloadelgg-d742ec2f2062d35513a7c6250e0bcc83b9936693.tar.gz
elgg-d742ec2f2062d35513a7c6250e0bcc83b9936693.tar.bz2
Refs #965 & #967: Event triggered on upgrade, allowing easier integration with plugins.
git-svn-id: https://code.elgg.org/elgg/trunk@3277 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/version.php')
-rw-r--r--engine/lib/version.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/engine/lib/version.php b/engine/lib/version.php
index d8cbb3185..b34ac7dcc 100644
--- a/engine/lib/version.php
+++ b/engine/lib/version.php
@@ -111,8 +111,15 @@
// Upgrade core
if (upgrade_code($dbversion))
- system_message(elgg_echo('upgrade:core'));
+ system_message(elgg_echo('upgrade:core'));
+
+ // Now we trigger an event to give the option for plugins to do something
+ $upgrade_details = stdClass;
+ $upgrade_details->from = $dbversion;
+ $upgrade_details->to = get_version();
+ trigger_elgg_event('upgrade', 'upgrade', $upgrade_details);
+
// Update the version
datalist_set('version', get_version());