From 6f67421bdbf2c4c92600e1553e855244bdb71ccf Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Sat, 30 Jun 2007 07:59:38 +0000 Subject: [PATCH 1/1] on reset also reset tag search result git-svn-id: file:///var/lib/svn/phpfspot/trunk@139 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- phpfspot.class.php | 6 ++++++ phpfspot.js | 2 +- rpc.php | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/phpfspot.class.php b/phpfspot.class.php index 13517f2..89cf0b8 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -281,6 +281,12 @@ class PHPFSPOT { } // resetTags() + public function resetTagSearch() + { + unset($_SESSION['searchfor']); + + } // resetTagSearch() + public function getPhotoSelection() { $tagged_photos = Array(); diff --git a/phpfspot.js b/phpfspot.js index 859b198..a7b830f 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -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 80c80b1..9b56c48 100644 --- 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; -- 2.25.1