issue35, if too many tags are selected and AND condition is used, this will show...
[phpfspot.git] / phpfspot.class.php
index d9e8bbee15b45af37a6749bbf9d35ca3e10a2987..32c2df71cd647ec1fd3f1e6ef4c8f30eae234aba 100644 (file)
@@ -291,7 +291,7 @@ class PHPFSPOT {
       {
          // return all selected tags
          if(isset($_SESSION['selected_tags']) && in_array($tag, $_SESSION['selected_tags'])) {
-            print "<a href=\"javascript:Tags('del', ". $tag .");\" class=\"tag\">". $this->tags[$tag] ."</a>&nbsp;";
+            print "<a href=\"javascript:Tags('del', ". $tag .");\" class=\"tag\">". $this->tags[$tag] ."</a>";
          }
 
       }
@@ -371,6 +371,12 @@ class PHPFSPOT {
          }
          elseif($_SESSION['tag_condition'] == 'and') {
 
+            if(count($_SESSION['selected_tags']) >= 32) {
+               print "A SQLite limit of 32 tables within a JOIN SELECT avoids to<br />\n";
+               print "evaluate your tag selection. Please remove some tags from your selection.\n";
+               return Array();
+            } 
+
             /* Join together a table looking like
 
                pt1.photo_id pt1.tag_id pt2.photo_id pt2.tag_id ...