summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-04-25 22:15:34 -0700
committerBharat Mediratta <bharat@menalto.com>2011-04-25 22:15:34 -0700
commit91c83874e518b9106a4d54d8c3bbe28e4c055123 (patch)
tree1875e7c79ce9350573cd308744a96a1d842a07b8 /modules
parent858e3a15b9615d1f0131261310d3ec9846f5e44c (diff)
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
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/models/item.php2
1 files changed, 1 insertions, 1 deletions
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.