diff options
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/access.php | 3 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_installer.php | 9 |
2 files changed, 9 insertions, 3 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() { |