]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Add missing image functions to PHP extension functions list
authorJakub Vrana <jakub@vrana.cz>
Thu, 28 Mar 2013 05:04:37 +0000 (05:04 +0000)
committerJakub Vrana <jakub@vrana.cz>
Thu, 28 Mar 2013 05:04:37 +0000 (05:04 +0000)
Summary:
Copied from PHP Manual.

Also fix missing cache key for implicitly linted file.

Test Plan:
  phabricator/ $ arc lint src/applications/files/PhabricatorImageTransformer.php # without GD2

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan
Differential Revision: https://secure.phabricator.com/D5457

scripts/php_extension_functions.txt
src/workflow/ArcanistLintWorkflow.php

index 12170be106bbea347e14bc8a05a5a830bea7004b..a540920f464ffb72f8e27f03f84d3932532066dc 100644 (file)
@@ -111,6 +111,7 @@ imagecreatefrompng
 imagecreatefromstring
 imagecreatefromwbmp
 imagecreatefromxbm
+imagecreatefromxpm
 imagecreatetruecolor
 imagedashedline
 imagedestroy
@@ -124,10 +125,14 @@ imagefilltoborder
 imagefilter
 imagefontheight
 imagefontwidth
+imageftbbox
+imagefttext
 imagegammacorrect
 imagegd
 imagegd2
 imagegif
+imagegrabscreen
+imagegrabwindow
 imageinterlace
 imageistruecolor
 imagejpeg
@@ -137,6 +142,13 @@ imageloadfont
 imagepalettecopy
 imagepng
 imagepolygon
+imagepsbbox
+imagepsencodefont
+imagepsextendfont
+imagepsfreefont
+imagepsloadfont
+imagepsslantfont
+imagepstext
 imagerectangle
 imagerotate
 imagesavealpha
@@ -150,6 +162,8 @@ imagestringup
 imagesx
 imagesy
 imagetruecolortopalette
+imagettfbbox
+imagettftext
 imagetypes
 imagewbmp
 imagexbm
index b79452e1102131ebb31376648e4e8a4b0ceed385..054e409edc3ac0c44e08c059dd63f9d85fdc4e1b 100644 (file)
@@ -548,7 +548,10 @@ EOTEXT
             $cached_path[] = $message->toDictionary();
           }
         }
-        $hash = $file_hashes[$abs_path];
+        $hash = idx($file_hashes, $abs_path);
+        if (!$hash) {
+          $hash = md5_file($abs_path);
+        }
         $cached[$path] = array($hash => array($version => $cached_path));
       }
       $cache[$this->getCacheKey()] = $cached;