summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery')
-rw-r--r--modules/gallery/helpers/gallery_rss.php8
-rw-r--r--modules/gallery/models/item.php8
-rw-r--r--modules/gallery/views/admin_themes.html.php4
3 files changed, 12 insertions, 8 deletions
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>