new icons for original-image and photo-index
[phpfspot.git] / rpc.php
diff --git a/rpc.php b/rpc.php
index b2d258c5c0748b1530bcc229d4ebfcafc6232c09..ad80ca5eedcf2d4f7d8a66aab20b4e2c5315b858 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;