From 91c83874e518b9106a4d54d8c3bbe28e4c055123 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 25 Apr 2011 22:15:34 -0700 Subject: Fix a bug introduced in 526859d9605d137ebe053ecbd80f46ca6a331194 where we changed the behavior of the slug code and included the file extension, not just the name. This broke Item_Model_Test::move_photo_with_conflicting_target_gets_uniqified_test so yay for unit tests! #1668 --- modules/gallery/models/item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/models') diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index f46db696..2a5e6894 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -336,7 +336,7 @@ class Item_Model_Core extends ORM_MPTT { // Make an url friendly slug from the name, if necessary if (empty($this->slug)) { - $this->slug = item::convert_filename_to_slug($this->name); + $this->slug = item::convert_filename_to_slug(pathinfo($this->name, PATHINFO_FILENAME)); // If the filename is all invalid characters, then the slug may be empty here. Pick a // random value. -- cgit v1.2.3