show meaningful error message for invalid width, resolves #74
[phpfspot.git] / phpfspot.class.php
index 5d3521093bb9ad1fc77a58fb87fe533b802cb277..92c0fd2e69da2efa3c1d5a86a82f087f346d43dd 100644 (file)
@@ -122,7 +122,7 @@ class PHPFSPOT {
 
       /* set application name and version information */
       $this->cfg->product = "phpfspot";
-      $this->cfg->version = "1.6";
+      $this->cfg->version = "1.7";
       $this->cfg->db_version = 2;
 
       $this->sort_orders= array(
@@ -3780,6 +3780,22 @@ class PHPFSPOT {
 
    } // get_photo_version_name()
 
+   /**
+    */
+   public function is_valid_width($image_width)
+   {
+      if(in_array($image_width,
+         Array($this->cfg->thumb_width,
+               $this->cfg->photo_width,
+               $this->cfg->mini_width,
+               30)))
+
+         return true;
+
+      return false;
+
+   } // is_valid_width()
+
 } // class PHPFSPOT
 
 ?>