summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-11-19 11:44:01 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-11-19 11:44:01 -0800
commit57adefc5baa7a2b0dfcd3e736e80c2fa86d3bfa2 (patch)
tree2ac5da34d0a47af96ace932dbdc002a35f0e4cda /modules/gallery/helpers
parent6fd1e2af1f081c61bde47cee5b613778a46e1422 (diff)
Revert "Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme."
This reverts commit 26114972c3388f065220b94a0d5962f20a6ccd0c.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/gallery_installer.php21
-rw-r--r--modules/gallery/helpers/theme.php29
2 files changed, 5 insertions, 45 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 4051c6e9..57a5ee9f 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -226,9 +226,9 @@ class gallery_installer {
module::set_var("gallery", "active_site_theme", "wind");
module::set_var("gallery", "active_admin_theme", "admin_wind");
- module::set_var("wind", "page_size", 9);
- module::set_var("wind", "thumb_size", 200);
- module::set_var("wind", "resize_size", 640);
+ module::set_var("gallery", "page_size", 9);
+ module::set_var("gallery", "thumb_size", 200);
+ module::set_var("gallery", "resize_size", 640);
module::set_var("gallery", "default_locale", "en_US");
module::set_var("gallery", "image_quality", 75);
module::set_var("gallery", "image_sharpen", 15);
@@ -265,10 +265,10 @@ class gallery_installer {
module::set_var("gallery", "date_format", "Y-M-d");
module::set_var("gallery", "date_time_format", "Y-M-d H:i:s");
module::set_var("gallery", "time_format", "H:i:s");
- module::set_var("wind", "show_credits", 1);
+ 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", 20);
+ module::set_version("gallery", 19);
}
static function upgrade($version) {
@@ -432,17 +432,6 @@ class gallery_installer {
module::clear_var("gallery", "blocks_site.sidebar");
module::set_version("gallery", $version = 19);
}
-
- // Move the theme related variables into the current theme
- if ($version == 19) {
- foreach (array("page_size", "thumb_size", "resize_size", "header_text",
- "footer_text", "show_credits") as $var) {
- $value = module::get_var("gallery", $var);
- theme::set_var($var, $value);
- module::clear_var("gallery", $var);
- }
- module::set_version("gallery", $version = 20);
- }
}
static function uninstall() {
diff --git a/modules/gallery/helpers/theme.php b/modules/gallery/helpers/theme.php
index c7b773d1..6e8943b3 100644
--- a/modules/gallery/helpers/theme.php
+++ b/modules/gallery/helpers/theme.php
@@ -57,33 +57,4 @@ class theme_Core {
return $theme_info;
}
-
- /**
- * Get a variable from the active theme
- * @param string $name
- * @param string $default_value
- * @return the value
- */
- static function get_var($name, $default_value=null) {
- return module::get_var(self::$site, $name, $default_value);
- }
-
- /**
- * Store a variable for active theme
- * @param string $module_name
- * @param string $name
- * @param string $value
- */
- static function set_var($name, $value) {
- module::set_var(self::$site, $name, $value);
- }
-
- /**
- * Remove a variable for this module.
- * @param string $module_name
- * @param string $name
- */
- static function clear_var($name) {
- module::clear_var(self::$site, $name);
- }
}