]> git.mxchange.org Git - friendica.git/commitdiff
Function calls
authorAdam Magness <adam.magness@gmail.com>
Mon, 15 Jan 2018 13:32:11 +0000 (08:32 -0500)
committerAdam Magness <adam.magness@gmail.com>
Mon, 15 Jan 2018 13:32:11 +0000 (08:32 -0500)
Rename function, update calls

mod/wall_attach.php
src/Util/Mimetype.php

index 931dcb720024473179ee191d892bb1980fa65917..cfb1558a24caf17bde98d74cdd34c410a3cfbd0d 100644 (file)
@@ -1,11 +1,13 @@
 <?php
-
+/**
+ * @file mod/wall_attach.php
+ */
 use Friendica\App;
 use Friendica\Core\Config;
 use Friendica\Database\DBM;
+use Friendica\Util\Mimetype;
 
-require_once('include/attach.php');
-require_once('include/datetime.php');
+require_once 'include/datetime.php';
 
 function wall_attach_post(App $a) {
 
@@ -117,7 +119,7 @@ function wall_attach_post(App $a) {
        }
 
        $filedata = @file_get_contents($src);
-       $mimetype = z_mime_content_type($filename);
+       $mimetype = Mimetype::getContentType($filename);
        $hash = get_guid(64);
        $created = datetime_convert();
 
index ea3b9e8216c80f97d21df5b0fe82ef006e7147f3..658c4bd06ef962655b6128196ae78649463a574d 100644 (file)
@@ -12,7 +12,7 @@ class Mimetype
         * @param string $filename filename
         * @return mixed array or string
         */
-       public static function contentType($filename)
+       public static function getContentType($filename)
        {
                $mime_types = [