From c2a1ea64eda2bf3e22ecaf4df4714c091bc5d7c4 Mon Sep 17 00:00:00 2001 From: colings Date: Sun, 2 Jan 2011 09:48:23 -0600 Subject: Tweak to include parent_id in resize call, for custom albums. --- modules/gallery/helpers/graphics.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index edba6b76..bfea2f2c 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -169,7 +169,9 @@ class graphics_Core { } foreach (self::_get_rules($target) as $rule) { - $args = array($working_file, $output_file, unserialize($rule->args)); + $options = unserialize($rule->args); + $options["parent_id"] = $item->parent_id; + $args = array($working_file, $output_file, $options); call_user_func_array($rule->operation, $args); $working_file = $output_file; } -- cgit v1.2.3 From 8437a85ac87f8fc6b4ee420bde59eda683140063 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 29 Jan 2011 08:37:12 -0800 Subject: AUTO_CHECK_INTERVAL --> upgrade_checker::AUTO_CHECK_INTERVAL Fixes #1624 --- modules/gallery/helpers/upgrade_checker.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/helpers/upgrade_checker.php b/modules/gallery/helpers/upgrade_checker.php index ff65608b..c11a9319 100644 --- a/modules/gallery/helpers/upgrade_checker.php +++ b/modules/gallery/helpers/upgrade_checker.php @@ -42,7 +42,8 @@ class upgrade_checker_Core { static function should_auto_check() { if (upgrade_checker::auto_check_enabled() && random::int(1, 100) == 1) { $version_info = upgrade_checker::version_info(); - return (!$version_info || (time() - $version_info->timestamp) > AUTO_CHECK_INTERVAL); + return (!$version_info || + (time() - $version_info->timestamp) > upgrade_checker::AUTO_CHECK_INTERVAL); } return false; } -- cgit v1.2.3 From c791ae96d5bb28f39b26a0e556e10e636f97436c Mon Sep 17 00:00:00 2001 From: momo-i Date: Tue, 1 Feb 2011 07:32:44 +0900 Subject: fixed tag broken --- modules/exif/helpers/exif.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules') diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php index 1cdf7d34..f752d336 100644 --- a/modules/exif/helpers/exif.php +++ b/modules/exif/helpers/exif.php @@ -37,6 +37,11 @@ class exif_Core { if (isset($exif_raw[$exifvar[0]][$exifvar[1]])) { $value = $exif_raw[$exifvar[0]][$exifvar[1]]; if (function_exists("mb_detect_encoding") && + function_exists("mb_convert_encoding") && + mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { + $value = mb_convert_encoding($value, "UTF-8", mb_detect_encoding($value)); + } + else if (function_exists("mb_detect_encoding") && mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { $value = utf8_encode($value); } @@ -61,6 +66,11 @@ class exif_Core { if (!empty($iptc[$iptc_key])) { $value = implode(" ", $iptc[$iptc_key]); if (function_exists("mb_detect_encoding") && + function_exists("mb_convert_encoding") && + mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { + $value = mb_convert_encoding($value, "UTF-8", mb_detect_encoding($value)); + } + else if (function_exists("mb_detect_encoding") && mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { $value = utf8_encode($value); } -- cgit v1.2.3 From 68edb2454dcd2044a82d8e8f8a1b96330e6d3b8c Mon Sep 17 00:00:00 2001 From: colings Date: Mon, 21 Feb 2011 15:40:58 -0600 Subject: Added 'item' to parameters passed to graphics rules --- modules/gallery/helpers/gallery_graphics.php | 6 +++--- modules/gallery/helpers/graphics.php | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'modules') diff --git a/modules/gallery/helpers/gallery_graphics.php b/modules/gallery/helpers/gallery_graphics.php index e63b9336..17de4930 100644 --- a/modules/gallery/helpers/gallery_graphics.php +++ b/modules/gallery/helpers/gallery_graphics.php @@ -46,10 +46,10 @@ class gallery_graphics_Core { * @param string $output_file * @param array $options */ - static function resize($input_file, $output_file, $options) { + static function resize($input_file, $output_file, $options, $item) { graphics::init_toolkit(); - module::event("graphics_resize", $input_file, $output_file, $options); + module::event("graphics_resize", $input_file, $output_file, $options, $item); if (@filesize($input_file) == 0) { throw new Exception("@todo EMPTY_INPUT_FILE"); @@ -69,7 +69,7 @@ class gallery_graphics_Core { $image->save($output_file); } - module::event("graphics_resize_completed", $input_file, $output_file, $options); + module::event("graphics_resize_completed", $input_file, $output_file, $options, $item); } /** diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 834211bf..04501132 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -169,9 +169,7 @@ class graphics_Core { } foreach (self::_get_rules($target) as $rule) { - $options = unserialize($rule->args); - $options["parent_id"] = $item->parent_id; - $args = array($working_file, $output_file, $options); + $args = array($working_file, $output_file, unserialize($rule->args), $item); call_user_func_array($rule->operation, $args); $working_file = $output_file; } -- cgit v1.2.3 From ca47b887f5bb8ad311c4ab7e4c71aace37ba88e9 Mon Sep 17 00:00:00 2001 From: colings Date: Wed, 23 Feb 2011 20:31:07 -0600 Subject: Added extra arg to gallery_graphics calls and updated users --- modules/g2_import/helpers/g2_import.php | 2 +- modules/gallery/controllers/quick.php | 2 +- modules/gallery/helpers/gallery_graphics.php | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'modules') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 5fd92972..22fb68c6 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -610,7 +610,7 @@ class g2_import_Core { if ($g2_preferred && $g2_preferred instanceof GalleryDerivative) { if (preg_match("/rotate\|(-?\d+)/", $g2_preferred->getDerivativeOperations(), $matches)) { $tmpfile = tempnam(TMPPATH, "rotate"); - gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $matches[1])); + gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $matches[1]), $item); $item->set_data_file($tmpfile); $item->save(); unlink($tmpfile); diff --git a/modules/gallery/controllers/quick.php b/modules/gallery/controllers/quick.php index 17abc39f..da4768fd 100644 --- a/modules/gallery/controllers/quick.php +++ b/modules/gallery/controllers/quick.php @@ -38,7 +38,7 @@ class Quick_Controller extends Controller { if ($degrees) { $tmpfile = tempnam(TMPPATH, "rotate") . "." . pathinfo($item->file_path(), PATHINFO_EXTENSION); - gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $degrees)); + gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $degrees), $item); $item->set_data_file($tmpfile); $item->save(); unlink($tmpfile); diff --git a/modules/gallery/helpers/gallery_graphics.php b/modules/gallery/helpers/gallery_graphics.php index 17de4930..1f47a65c 100644 --- a/modules/gallery/helpers/gallery_graphics.php +++ b/modules/gallery/helpers/gallery_graphics.php @@ -25,17 +25,17 @@ class gallery_graphics_Core { * @param string $output_file * @param array $options */ - static function rotate($input_file, $output_file, $options) { + static function rotate($input_file, $output_file, $options, $item) { graphics::init_toolkit(); - module::event("graphics_rotate", $input_file, $output_file, $options); + module::event("graphics_rotate", $input_file, $output_file, $options, $item); Image::factory($input_file) ->quality(module::get_var("gallery", "image_quality")) ->rotate($options["degrees"]) ->save($output_file); - module::event("graphics_rotate_completed", $input_file, $output_file, $options); + module::event("graphics_rotate_completed", $input_file, $output_file, $options, $item); } /** @@ -87,11 +87,11 @@ class gallery_graphics_Core { * @param string $output_file * @param array $options */ - static function composite($input_file, $output_file, $options) { + static function composite($input_file, $output_file, $options, $item) { try { graphics::init_toolkit(); - module::event("graphics_composite", $input_file, $output_file, $options); + module::event("graphics_composite", $input_file, $output_file, $options, $item); list ($width, $height) = getimagesize($input_file); list ($w_width, $w_height) = getimagesize($options["file"]); @@ -121,7 +121,7 @@ class gallery_graphics_Core { ->quality(module::get_var("gallery", "image_quality")) ->save($output_file); - module::event("graphics_composite_completed", $input_file, $output_file, $options); + module::event("graphics_composite_completed", $input_file, $output_file, $options, $item); } catch (ErrorException $e) { Kohana_Log::add("error", $e->get_message()); } -- cgit v1.2.3 From e90493aab36e42e0a69a24a8b1f27e4736e32d20 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Wed, 2 Mar 2011 21:11:49 -0700 Subject: Translate user Web Site label. Link web site on user profile page. --- modules/gallery/helpers/gallery_event.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index 07817187..fbdb4ad5 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -539,9 +539,9 @@ class gallery_event_Core { $v = new View("user_profile_info.html"); $fields = array("name" => t("Name"), "locale" => t("Language Preference"), - "email" => t("Email"), "full_name" => t("Full name"), "url" => "Web site"); + "email" => t("Email"), "full_name" => t("Full name"), "url" => t("Web site")); if (!$data->user->guest) { - $fields = array("name" => t("Name"), "full_name" => t("Full name"), "url" => "Web site"); + $fields = array("name" => t("Name"), "full_name" => t("Full name"), "url" => t("Web site")); } $v->user_profile_data = array(); foreach ($fields as $field => $label) { @@ -549,6 +549,8 @@ class gallery_event_Core { $value = $data->user->$field; if ($field == "locale") { $value = locales::display_name($value); + } elseif ($field == "url") { + $value = html::mark_clean(html::anchor($data->user->$field)); } $v->user_profile_data[(string) $label] = $value; } -- cgit v1.2.3 From c38d4695a01c939840357d7f59aa836169571048 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 5 Mar 2011 15:46:04 -0800 Subject: Add missing phpDoc for the extra Item_Model argument to graphics calls and make the param optional. #1646. --- modules/gallery/helpers/gallery_graphics.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/gallery/helpers/gallery_graphics.php b/modules/gallery/helpers/gallery_graphics.php index 1f47a65c..716bad18 100644 --- a/modules/gallery/helpers/gallery_graphics.php +++ b/modules/gallery/helpers/gallery_graphics.php @@ -24,8 +24,9 @@ class gallery_graphics_Core { * @param string $input_file * @param string $output_file * @param array $options + * @param Item_Model $item (optional) */ - static function rotate($input_file, $output_file, $options, $item) { + static function rotate($input_file, $output_file, $options, $item=null) { graphics::init_toolkit(); module::event("graphics_rotate", $input_file, $output_file, $options, $item); @@ -45,8 +46,9 @@ class gallery_graphics_Core { * @param string $input_file * @param string $output_file * @param array $options + * @param Item_Model $item (optional) */ - static function resize($input_file, $output_file, $options, $item) { + static function resize($input_file, $output_file, $options, $item=null) { graphics::init_toolkit(); module::event("graphics_resize", $input_file, $output_file, $options, $item); @@ -86,8 +88,9 @@ class gallery_graphics_Core { * @param string $input_file * @param string $output_file * @param array $options + * @param Item_Model $item (optional) */ - static function composite($input_file, $output_file, $options, $item) { + static function composite($input_file, $output_file, $options, $item=null) { try { graphics::init_toolkit(); -- cgit v1.2.3 From 451ef39d58c64b5387b835b5a8c11b98a5c9659b Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 5 Mar 2011 16:51:20 -0800 Subject: PATH_INFO mangles apostrophe (and other symbols, I'm sure) into a question mark, so any tags containing an apostrophe won't display their contents. Take the simple fix here and change the tag urls to also contain the tag id, which avoids having to add a slug for the tag and all kinds of validation code. Fixes #1636. --- modules/tag/controllers/tag.php | 4 ++-- modules/tag/models/tag.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/tag/controllers/tag.php b/modules/tag/controllers/tag.php index 7aa038c6..8f885dea 100644 --- a/modules/tag/controllers/tag.php +++ b/modules/tag/controllers/tag.php @@ -19,8 +19,8 @@ */ class Tag_Controller extends Controller { public function __call($function, $args) { - $tag_name = $function; - $tag = ORM::factory("tag")->where("name", "=", $tag_name)->find(); + $tag_id = $function; + $tag = ORM::factory("tag")->where("id", "=", $tag_id)->find(); $page_size = module::get_var("gallery", "page_size", 9); $page = (int) Input::instance()->get("page", "1"); $children_count = $tag->items_count(); diff --git a/modules/tag/models/tag.php b/modules/tag/models/tag.php index 53ccc856..479a7da0 100644 --- a/modules/tag/models/tag.php +++ b/modules/tag/models/tag.php @@ -132,7 +132,7 @@ class Tag_Model_Core extends ORM { * @param string $query the query string (eg "page=3") */ public function url($query=null) { - $url = url::site("tag/{$this->name}"); + $url = url::site("tag/{$this->id}/{$this->name}"); if ($query) { $url .= "?$query"; } -- cgit v1.2.3 From 3fd7debd2f5d3e05ffd23d0e1f90119ff50c001b Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 15 Mar 2011 00:53:35 -0700 Subject: Fix a bug where the placeholder %hide-url didn't match the variable in the assoc. array. Follow on for #1624 --- modules/gallery/controllers/admin_upgrade_checker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/controllers/admin_upgrade_checker.php b/modules/gallery/controllers/admin_upgrade_checker.php index a5cfcfc8..29d52a31 100644 --- a/modules/gallery/controllers/admin_upgrade_checker.php +++ b/modules/gallery/controllers/admin_upgrade_checker.php @@ -25,7 +25,7 @@ class Admin_Upgrade_Checker_Controller extends Admin_Controller { if ($message) { $message .= t( " (remind me later)", - array("url" => url::site("admin/upgrade_checker/remind_me_later?csrf=__CSRF__"))); + array("hide-url" => url::site("admin/upgrade_checker/remind_me_later?csrf=__CSRF__"))); site_status::info($message, "upgrade_checker"); } else { site_status::clear("upgrade_checker"); -- cgit v1.2.3 From fa6f233603267505c216abc4f12663d245cd23e7 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 27 Mar 2011 11:31:34 -0700 Subject: Centralize our encoding code into a new helpers and use mb_convert_encoding if possible. Build on the work in c791ae96d5bb28f39b26a0e556e10e636f97436c by momo-i. Fixes #1660. --- modules/exif/helpers/exif.php | 20 ++------------------ modules/gallery/helpers/encoding.php | 32 ++++++++++++++++++++++++++++++++ modules/tag/helpers/tag_event.php | 5 +---- 3 files changed, 35 insertions(+), 22 deletions(-) create mode 100644 modules/gallery/helpers/encoding.php (limited to 'modules') diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php index f752d336..a35a2141 100644 --- a/modules/exif/helpers/exif.php +++ b/modules/exif/helpers/exif.php @@ -36,15 +36,7 @@ class exif_Core { foreach(self::_keys() as $field => $exifvar) { if (isset($exif_raw[$exifvar[0]][$exifvar[1]])) { $value = $exif_raw[$exifvar[0]][$exifvar[1]]; - if (function_exists("mb_detect_encoding") && - function_exists("mb_convert_encoding") && - mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { - $value = mb_convert_encoding($value, "UTF-8", mb_detect_encoding($value)); - } - else if (function_exists("mb_detect_encoding") && - mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { - $value = utf8_encode($value); - } + $value = encoding::convert_to_utf8($value); $keys[$field] = Input::clean($value); if ($field == "DateTime") { @@ -65,15 +57,7 @@ class exif_Core { foreach (array("Keywords" => "2#025", "Caption" => "2#120") as $keyword => $iptc_key) { if (!empty($iptc[$iptc_key])) { $value = implode(" ", $iptc[$iptc_key]); - if (function_exists("mb_detect_encoding") && - function_exists("mb_convert_encoding") && - mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { - $value = mb_convert_encoding($value, "UTF-8", mb_detect_encoding($value)); - } - else if (function_exists("mb_detect_encoding") && - mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { - $value = utf8_encode($value); - } + $value = encoding::convert_to_utf8($value); $keys[$keyword] = Input::clean($value); if ($keyword == "Caption" && !$item->description) { diff --git a/modules/gallery/helpers/encoding.php b/modules/gallery/helpers/encoding.php new file mode 100644 index 00000000..c5928634 --- /dev/null +++ b/modules/gallery/helpers/encoding.php @@ -0,0 +1,32 @@ + Date: Thu, 27 Jan 2011 03:05:40 +0100 Subject: Extend comment module field lenghts to fit IPv6 remote host addresses and long (but legally so) hostnames. --- modules/comment/helpers/comment_installer.php | 19 ++++++++++++++++--- modules/comment/models/comment.php | 4 ++-- 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'modules') diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php index 48b6ee21..cd20ef72 100644 --- a/modules/comment/helpers/comment_installer.php +++ b/modules/comment/helpers/comment_installer.php @@ -37,8 +37,8 @@ class comment_installer { `server_http_referer` varchar(255) default NULL, `server_http_user_agent` varchar(128) default NULL, `server_query_string` varchar(64) default NULL, - `server_remote_addr` varchar(32) default NULL, - `server_remote_host` varchar(64) default NULL, + `server_remote_addr` varchar(40) default NULL, + `server_remote_host` varchar(255) default NULL, `server_remote_port` varchar(16) default NULL, `state` varchar(15) default 'unpublished', `text` text, @@ -48,7 +48,7 @@ class comment_installer { module::set_var("comment", "spam_caught", 0); module::set_var("comment", "access_permissions", "everybody"); - module::set_version("comment", 3); + module::set_version("comment", 4); } static function upgrade($version) { @@ -62,6 +62,19 @@ class comment_installer { module::set_var("comment", "access_permissions", "everybody"); module::set_version("comment", $version = 3); } + + if ($version == 3) { + /* + 40 bytes for server_remote_addr is enough to swallow the longest + representation of an IPv6 addy. + + 255 bytes for server_remote_host is enough to swallow the longest + legit DNS entry, with a few bytes to spare. + */ + $db->query("ALTER TABLE {comments} CHANGE `server_remote_addr` `server_remote_addr` varchar(40)"); + $db->query("ALTER TABLE {comments} CHANGE `server_remote_host` `server_remote_host` varchar(255)"); + module::set_version("comment", $version = 4); + } } static function uninstall() { diff --git a/modules/comment/models/comment.php b/modules/comment/models/comment.php index d5e952eb..7c189a0e 100644 --- a/modules/comment/models/comment.php +++ b/modules/comment/models/comment.php @@ -98,8 +98,8 @@ class Comment_Model_Core extends ORM { $this->server_http_referer = substr($input->server("HTTP_REFERER"), 0, 255); $this->server_http_user_agent = substr($input->server("HTTP_USER_AGENT"), 0, 128); $this->server_query_string = substr($input->server("QUERY_STRING"), 0, 64); - $this->server_remote_addr = substr($input->server("REMOTE_ADDR"), 0, 32); - $this->server_remote_host = substr($input->server("REMOTE_HOST"), 0, 64); + $this->server_remote_addr = substr($input->server("REMOTE_ADDR"), 0, 40); + $this->server_remote_host = substr($input->server("REMOTE_HOST"), 0, 255); $this->server_remote_port = substr($input->server("REMOTE_PORT"), 0, 16); } -- cgit v1.2.3 From c12c43a415cbbe172687f888c1ae388b7f4e4451 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 27 Mar 2011 11:38:37 -0700 Subject: A little more work on kandsten's fix for IPv6 support in 10785b1e820c5e10d982c6b49125903886f7b889: - some style cleanup - bump the module version in module.info - rebuild the installer.sql --- installer/install.sql | 6 +++--- modules/comment/helpers/comment_installer.php | 18 +++++++++--------- modules/comment/module.info | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'modules') diff --git a/installer/install.sql b/installer/install.sql index 865cb2a4..77cda72b 100644 --- a/installer/install.sql +++ b/installer/install.sql @@ -67,8 +67,8 @@ CREATE TABLE {comments} ( `server_http_referer` varchar(255) DEFAULT NULL, `server_http_user_agent` varchar(128) DEFAULT NULL, `server_query_string` varchar(64) DEFAULT NULL, - `server_remote_addr` varchar(32) DEFAULT NULL, - `server_remote_host` varchar(64) DEFAULT NULL, + `server_remote_addr` varchar(40) DEFAULT NULL, + `server_remote_host` varchar(255) DEFAULT NULL, `server_remote_port` varchar(16) DEFAULT NULL, `state` varchar(15) DEFAULT 'unpublished', `text` text, @@ -246,7 +246,7 @@ CREATE TABLE {modules} ( /*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO {modules} VALUES (1,1,'gallery',46,1); INSERT INTO {modules} VALUES (2,1,'user',3,2); -INSERT INTO {modules} VALUES (3,1,'comment',3,3); +INSERT INTO {modules} VALUES (3,1,'comment',4,3); INSERT INTO {modules} VALUES (4,1,'organize',4,4); INSERT INTO {modules} VALUES (5,1,'info',2,5); INSERT INTO {modules} VALUES (6,1,'rss',1,6); diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php index cd20ef72..5c6bd586 100644 --- a/modules/comment/helpers/comment_installer.php +++ b/modules/comment/helpers/comment_installer.php @@ -64,15 +64,15 @@ class comment_installer { } if ($version == 3) { - /* - 40 bytes for server_remote_addr is enough to swallow the longest - representation of an IPv6 addy. - - 255 bytes for server_remote_host is enough to swallow the longest - legit DNS entry, with a few bytes to spare. - */ - $db->query("ALTER TABLE {comments} CHANGE `server_remote_addr` `server_remote_addr` varchar(40)"); - $db->query("ALTER TABLE {comments} CHANGE `server_remote_host` `server_remote_host` varchar(255)"); + // 40 bytes for server_remote_addr is enough to swallow the longest + // representation of an IPv6 addy. + // + // 255 bytes for server_remote_host is enough to swallow the longest + // legit DNS entry, with a few bytes to spare. + $db->query( + "ALTER TABLE {comments} CHANGE `server_remote_addr` `server_remote_addr` varchar(40)"); + $db->query( + "ALTER TABLE {comments} CHANGE `server_remote_host` `server_remote_host` varchar(255)"); module::set_version("comment", $version = 4); } } diff --git a/modules/comment/module.info b/modules/comment/module.info index cd34f140..e5aa454d 100644 --- a/modules/comment/module.info +++ b/modules/comment/module.info @@ -1,3 +1,3 @@ name = "Comments" description = "Allows users and guests to leave comments on photos and albums." -version = 3 +version = 4 -- cgit v1.2.3 From 87ce71eb90588a443c05a6b7e378aca8d0e7b3b3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 27 Mar 2011 11:49:36 -0700 Subject: Sort users in group box by name. Thanks edisonnews! Fixes #1662. --- modules/user/views/admin_users_group.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/user/views/admin_users_group.html.php b/modules/user/views/admin_users_group.html.php index 2362e42b..31b91351 100644 --- a/modules/user/views/admin_users_group.html.php +++ b/modules/user/views/admin_users_group.html.php @@ -17,7 +17,7 @@ users->count_all() > 0): ?>
    - users->find_all() as $i => $user): ?> + users->order_by("name", "ASC")->find_all() as $i => $user): ?>
  • name) ?> special): ?> -- cgit v1.2.3 From 7f62f09cf377b92b615e456ec4539300b331fd4b Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 27 Mar 2011 13:16:41 -0700 Subject: Improve search to use wildcard matching, thanks to some code from tempg. Fixes #1663. --- modules/search/controllers/search.php | 3 ++- modules/search/helpers/search.php | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/search/controllers/search.php b/modules/search/controllers/search.php index eef009a0..75cbaa29 100644 --- a/modules/search/controllers/search.php +++ b/modules/search/controllers/search.php @@ -29,7 +29,8 @@ class Search_Controller extends Controller { $page = 1; } - list ($count, $result) = search::search($q, $page_size, $offset); + $q_with_more_terms = search::add_query_terms($q); + list ($count, $result) = search::search($q_with_more_terms, $page_size, $offset); $max_pages = max(ceil($count / $page_size), 1); diff --git a/modules/search/helpers/search.php b/modules/search/helpers/search.php index 09e5e83f..bbde8feb 100644 --- a/modules/search/helpers/search.php +++ b/modules/search/helpers/search.php @@ -18,6 +18,22 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class search_Core { + /** + * Add more terms to the query by wildcarding the stem value of the first + * few terms in the query. + */ + static function add_query_terms($q) { + $MAX_TERMS = 5; + $terms = explode(" ", $q, $MAX_TERMS); + for ($i = 0; $i < min(count($terms), $MAX_TERMS - 1); $i++) { + // Don't wildcard quoted or already wildcarded terms + if ((substr($terms[$i], 0, 1) != '"') && (substr($terms[$i], -1, 1) != "*")) { + $terms[] = rtrim($terms[$i], "s") . "*"; + } + } + return implode(" ", $terms); + } + static function search($q, $limit, $offset) { $db = Database::instance(); $q = $db->escape($q); -- cgit v1.2.3 From 074f801acdd7d7b1a0a0a5e4ac8c5badfc253cad Mon Sep 17 00:00:00 2001 From: Joe7 Date: Sat, 2 Apr 2011 18:52:54 +0200 Subject: Fix against Ticket #1666 --- modules/tag/helpers/tag_event.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php index efef916f..df81ae65 100644 --- a/modules/tag/helpers/tag_event.php +++ b/modules/tag/helpers/tag_event.php @@ -110,11 +110,11 @@ class tag_event_Core { } static function add_photos_form($album, $form) { - if (!isset($group->uploadify)) { + $group = $form->add_photos; + if (!is_object($group->uploadify)) { return; } - $group = $form->add_photos; $group->input("tags") ->label(t("Add tags to all uploaded files")) ->value(""); @@ -133,7 +133,8 @@ class tag_event_Core { } static function add_photos_form_completed($album, $form) { - if (!isset($group->uploadify)) { + $group = $form->add_photos; + if (!is_object($group->uploadify)) { return; } -- cgit v1.2.3 From f10648fe0af7c2ae682290812cc78568aea23829 Mon Sep 17 00:00:00 2001 From: Joe7 Date: Sat, 2 Apr 2011 20:56:11 +0200 Subject: Sanitize page value before setting offset based on it --- modules/search/controllers/search.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/search/controllers/search.php b/modules/search/controllers/search.php index 75cbaa29..261d67ee 100644 --- a/modules/search/controllers/search.php +++ b/modules/search/controllers/search.php @@ -22,13 +22,14 @@ class Search_Controller extends Controller { $page_size = module::get_var("gallery", "page_size", 9); $q = Input::instance()->get("q"); $page = Input::instance()->get("page", 1); - $offset = ($page - 1) * $page_size; // Make sure that the page references a valid offset if ($page < 1) { $page = 1; } + $offset = ($page - 1) * $page_size; + $q_with_more_terms = search::add_query_terms($q); list ($count, $result) = search::search($q_with_more_terms, $page_size, $offset); -- cgit v1.2.3 From 9d8eef143d781c36870532b48599b3da1ad9dd44 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 2 Apr 2011 15:36:50 -0700 Subject: Fix an outdated reference to $entry->file which went away in v4 of the module. Fixes #1669. --- modules/server_add/controllers/server_add.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/server_add/controllers/server_add.php b/modules/server_add/controllers/server_add.php index 2afa93a7..ea8907f4 100644 --- a/modules/server_add/controllers/server_add.php +++ b/modules/server_add/controllers/server_add.php @@ -286,7 +286,7 @@ class Server_Add_Controller extends Admin_Controller { } catch (Exception $e) { // This can happen if a photo file is invalid, like a BMP masquerading as a .jpg $entry->item_id = 0; - $task->log("Skipping invalid file: {$entry->file}"); + $task->log("Skipping invalid file: {$entry->path}"); } } -- cgit v1.2.3 From 5931cc872d9ed33467712cb4a970bdbaac798ef9 Mon Sep 17 00:00:00 2001 From: mamouneyya Date: Wed, 30 Mar 2011 22:18:06 +0200 Subject: proposed fix for ticket #1664 --- modules/gallery/views/admin_maintenance.html.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules') diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index c28def1d..230e9353 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -3,7 +3,9 @@

    +

    maintenance mode which prevents any non-admin from accessing your Gallery. Some of the tasks below will automatically put your Gallery in maintenance mode for you.") ?> +

    • -- cgit v1.2.3 From 1d0f4b7a430e6c7d8d715a42fb391b8e1afbdf19 Mon Sep 17 00:00:00 2001 From: Andy Lindeman Date: Sun, 3 Apr 2011 15:44:28 -0500 Subject: [Fixes #1574] Render the login form in the same way in every action This makes sure the "Forgot Your Password?" link appears when the HTML form is initially rendered. --- modules/gallery/controllers/login.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/gallery/controllers/login.php b/modules/gallery/controllers/login.php index b203b7d3..fdf5d7b7 100644 --- a/modules/gallery/controllers/login.php +++ b/modules/gallery/controllers/login.php @@ -42,8 +42,9 @@ class Login_Controller extends Controller { public function html() { $view = new Theme_View("page.html", "other", "login"); - $view->page_title = t("Login"); - $view->content = auth::get_login_form("login/auth_html"); + $view->page_title = t("Log in to Gallery"); + $view->content = new View("login_ajax.html"); + $view->content->form = auth::get_login_form("login/auth_html"); print $view; } -- cgit v1.2.3 From 5b927a7083c8886a42519f9199666431bac0b650 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 4 Apr 2011 17:45:09 -0700 Subject: Guard against registered users removing tags from items they don't own. Fixes #1671. --- modules/tag/helpers/tag_item_rest.php | 1 + modules/tag/helpers/tag_items_rest.php | 1 + 2 files changed, 2 insertions(+) (limited to 'modules') diff --git a/modules/tag/helpers/tag_item_rest.php b/modules/tag/helpers/tag_item_rest.php index a8d3d0bc..be1fa653 100644 --- a/modules/tag/helpers/tag_item_rest.php +++ b/modules/tag/helpers/tag_item_rest.php @@ -29,6 +29,7 @@ class tag_item_rest_Core { static function delete($request) { list ($tag, $item) = rest::resolve($request->url); + access::required("edit", $item); $tag->remove($item); $tag->save(); } diff --git a/modules/tag/helpers/tag_items_rest.php b/modules/tag/helpers/tag_items_rest.php index 535ab513..8ed07276 100644 --- a/modules/tag/helpers/tag_items_rest.php +++ b/modules/tag/helpers/tag_items_rest.php @@ -51,6 +51,7 @@ class tag_items_rest_Core { static function delete($request) { list ($tag, $item) = rest::resolve($request->url); + access::required("edit", $item); $tag->remove($item); $tag->save(); } -- cgit v1.2.3 From 916b7543d13bf33ca704dab18ba3d1eca13d9624 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 10 Apr 2011 13:46:28 -0700 Subject: Gracefully degrade in the case where the .build_number file is missing. Fixes #1673. --- modules/gallery/helpers/gallery.php | 16 +++++++++++----- modules/gallery/helpers/gallery_block.php | 1 + modules/gallery/views/upgrade_checker_block.html.php | 4 +++- 3 files changed, 15 insertions(+), 6 deletions(-) (limited to 'modules') diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index 1fafdef7..cbd9b33c 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -193,19 +193,25 @@ class gallery_Core { */ static function version_string() { if (gallery::RELEASE_CHANNEL == "git") { + $build_number = gallery::build_number(); return sprintf( - "%s (branch %s build %s)", gallery::VERSION, gallery::RELEASE_BRANCH, - gallery::build_number()); + "%s (branch %s, %s)", gallery::VERSION, gallery::RELEASE_BRANCH, + $build_number ? " build $build_number" : "unknown build number"); } else { return sprintf("%s (%s)", gallery::VERSION, gallery::CODE_NAME); } } /** - * Return the contents of the .build_number file, which should be a single integer. + * Return the contents of the .build_number file, which should be a single integer + * or return null if the .build_number file is missing. */ static function build_number() { - $result = parse_ini_file(DOCROOT . ".build_number"); - return $result["build_number"]; + $build_file = DOCROOT . ".build_number"; + if (file_exists($build_file)) { + $result = parse_ini_file(DOCROOT . ".build_number"); + return $result["build_number"]; + } + return null; } } \ No newline at end of file diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php index b9ccf25b..0ba7c936 100644 --- a/modules/gallery/helpers/gallery_block.php +++ b/modules/gallery/helpers/gallery_block.php @@ -112,6 +112,7 @@ class gallery_block_Core { $block->content->version_info = upgrade_checker::version_info(); $block->content->auto_check_enabled = upgrade_checker::auto_check_enabled(); $block->content->new_version = upgrade_checker::get_upgrade_message(); + $block->content->build_number = gallery::build_number(); } return $block; } diff --git a/modules/gallery/views/upgrade_checker_block.html.php b/modules/gallery/views/upgrade_checker_block.html.php index b04887b2..c984d99f 100644 --- a/modules/gallery/views/upgrade_checker_block.html.php +++ b/modules/gallery/views/upgrade_checker_block.html.php @@ -6,8 +6,10 @@

      %code_name.", array("version" => gallery::VERSION, "code_name" => gallery::CODE_NAME)) ?> + + gallery::VERSION, "branch" => gallery::RELEASE_BRANCH, "build_number" => $build_number)) ?> - gallery::VERSION, "branch" => gallery::RELEASE_BRANCH, "build_number" => gallery::build_number())) ?> + gallery::VERSION, "branch" => gallery::RELEASE_BRANCH, "build_number" => $build_number)) ?>

      -- cgit v1.2.3 From 9fe20561068fec04c57f7769aaf9ca5025bdc6ac Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 21 Apr 2011 13:59:03 -0700 Subject: Use window.location = "url" instead of window.location.reload() so that we pop back up to the top of the page so that you see the status message. Fixes #1676. --- modules/gallery/views/admin_modules.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index f4ae965c..2cc81b0d 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -6,7 +6,7 @@ dataType: "json", success: function(data) { if (data.reload) { - window.location.reload(); + window.location = ""; } else { $("body").append('
      ' + data.dialog + '
      '); $("#g-dialog").dialog({ -- cgit v1.2.3 From 1af4f99108ffe1ffc2a3ff723c68c5a12dde0223 Mon Sep 17 00:00:00 2001 From: Chris Kelly Date: Thu, 21 Apr 2011 15:57:18 -0400 Subject: Add missing CSS tag so tables get aligned. Fixes #1678. --- modules/gallery/views/admin_languages.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index 01d1ce3f..eef087e1 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -51,7 +51,7 @@ $display_name): ?> - +
      -- cgit v1.2.3 From 5bc0da365221eea08b1525d4cf71371853aa4d15 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 21 Apr 2011 14:33:08 -0700 Subject: Create before_combine and after_combine events to allow modules and themes to interact with the combine list ahead of time, and to be able to do things like minification after it's combined. Fixes #1653. --- modules/gallery/libraries/Gallery_View.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules') diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php index 562f7929..77e3d204 100644 --- a/modules/gallery/libraries/Gallery_View.php +++ b/modules/gallery/libraries/Gallery_View.php @@ -111,6 +111,8 @@ class Gallery_View_Core extends View { $contents = $cache->get($key); if (empty($contents)) { + module::event("before_combine", $type, $this->combine_queue[$type][$group]); + $contents = ""; foreach (array_keys($this->combine_queue[$type][$group]) as $path) { if ($type == "css") { @@ -120,6 +122,8 @@ class Gallery_View_Core extends View { } } + module::event("after_combine", $type, $contents); + $cache->set($key, $contents, array($type), 30 * 84600); $use_gzip = function_exists("gzencode") && @@ -128,6 +132,7 @@ class Gallery_View_Core extends View { $cache->set("{$key}_gz", gzencode($contents, 9, FORCE_GZIP), array($type, "gzip"), 30 * 84600); } + } unset($this->combine_queue[$type][$group]); @@ -158,6 +163,7 @@ class Gallery_View_Core extends View { $replace[] = "url('" . url::abs_file($relative) . "')"; } else { Kohana_Log::add("error", "Missing URL reference '{$match[1]}' in CSS file '$css_file'"); + } } $replace = str_replace(DIRECTORY_SEPARATOR, "/", $replace); -- cgit v1.2.3 From 8cf066b838a98ace3cfa81e02ccc7a8570d1ba7f Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 21 Apr 2011 15:43:48 -0700 Subject: Use Tag_Model::url() instead of hand creating tag urls, since the API changed and that broke. Fixe #1680. --- modules/tag/helpers/tag_event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php index df81ae65..b415b42d 100644 --- a/modules/tag/helpers/tag_event.php +++ b/modules/tag/helpers/tag_event.php @@ -149,7 +149,7 @@ class tag_event_Core { static function info_block_get_metadata($block, $item) { $tags = array(); foreach (tag::item_tags($item) as $tag) { - $tags[] = "name}") . "\">{$tag->name}"; + $tags[] = "url()}\">{$tag->name}"; } if ($tags) { $info = $block->content->metadata; -- cgit v1.2.3 From 08a6df2274ea196056eb7441d4aff050dc3531fa Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 21 Apr 2011 15:50:53 -0700 Subject: Normally Router::find_uri() strips off the url suffix for us, but when we make the theme::$is_admin determination we're working off of the PATH_INFO so we need to strip it off manually. Fixes #1631. --- modules/gallery/helpers/theme.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules') diff --git a/modules/gallery/helpers/theme.php b/modules/gallery/helpers/theme.php index f285834c..a42fa7ad 100644 --- a/modules/gallery/helpers/theme.php +++ b/modules/gallery/helpers/theme.php @@ -41,6 +41,13 @@ class theme_Core { $config = Kohana_Config::instance(); $modules = $config->get("core.modules"); + + // Normally Router::find_uri() strips off the url suffix for us, but we're working off of the + // PATH_INFO here so we need to strip it off manually + if ($suffix = Kohana::config("core.url_suffix")) { + $path = preg_replace("#" . preg_quote($suffix) . "$#u", "", $path); + } + self::$is_admin = $path == "/admin" || !strncmp($path, "/admin/", 7); self::$site_theme_name = module::get_var("gallery", "active_site_theme"); if (self::$is_admin) { -- cgit v1.2.3 From 99fd65ff02d17cbb3ec936b4bdbf2a8c6b0b73e3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 22 Apr 2011 07:55:34 -0700 Subject: Catch the item_updated_data_file() event and rescan. Fixes #1679. --- modules/exif/helpers/exif_event.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules') diff --git a/modules/exif/helpers/exif_event.php b/modules/exif/helpers/exif_event.php index e594c765..72e88041 100644 --- a/modules/exif/helpers/exif_event.php +++ b/modules/exif/helpers/exif_event.php @@ -24,6 +24,12 @@ class exif_event_Core { } } + static function item_updated_data_file($item) { + if (!$item->is_album()) { + exif::extract($item); + } + } + static function item_deleted($item) { db::build() ->delete("exif_records") -- cgit v1.2.3 From 72149b8c68a488e4f935603e6bbf91d2536c2dee Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 22 Apr 2011 08:11:56 -0700 Subject: Urlencode the tag name so that our html is compliant. Fixes #1672. --- modules/tag/models/tag.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/tag/models/tag.php b/modules/tag/models/tag.php index 479a7da0..bd665667 100644 --- a/modules/tag/models/tag.php +++ b/modules/tag/models/tag.php @@ -132,7 +132,7 @@ class Tag_Model_Core extends ORM { * @param string $query the query string (eg "page=3") */ public function url($query=null) { - $url = url::site("tag/{$this->id}/{$this->name}"); + $url = url::site("tag/{$this->id}/" . urlencode($this->name)); if ($query) { $url .= "?$query"; } -- cgit v1.2.3 From 11703b24ffdf38443ac46afbfa65e6f07ec5648e Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 22 Apr 2011 09:28:19 -0700 Subject: Detect if the users theme is missing (or missing a theme.info) and in that case fall back to the wind theme. Fixes #1655. --- modules/gallery/helpers/theme.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'modules') diff --git a/modules/gallery/helpers/theme.php b/modules/gallery/helpers/theme.php index a42fa7ad..37707f28 100644 --- a/modules/gallery/helpers/theme.php +++ b/modules/gallery/helpers/theme.php @@ -50,9 +50,25 @@ class theme_Core { self::$is_admin = $path == "/admin" || !strncmp($path, "/admin/", 7); self::$site_theme_name = module::get_var("gallery", "active_site_theme"); + + // If the site theme doesn't exist, fall back to wind. + if (!file_exists(THEMEPATH . self::$site_theme_name . "/theme.info")) { + site_status::error(t("Theme '%name' is missing. Falling back to the Wind theme.", + array("name" => self::$site_theme_name)), "missing_site_theme"); + module::set_var("gallery", "active_site_theme", self::$site_theme_name = "wind"); + } + if (self::$is_admin) { // Load the admin theme self::$admin_theme_name = module::get_var("gallery", "active_admin_theme"); + + // If the admin theme doesn't exist, fall back to admin_wind. + if (!file_exists(THEMEPATH . self::$admin_theme_name . "/theme.info")) { + site_status::error(t("Admin theme '%name' is missing! Falling back to the Wind theme.", + array("name" => self::$admin_theme_name)), "missing_admin_theme"); + module::set_var("gallery", "active_admin_theme", self::$admin_theme_name = "admin_wind"); + } + array_unshift($modules, THEMEPATH . self::$admin_theme_name); // If the site theme has an admin subdir, load that as a module so that -- cgit v1.2.3 From deb7db6486988ce3e41b2fffd010487fbb67a91f Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 22 Apr 2011 09:29:25 -0700 Subject: Clear the site status for missing themes when we view this page -- if something goes wrong we'll just add it back again anyway. Follow-on for #1655. --- modules/gallery/controllers/admin_themes.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules') diff --git a/modules/gallery/controllers/admin_themes.php b/modules/gallery/controllers/admin_themes.php index cd8a5530..9cdc3db5 100644 --- a/modules/gallery/controllers/admin_themes.php +++ b/modules/gallery/controllers/admin_themes.php @@ -25,6 +25,9 @@ class Admin_Themes_Controller extends Admin_Controller { $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(); + + site_status::clear("missing_site_theme"); + site_status::clear("missing_admin_theme"); print $view; } -- cgit v1.2.3