show meaningful error message for invalid width, resolves #74
[phpfspot.git] / phpfspot.class.php
index f54a5d69c7a9a96c72d01409c64486b9d67f98f1..92c0fd2e69da2efa3c1d5a86a82f087f346d43dd 100644 (file)
@@ -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
 
 ?>