diff options
Diffstat (limited to 'core/models')
-rw-r--r-- | core/models/item.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/models/item.php b/core/models/item.php index 2d53ca0b..8ad22721 100644 --- a/core/models/item.php +++ b/core/models/item.php @@ -165,6 +165,10 @@ class Item_Model extends ORM_MPTT { return; } + if (strpos($new_name, "/")) { + throw new Exception("@todo NAME_CANNOT_CONTAIN_SLASH"); + } + $old_relative_path = $this->relative_path(); $new_relative_path = dirname($old_relative_path) . "/" . $new_name; @rename(VARPATH . "albums/$old_relative_path", VARPATH . "albums/$new_relative_path"); |