summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2012-05-15 15:53:38 -0700
committerBharat Mediratta <bharat@menalto.com>2012-05-15 15:53:38 -0700
commitaac18ef8339054e134fa3e52788a80e6907dfba5 (patch)
tree0cc2d836daa4c3de8ac383633be8b20603cae9cb /modules/gallery/helpers
parent3caf3cc323cd25b002aa8e44d871d4677da7a029 (diff)
Don't allow new albums with a slug that matches a controller - put up a
message telling the user that it's a reserved address. Partial fix for #95.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/album.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php
index 23d59eea..0945e4d9 100644
--- a/modules/gallery/helpers/album.php
+++ b/modules/gallery/helpers/album.php
@@ -40,6 +40,8 @@ class album_Core {
->error_messages("conflict", t("There is already a movie, photo or album with this name"));
$group->input("slug")->label(t("Internet Address"))
->error_messages(
+ "reserved", t("This address is reserved and can't be used."))
+ ->error_messages(
"not_url_safe",
t("The internet address should contain only letters, numbers, hyphens and underscores"))
->error_messages("required", t("You must provide an internet address"))
@@ -76,6 +78,8 @@ class album_Core {
->error_messages(
"conflict", t("There is already a movie, photo or album with this internet address"))
->error_messages(
+ "reserved", t("This address is reserved and can't be used."))
+ ->error_messages(
"not_url_safe",
t("The internet address should contain only letters, numbers, hyphens and underscores"))
->error_messages("required", t("You must provide an internet address"))