issue86, unset search-option when tag-result is getting modified
authorAndreas Unterkircher <unki@netshadow.at>
Mon, 31 Dec 2007 16:56:39 +0000 (17:56 +0100)
committerAndreas Unterkircher <unki@netshadow.at>
Mon, 31 Dec 2007 16:56:39 +0000 (17:56 +0100)
phpfspot.class.php

index 6d3ddddc681e83dc4e7c3186c54d9951210c48a9..80f02edd414c124ea5f55e22b0713781701b5c02 100644 (file)
@@ -615,6 +615,9 @@ class PHPFSPOT {
       if(!isset($_SESSION['selected_tags']))
          $_SESSION['selected_tags'] = Array();
 
       if(!isset($_SESSION['selected_tags']))
          $_SESSION['selected_tags'] = Array();
 
+      if(isset($_SESSION['searchfor']))
+         unset($_SESSION['searchfor']);
+
       if(!in_array($tag, $_SESSION['selected_tags']))
          array_push($_SESSION['selected_tags'], $tag);
    
       if(!in_array($tag, $_SESSION['selected_tags']))
          array_push($_SESSION['selected_tags'], $tag);
    
@@ -628,6 +631,9 @@ class PHPFSPOT {
     */
    public function delTag($tag)
    {
     */
    public function delTag($tag)
    {
+      if(isset($_SESSION['searchfor']))
+         unset($_SESSION['searchfor']);
+
       if(isset($_SESSION['selected_tags'])) {
          $key = array_search($tag, $_SESSION['selected_tags']);
          unset($_SESSION['selected_tags'][$key]);
       if(isset($_SESSION['selected_tags'])) {
          $key = array_search($tag, $_SESSION['selected_tags']);
          unset($_SESSION['selected_tags'][$key]);