issue100, add/remove tag and tag-condition use HTTP POST
[phpfspot.git] / phpfspot.class.php
index 9a74a9a078a2484f09978f9eb5b891b7464cd8f3..8646ff1d0b06f8bd7d9f8629f86a40b715f479bf 100644 (file)
@@ -643,6 +643,9 @@ class PHPFSPOT {
 
       if(!in_array($tag, $_SESSION['selected_tags']))
          array_push($_SESSION['selected_tags'], $tag);
+
+
+      return "ok";
    
    } // addTag()
 
@@ -663,6 +666,8 @@ class PHPFSPOT {
          sort($_SESSION['selected_tags']);
       }
 
+      return "ok";
+
    } // delTag()
 
    /**
@@ -1447,6 +1452,8 @@ class PHPFSPOT {
    {
       $_SESSION['tag_condition'] = $mode;
 
+      return "ok";
+
    } // setTagCondition()
 
    /** 
@@ -1460,19 +1467,19 @@ class PHPFSPOT {
     */
    public function startSearch($searchfor_tag, $from = 0, $to = 0)
    {
-      if(isset($_GET['from']) && $fspot->isValidDate($_GET['from'])) {
-         $from = $_GET['from'];
+      if(isset($_POST['from']) && $this->isValidDate($_POST['from'])) {
+         $from = $_POST['from'];
       }
-      if(isset($_GET['to']) && $fspot->isValidDate($_GET['to'])) {
-         $to = $_GET['to'];
+      if(isset($_POST['to']) && $this->isValidDate($_POST['to'])) {
+         $to = $_POST['to'];
       }
 
-      if(isset($_GET['for_tag']) && is_string($_GET['for_tag'])) {
-         $searchfor_tag = $_GET['for_tag'];
+      if(isset($_POST['for_tag']) && is_string($_POST['for_tag'])) {
+         $searchfor_tag = $_POST['for_tag'];
       }
 
-      if(isset($_GET['for_name']) && is_string($_GET['for_name'])) {
-         $searchfor_name = $_GET['for_name'];
+      if(isset($_POST['for_name']) && is_string($_POST['for_name'])) {
+         $searchfor_name = $_POST['for_name'];
       }
 
       $this->get_tags();
@@ -1499,6 +1506,8 @@ class PHPFSPOT {
          }
       }
 
+      return "ok";
+
    } // startSearch()
 
    /**