diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-26 09:36:51 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-26 10:05:25 -0700 |
commit | 274d4680fad4aa8254b35b4906847d262b53cd33 (patch) | |
tree | 3744da21c47080691e71ef503675691c2946767f /modules/gallery | |
parent | e4eedbce2298535540cb651d75ba6f1bf42cf02b (diff) |
Upgrade the gallery module to version 16 to reflect the refactoring of the user module into an identity provider. Change how we determine if there are available groups that we need to export
Diffstat (limited to 'modules/gallery')
-rw-r--r-- | modules/gallery/helpers/access.php | 3 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_installer.php | 9 | ||||
-rw-r--r-- | modules/gallery/module.info | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/modules/gallery/helpers/access.php b/modules/gallery/helpers/access.php index a3abbe2e..c1c1f9d1 100644 --- a/modules/gallery/helpers/access.php +++ b/modules/gallery/helpers/access.php @@ -421,8 +421,7 @@ class access_Core { private static function _get_all_groups() { // When we build the gallery package, it's possible that there is no identity provider installed yet. // This is ok at packaging time, so work around it. - $config = module::get_var("gallery", "identity_provider"); - if (!empty($config)) { + if (module::is_active(module::get_var("gallery", "identity_provider", "user"))) { return identity::groups(); } else { return array(); diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index 9c19eaed..01a213c8 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -253,6 +253,8 @@ class gallery_installer { $theme->save(); } + module::set_var("gallery", "identity_provider", "user"); + block_manager::add("dashboard_sidebar", "gallery", "block_adder"); block_manager::add("dashboard_sidebar", "gallery", "stats"); block_manager::add("dashboard_sidebar", "gallery", "platform_info"); @@ -268,7 +270,7 @@ class gallery_installer { module::set_var("gallery", "show_credits", 1); // @todo this string needs to be picked up by l10n_scanner module::set_var("gallery", "credits", "Powered by <a href=\"%url\">Gallery %version</a>"); - module::set_version("gallery", 15); + module::set_version("gallery", 16); } static function upgrade($version) { @@ -393,6 +395,11 @@ class gallery_installer { } module::set_version("gallery", $version = 15); } + + if ($version == 15) { + module::set_var("gallery", "identity_provider", "user"); + module::set_version("gallery", $version = 16); + } } static function uninstall() { diff --git a/modules/gallery/module.info b/modules/gallery/module.info index f509ff08..e21431a7 100644 --- a/modules/gallery/module.info +++ b/modules/gallery/module.info @@ -1,3 +1,3 @@ name = "Gallery 3" description = "Gallery core application" -version = 15 +version = 16 |