issue106, set link-id for prev- and next-link in photo index view
[phpfspot.git] / rpc.php
diff --git a/rpc.php b/rpc.php
index b2d258c5c0748b1530bcc229d4ebfcafc6232c09..f850dad42e8d61306861f85639965bfe274b0942 100644 (file)
--- a/rpc.php
+++ b/rpc.php
@@ -67,14 +67,14 @@ class PHPFSPOT_RPC {
             break;
 
          case 'addtag':
-            if(isset($_GET['id']) && is_numeric($_GET['id'])) {
-               $fspot->addTag($_GET['id']);
+            if(isset($_POST['id']) && is_numeric($_POST['id'])) {
+               print $fspot->addTag($_POST['id']);
             }
             break;
 
          case 'deltag':
-            if(isset($_GET['id']) && is_numeric($_GET['id'])) {
-               $fspot->delTag($_GET['id']);
+            if(isset($_POST['id']) && is_numeric($_POST['id'])) {
+               print $fspot->delTag($_POST['id']);
             }
             break;
 
@@ -87,8 +87,8 @@ class PHPFSPOT_RPC {
             break;
 
          case 'tagcondition':
-            if(isset($_GET['mode']) && in_array($_GET['mode'], Array('or', 'and'))) {
-               $fspot->setTagCondition($_GET['mode']);
+            if(isset($_POST['mode']) && in_array($_POST['mode'], Array('or', 'and'))) {
+               print $fspot->setTagCondition($_POST['mode']);
             }
             break;
 
@@ -99,6 +99,9 @@ class PHPFSPOT_RPC {
             else {
                unset($_SESSION['begin_with']);
             }
+            if(isset($_GET['last_photo']) && is_numeric($_GET['last_photo']))
+               $_SESSION['last_photo'] = $_GET['last_photo'];
+
             $fspot->showPhotoIndex();
             break;
    
@@ -107,7 +110,7 @@ class PHPFSPOT_RPC {
             break;
 
          case 'search':
-            print $fspot->startSearch($_GET['for']);
+            print $fspot->startSearch();
             break;
 
          case 'update_sort_order':