From f1a0a4d5aa28753620552df9d5e88bd983d0aca4 Mon Sep 17 00:00:00 2001 From: Sem Date: Sat, 25 Feb 2012 02:18:00 +0100 Subject: Added upgrade script to fetch thumbnails. --- start.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'start.php') diff --git a/start.php b/start.php index ff668f00c..07ec618a0 100644 --- a/start.php +++ b/start.php @@ -67,6 +67,8 @@ function videolist_init() { elgg_register_action("videolist/add", "$actions_path/add.php"); elgg_register_action("videolist/edit", "$actions_path/edit.php"); elgg_register_action("videolist/delete", "$actions_path/delete.php"); + + elgg_register_event_handler('upgrade', 'system', 'videolist_run_upgrades'); } /** @@ -262,3 +264,14 @@ function videolist_icon_url_override($hook, $type, $returnvalue, $params) { return "mod/videolist/graphics/videolist_icon_{$size}.png"; } } + +/** + * Process upgrades for the videolist plugin + */ +function videolist_run_upgrades() { + $path = elgg_get_plugins_path() . 'videolist/upgrades/'; + $files = elgg_get_upgrade_files($path); + foreach ($files as $file) { + include "$path{$file}"; + } +} -- cgit v1.2.3