diff options
-rw-r--r-- | .build_number | 2 | ||||
-rw-r--r-- | modules/g2_import/controllers/g2.php | 2 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_rss.php | 8 | ||||
-rw-r--r-- | modules/gallery/models/item.php | 8 | ||||
-rw-r--r-- | modules/gallery/views/admin_themes.html.php | 4 |
5 files changed, 14 insertions, 10 deletions
diff --git a/.build_number b/.build_number index e627526e..a10819e7 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=160 +build_number=163 diff --git a/modules/g2_import/controllers/g2.php b/modules/g2_import/controllers/g2.php index 90984e84..1252014f 100644 --- a/modules/g2_import/controllers/g2.php +++ b/modules/g2_import/controllers/g2.php @@ -34,7 +34,7 @@ class G2_Controller extends Controller { $path = $input->get("path"); $id = $input->get("g2_itemId"); - if ($path || $id) { + if (($path && $path != 'index.php' && $path != 'main.php') || $id) { if ($id) { // Requests by id are either core.DownloadItem or core.ShowItem requests. Later versions of // Gallery 2 don't specify g2_view if it's the default (core.ShowItem). And in some cases diff --git a/modules/gallery/helpers/gallery_rss.php b/modules/gallery/helpers/gallery_rss.php index 612872e6..9af67118 100644 --- a/modules/gallery/helpers/gallery_rss.php +++ b/modules/gallery/helpers/gallery_rss.php @@ -21,6 +21,14 @@ class gallery_rss_Core { static function available_feeds($item, $tag) { $feeds["gallery/latest"] = t("Latest photos and movies"); + + if ($item) { + $feed_item = $item -> is_album() ? $item : $item->parent(); + + $feeds["gallery/album/{$feed_item->id}"] = + t("%title photos and movies", array("title" => $feed_item->title)); + } + return $feeds; } diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 1dd9b00b..cccb7074 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -805,13 +805,9 @@ class Item_Model_Core extends ORM_MPTT { } if ($this->is_photo() && - !preg_match("/^(" . - implode("|", array_map("preg_quote", legal_file::get_photo_extensions())) . - ")\$/i", $ext) || + !in_array(strtolower($ext), array_map("strtolower", legal_file::get_photo_extensions())) || $this->is_movie() && - !preg_match("/^(" . - implode("|", array_map("preg_quote", legal_file::get_movie_extensions())) . - ")\$/i", $ext)) { + !in_array(strtolower($ext), array_map("strtolower", legal_file::get_movie_extensions()))) { $v->add_error("name", "illegal_data_file_extension"); } } diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index 7d947b28..9d53779f 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -48,7 +48,7 @@ <? if (!$count): ?> <p> - <?= t("There are no other site themes available. <a href=\"%url\">Download one now!</a>", array("url" => "http://codex.gallery2.org/Category:Gallery_3:Modules")) ?> + <?= t("There are no other site themes available. <a href=\"%url\">Download one now!</a>", array("url" => "http://codex.gallery2.org/Category:Gallery_3:Themes")) ?> </p> <? endif ?> </div> @@ -88,7 +88,7 @@ <? if (!$count): ?> <p> - <?= t("There are no other admin themes available. <a href=\"%url\">Download one now!</a>", array("url" => "http://codex.gallery2.org/Category:Gallery_3:Modules")) ?> + <?= t("There are no other admin themes available. <a href=\"%url\">Download one now!</a>", array("url" => "http://codex.gallery2.org/Category:Gallery_3:Themes")) ?> </p> <? endif ?> </div> |