diff options
Diffstat (limited to 'modules/gallery/controllers')
-rw-r--r-- | modules/gallery/controllers/admin_dashboard.php | 2 | ||||
-rw-r--r-- | modules/gallery/controllers/admin_graphics.php | 8 | ||||
-rw-r--r-- | modules/gallery/controllers/admin_languages.php | 6 | ||||
-rw-r--r-- | modules/gallery/controllers/admin_theme_details.php | 22 | ||||
-rw-r--r-- | modules/gallery/controllers/admin_themes.php | 8 | ||||
-rw-r--r-- | modules/gallery/controllers/albums.php | 6 | ||||
-rw-r--r-- | modules/gallery/controllers/scaffold.php | 8 |
7 files changed, 30 insertions, 30 deletions
diff --git a/modules/gallery/controllers/admin_dashboard.php b/modules/gallery/controllers/admin_dashboard.php index d2d2f79b..a1090a6d 100644 --- a/modules/gallery/controllers/admin_dashboard.php +++ b/modules/gallery/controllers/admin_dashboard.php @@ -29,7 +29,7 @@ class Admin_Dashboard_Controller extends Admin_Controller { } public function add_block() { - $form = core_block::get_add_block_form(); + $form = gallery_block::get_add_block_form(); if ($form->validate()) { list ($module_name, $id) = explode(":", $form->add_block->id->value); $available = block_manager::get_available(); diff --git a/modules/gallery/controllers/admin_graphics.php b/modules/gallery/controllers/admin_graphics.php index 0b3014f0..7e8ef47c 100644 --- a/modules/gallery/controllers/admin_graphics.php +++ b/modules/gallery/controllers/admin_graphics.php @@ -24,7 +24,7 @@ class Admin_Graphics_Controller extends Admin_Controller { $view->content->available = ""; $tk = new ArrayObject(graphics::detect_toolkits(), ArrayObject::ARRAY_AS_PROPS); - $active = module::get_var("core", "graphics_toolkit", "none"); + $active = module::get_var("gallery", "graphics_toolkit", "none"); foreach (array("gd", "imagemagick", "graphicsmagick", "none") as $id) { if ($id == $active) { $view->content->active = new View("admin_graphics_$id.html"); @@ -43,12 +43,12 @@ class Admin_Graphics_Controller extends Admin_Controller { public function choose($toolkit) { access::verify_csrf(); - if ($toolkit != module::get_var("core", "graphics_toolkit")) { - module::set_var("core", "graphics_toolkit", $toolkit); + if ($toolkit != module::get_var("gallery", "graphics_toolkit")) { + module::set_var("gallery", "graphics_toolkit", $toolkit); $toolkit_info = graphics::detect_toolkits(); if ($toolkit == "graphicsmagick" || $toolkit == "imagemagick") { - module::set_var("core", "graphics_toolkit_path", $toolkit_info[$toolkit]); + module::set_var("gallery", "graphics_toolkit_path", $toolkit_info[$toolkit]); } site_status::clear("missing_graphics_toolkit"); diff --git a/modules/gallery/controllers/admin_languages.php b/modules/gallery/controllers/admin_languages.php index 37d335a3..1dea733c 100644 --- a/modules/gallery/controllers/admin_languages.php +++ b/modules/gallery/controllers/admin_languages.php @@ -33,7 +33,7 @@ class Admin_Languages_Controller extends Admin_Controller { public function save() { $form = $this->_languages_form(); if ($form->validate()) { - module::set_var("core", "default_locale", $form->choose_language->locale->value); + module::set_var("gallery", "default_locale", $form->choose_language->locale->value); locale::update_installed($form->choose_language->installed_locales->value); message::success(t("Settings saved")); } @@ -76,7 +76,7 @@ class Admin_Languages_Controller extends Admin_Controller { message::success(t("Your API key has been saved.")); } - log::success(t("core"), t("l10n_client API key changed.")); + log::success(t("gallery"), t("l10n_client API key changed.")); url::redirect("admin/languages"); } else { // Show the page with form errors @@ -92,7 +92,7 @@ class Admin_Languages_Controller extends Admin_Controller { ->label(t("Language settings")); $group->dropdown("locale") ->options($installed_locales) - ->selected(module::get_var("core", "default_locale")) + ->selected(module::get_var("gallery", "default_locale")) ->label(t("Default language")) ->rules('required'); diff --git a/modules/gallery/controllers/admin_theme_details.php b/modules/gallery/controllers/admin_theme_details.php index 542ec31c..fec1311b 100644 --- a/modules/gallery/controllers/admin_theme_details.php +++ b/modules/gallery/controllers/admin_theme_details.php @@ -28,32 +28,32 @@ class Admin_Theme_Details_Controller extends Admin_Controller { public function save() { $form = theme::get_edit_form_admin(); if ($form->validate()) { - module::set_var("core", "page_size", $form->edit_theme->page_size->value); + module::set_var("gallery", "page_size", $form->edit_theme->page_size->value); $thumb_size = $form->edit_theme->thumb_size->value; $thumb_dirty = false; - if (module::get_var("core", "thumb_size") != $thumb_size) { - graphics::remove_rule("core", "thumb", "resize"); + if (module::get_var("gallery", "thumb_size") != $thumb_size) { + graphics::remove_rule("gallery", "thumb", "resize"); graphics::add_rule( - "core", "thumb", "resize", + "gallery", "thumb", "resize", array("width" => $thumb_size, "height" => $thumb_size, "master" => Image::AUTO), 100); - module::set_var("core", "thumb_size", $thumb_size); + module::set_var("gallery", "thumb_size", $thumb_size); } $resize_size = $form->edit_theme->resize_size->value; $resize_dirty = false; - if (module::get_var("core", "resize_size") != $resize_size) { - graphics::remove_rule("core", "resize", "resize"); + if (module::get_var("gallery", "resize_size") != $resize_size) { + graphics::remove_rule("gallery", "resize", "resize"); graphics::add_rule( - "core", "resize", "resize", + "gallery", "resize", "resize", array("width" => $resize_size, "height" => $resize_size, "master" => Image::AUTO), 100); - module::set_var("core", "resize_size", $resize_size); + module::set_var("gallery", "resize_size", $resize_size); } - module::set_var("core", "header_text", $form->edit_theme->header_text->value); - module::set_var("core", "footer_text", $form->edit_theme->footer_text->value); + module::set_var("gallery", "header_text", $form->edit_theme->header_text->value); + module::set_var("gallery", "footer_text", $form->edit_theme->footer_text->value); message::success(t("Updated theme details")); url::redirect("admin/theme_details"); diff --git a/modules/gallery/controllers/admin_themes.php b/modules/gallery/controllers/admin_themes.php index 05c134d1..aef6c2d1 100644 --- a/modules/gallery/controllers/admin_themes.php +++ b/modules/gallery/controllers/admin_themes.php @@ -21,8 +21,8 @@ class Admin_Themes_Controller extends Admin_Controller { public function index() { $view = new Admin_View("admin.html"); $view->content = new View("admin_themes.html"); - $view->content->admin = module::get_var("core", "active_admin_theme"); - $view->content->site = module::get_var("core", "active_site_theme"); + $view->content->admin = module::get_var("gallery", "active_admin_theme"); + $view->content->site = module::get_var("gallery", "active_site_theme"); $view->content->themes = $this->_get_themes(); print $view; } @@ -64,11 +64,11 @@ class Admin_Themes_Controller extends Admin_Controller { parse_ini_file(THEMEPATH . "$theme_name/theme.info"), ArrayObject::ARRAY_AS_PROPS); if ($type == "admin" && $info->admin) { - module::set_var("core", "active_admin_theme", $theme_name); + module::set_var("gallery", "active_admin_theme", $theme_name); message::success(t("Successfully changed your admin theme to <b>%theme_name</b>", array("theme_name" => $info->name))); } else if ($type == "site" && $info->site) { - module::set_var("core", "active_site_theme", $theme_name); + module::set_var("gallery", "active_site_theme", $theme_name); message::success(t("Successfully changed your Gallery theme to <b>%theme_name</b>", array("theme_name" => $info->name))); } diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 5b4d5979..03a64f43 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -32,7 +32,7 @@ class Albums_Controller extends Items_Controller { } } - $page_size = module::get_var("core", "page_size", 9); + $page_size = module::get_var("gallery", "page_size", 9); $show = $this->input->get("show"); if ($show) { @@ -114,7 +114,7 @@ class Albums_Controller extends Items_Controller { } else { print json_encode( array("result" => "error", - "form" => $form->__toString() . html::script("core/js/albums_form_add.js"))); + "form" => $form->__toString() . html::script("gallery/js/albums_form_add.js"))); } } @@ -206,7 +206,7 @@ class Albums_Controller extends Items_Controller { switch ($this->input->get("type")) { case "album": print album::get_add_form($album) . - html::script("core/js/albums_form_add.js"); + html::script("gallery/js/albums_form_add.js"); break; case "photo": diff --git a/modules/gallery/controllers/scaffold.php b/modules/gallery/controllers/scaffold.php index f0063725..8ec1663a 100644 --- a/modules/gallery/controllers/scaffold.php +++ b/modules/gallery/controllers/scaffold.php @@ -94,7 +94,7 @@ class Scaffold_Controller extends Template_Controller { $type = rand(0, 10) ? "photo" : "album"; } if ($type == "album") { - $thumb_size = module::get_var("core", "thumb_size"); + $thumb_size = module::get_var("gallery", "thumb_size"); $parents[] = album::create( $parent, "rnd_" . rand(), "Rnd $i", "random album $i", $owner_id) ->save(); @@ -262,7 +262,7 @@ class Scaffold_Controller extends Template_Controller { } foreach ($to_install as $module_name) { - if ($module_name != "core") { + if ($module_name != "gallery") { require_once(DOCROOT . "modules/${module_name}/helpers/${module_name}_installer.php"); } module::install($module_name); @@ -300,7 +300,7 @@ class Scaffold_Controller extends Template_Controller { srand(0); try { - core_installer::install(true); + gallery_installer::install(true); module::load_modules(); foreach (array("user", "comment", "organize", "info", "rss", @@ -325,7 +325,7 @@ class Scaffold_Controller extends Template_Controller { $db = Database::instance(); $db->query("TRUNCATE {sessions}"); $db->query("TRUNCATE {logs}"); - $db->query("DELETE FROM {vars} WHERE `module_name` = 'core' AND `name` = '_cache'"); + $db->query("DELETE FROM {vars} WHERE `module_name` = 'gallery' AND `name` = '_cache'"); $db->update("users", array("password" => ""), array("id" => 1)); $db->update("users", array("password" => ""), array("id" => 2)); |