]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #792 from annando/master
authorfabrixxm <fabrix.xm@gmail.com>
Wed, 23 Oct 2013 07:02:51 +0000 (00:02 -0700)
committerfabrixxm <fabrix.xm@gmail.com>
Wed, 23 Oct 2013 07:02:51 +0000 (00:02 -0700)
Bugfix: The function "exif_imagetype" doesn't seem to be available at every system. So we emulate it.

1  2 
boot.php

diff --combined boot.php
index 2b58d805a5a74b36d9c53d347e4f5c3078cbb03b,af164ec4249caf90b71badd2601806106f584abe..e94cdcd9007fae6b3de8f8c8d977fbc1735a7577
+++ b/boot.php
@@@ -2156,7 -2156,6 +2156,7 @@@ function clear_cache($basepath = "", $p
        if ($cachetime == 0)
                $cachetime = 86400;
  
 +      if (is_writable($path)){
        if ($dh = opendir($path)) {
                while (($file = readdir($dh)) !== false) {
                        $fullpath = $path."/".$file;
                }
                closedir($dh);
        }
 +      }
  }
  
  function set_template_engine(&$a, $engine = 'internal') {
        $a->set_template_engine($engine);
  }
  
+ if(!function_exists('exif_imagetype')) {
+         function exif_imagetype($file) {
+                 $size = getimagesize($file);
+                 return($size[2]);
+         }
+ }