summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/item.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-06-10 18:49:29 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-06-10 18:49:29 -0700
commit58b21e909d8ba628ddb8a19e732989821abb0283 (patch)
tree508fed676f58eee4ef7ad565be70d2ed16521af7 /modules/gallery/helpers/item.php
parent26d0af45eabe962c5366cb1e95de7e252b831796 (diff)
Change the pattern used to convert the file name to a title. Fixes ticket#1061
Diffstat (limited to 'modules/gallery/helpers/item.php')
-rw-r--r--modules/gallery/helpers/item.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php
index bbbe1058..15bbe977 100644
--- a/modules/gallery/helpers/item.php
+++ b/modules/gallery/helpers/item.php
@@ -136,7 +136,7 @@ class item_Core {
*/
static function convert_filename_to_title($filename) {
$title = strtr($filename, "_", " ");
- $title = preg_replace("/\..*?$/", "", $title);
+ $title = preg_replace("/\..{3,4}$/", "", $title);
$title = preg_replace("/ +/", " ", $title);
return $title;
}