From 7679811a3143b5e05f78abb0e8ac816c87a36c3a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 16 May 2009 03:37:14 +0000 Subject: Item_Model::rename() cannot accept new filenames that contain "/" --- core/models/item.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/models/item.php') 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"); -- cgit v1.2.3