diff options
| author | Nathan Kinkade <nath@nkinka.de> | 2011-05-12 23:48:54 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nath@nkinka.de> | 2011-05-12 23:48:54 +0000 |
| commit | 2ad445441974c64599df496ba4a585415aa41169 (patch) | |
| tree | 49b2860fdac2d2ff16134bfa2aa8d8a972b93301 /modules/gallery/models | |
| parent | 1f7c1f18c651c58048e92d615c71ac0fe6691c10 (diff) | |
| parent | 9aeb824aa1d15bd94bd7cef0a322c4e8a667e67b (diff) | |
Manually merged a conflict after pulling from upstream.
Diffstat (limited to 'modules/gallery/models')
| -rw-r--r-- | modules/gallery/models/item.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 8f4bc5e4..2a5e6894 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -336,9 +336,7 @@ class Item_Model_Core extends ORM_MPTT { // Make an url friendly slug from the name, if necessary if (empty($this->slug)) { - $tmp = pathinfo($this->name, PATHINFO_FILENAME); - $tmp = preg_replace("/[^A-Za-z0-9-_]+/", "-", $tmp); - $this->slug = trim($tmp, "-"); + $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. |
