summaryrefslogtreecommitdiff
path: root/modules/gallery/models
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2011-04-22 15:02:38 -0700
committerTim Almdal <tnalmdal@shaw.ca>2011-04-22 15:02:38 -0700
commitb10e6f66710c25fe2ed71880e9aaffbf41ecb5a4 (patch)
tree73bf33317258fa2db62189e7cceb0d4ed81bc97d /modules/gallery/models
parentd7e299015222ba20ed6df7c572fb8bca7e252010 (diff)
parentb9a720e86bcaeab19aca81ee2af2b5c12fda1c55 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/models')
-rw-r--r--modules/gallery/models/item.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php
index 8f4bc5e4..f46db696 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($this->name);
// If the filename is all invalid characters, then the slug may be empty here. Pick a
// random value.