diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-05-16 04:32:00 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-16 04:32:00 +0000 |
| commit | 930452aa6b93755003d4ce28143fccb4f23801b0 (patch) | |
| tree | e0c6c39f70ccd9a04024a32e75fa313852ea8f4c /core/helpers/photo.php | |
| parent | 33f1187220404bca6597de5368048316ece5139a (diff) | |
Support renaming albums, photos and movies.
Fixes ticket #278.
Diffstat (limited to 'core/helpers/photo.php')
| -rw-r--r-- | core/helpers/photo.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/helpers/photo.php b/core/helpers/photo.php index 6467e797..0015bd99 100644 --- a/core/helpers/photo.php +++ b/core/helpers/photo.php @@ -129,7 +129,9 @@ class photo_Core { $group->input("title")->label(t("Title"))->value($photo->title); $group->textarea("description")->label(t("Description"))->value($photo->description); $group->input("filename")->label(t("Filename"))->value($photo->name) - ->error_messages("conflict", t("There is already a file with this name")); + ->callback("item::validate_no_slashes") + ->error_messages("conflict", t("There is already a file with this name")) + ->error_messages("no_slashes", t("The directory name can't contain the \"/\" character")); $group->submit("")->value(t("Modify")); $form->add_rules_from(ORM::factory("item")); return $form; |
