]> git.mxchange.org Git - friendica.git/blobdiff - include/Photo.php
Static public is public static
[friendica.git] / include / Photo.php
index 78d448fbc240814eb432888384fc5d548ade937f..343082d1dfa1c8978cc4a6e557ac4f0dc9247b44 100644 (file)
@@ -26,7 +26,7 @@ class Photo {
        /**
         * @brief supported mimetypes and corresponding file extensions
         */
-       static function supportedTypes() {
+       public static function supportedTypes() {
                if (class_exists('Imagick')) {
 
                        // Imagick::queryFormats won't help us a lot there...
@@ -49,7 +49,7 @@ class Photo {
 
        public function __construct($data, $type=null) {
                $this->imagick = class_exists('Imagick');
-               $this->types = $this->supportedTypes();
+               $this->types = static::supportedTypes();
                if (!array_key_exists($type, $this->types)){
                        $type='image/jpeg';
                }
@@ -947,19 +947,6 @@ function store_photo(App $a, $uid, $imagedata = "", $url = "") {
                return(array());
        }
 
-/*
-       $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ",
-               intval($uid)
-       );
-
-       $limit = service_class_fetch($uid,'photo_upload_limit');
-
-       if (($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) {
-               logger("Image exceeds personal limit of uid ".$uid, LOGGER_DEBUG);
-               return(array());
-       }
-*/
-
        $tempfile = tempnam(get_temppath(), "cache");
 
        $stamp1 = microtime(true);