]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/images/extended/class_PngImage.php
Introduced isReachableFilePath() and isReadableFile().
[core.git] / inc / classes / main / images / extended / class_PngImage.php
index 13ae4ca06da2223d5ea124766b56920dc24c6089..ec0b89f18dec2790596940d852ee09e3adc07392 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A PNG image generator
  *
 /**
  * A PNG image generator
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ class PngImage extends BaseImage {
         * @param       $templateInstance       A template instance
         * @return      $imageInstance          An instance of this image class
         */
         * @param       $templateInstance       A template instance
         * @return      $imageInstance          An instance of this image class
         */
-       public final static function createPngImage(CompileableTemplate $templateInstance) {
+       public static final function createPngImage(CompileableTemplate $templateInstance) {
                // Get a new instance
                $imageInstance = new PngImage();
 
                // Get a new instance
                $imageInstance = new PngImage();
 
@@ -65,7 +65,7 @@ class PngImage extends BaseImage {
                $cacheFile = $this->getTemplateInstance()->getImageCacheFqfn();
 
                // Does it exist?
                $cacheFile = $this->getTemplateInstance()->getImageCacheFqfn();
 
                // Does it exist?
-               if (file_exists($cacheFile)) {
+               if (BaseFrameworkSystem::isReadableFile($cacheFile)) {
                        // Remove it
                        @unlink($cacheFile);
                } // END - if
                        // Remove it
                        @unlink($cacheFile);
                } // END - if