also display an little icon near the "pic is also listed in the following tags"
[phpfspot.git] / phpfspot.class.php
index 13517f2550e14444e209e05a7b795c291cf1731b..fb54eb6cf87258fa7dd9401308919b8b9976a2e0 100644 (file)
@@ -281,6 +281,12 @@ class PHPFSPOT {
 
    } // resetTags()
 
+   public function resetTagSearch()
+   {
+      unset($_SESSION['searchfor']);
+
+   } // resetTagSearch()
+
    public function getPhotoSelection()
    {  
       $tagged_photos = Array();
@@ -507,6 +513,12 @@ class PHPFSPOT {
       if(!file_exists($orig_image))
          return false;
 
+      $details = getimagesize($orig_image);
+      
+      /* check if original photo is a support image type */
+      if(!$this->parent->checkifImageSupported($details['mime']))
+         return false;
+
       $meta = $this->get_meta_informations($orig_image);
 
       $rotate = 0;
@@ -871,6 +883,15 @@ class PHPFSPOT {
 
    } // _debug()
 
+   public function checkifImageSupported($mime)
+   {
+      if(in_array($mime, Array("image/jpeg")))
+         return true;
+
+      return false;
+
+   } // checkifImageSupported()
+
 }
 
 ?>