]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
File basename call lacked a dot
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 22 Jun 2014 15:03:27 +0000 (17:03 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 22 Jun 2014 15:05:11 +0000 (17:05 +0200)
classes/File.php

index acc90d495f7920cdec132ad17ec8c792df4bb5ce..b834036405aba6a3b85c21c5028ac19d924db243 100644 (file)
@@ -245,7 +245,7 @@ class File extends Managed_DataObject
         }
 
         // Normalize and make the original filename more URL friendly.
-        $origname = basename($origname, $ext);
+        $origname = basename($origname, ".$ext");
         if (class_exists('Normalizer')) {
             // http://php.net/manual/en/class.normalizer.php
             // http://www.unicode.org/reports/tr15/
@@ -253,7 +253,7 @@ class File extends Managed_DataObject
         }
         $origname = preg_replace('/[^A-Za-z0-9\.\_]/', '_', $origname);
 
-        $nickname = $profile->nickname;
+        $nickname = $profile->getNickname();
         $datestamp = strftime('%Y%m%d', time());
         do {
             // generate new random strings until we don't run into a filename collision.