on reset also reset tag search result
authorAndreas Unterkircher <unki@netshadow.at>
Sat, 30 Jun 2007 07:59:38 +0000 (07:59 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Sat, 30 Jun 2007 07:59:38 +0000 (07:59 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@139 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.class.php
phpfspot.js
rpc.php

index 13517f2550e14444e209e05a7b795c291cf1731b..89cf0b8bfe56b92f6235fcaebe727d9e3b46c5e8 100644 (file)
@@ -281,6 +281,12 @@ class PHPFSPOT {
 
    } // resetTags()
 
+   public function resetTagSearch()
+   {
+      unset($_SESSION['searchfor']);
+
+   } // resetTagSearch()
+
    public function getPhotoSelection()
    {  
       $tagged_photos = Array();
index 859b198147cb562fb87e8cad795224741d838428..a7b830f9c4828fafa9496c26098655ab120f7992 100644 (file)
@@ -21,7 +21,7 @@ function Tags(mode, id)
       HTML_AJAX.grab(encodeURI('rpc.php?action=deltag&id=' + id));
    }
    else if(mode == "reset") {
-      HTML_AJAX.grab(encodeURI('rpc.php?action=resettags'));
+      HTML_AJAX.grab(encodeURI('rpc.php?action=reset'));
    }
    else if(mode == "condition") {
       setCheckedValue(id, id.value);
diff --git a/rpc.php b/rpc.php
index 80c80b1c53d9225a0c787a688e5040d449cdee15..9b56c48308967dd85ef41e9256919836e4d6bef6 100644 (file)
--- a/rpc.php
+++ b/rpc.php
@@ -66,8 +66,9 @@ class PHPFSPOT_RPC {
             $fspot->delTag($_GET['id']);
             break;
 
-         case 'resettags':
+         case 'reset':
 
+            $fspot->resetTagSearch();
             $fspot->resetTags();
             break;