summaryrefslogtreecommitdiffstats
path: root/rpc.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-01-13 17:45:48 +0100
committerAndreas Unterkircher <unki@netshadow.at>2008-01-13 17:45:48 +0100
commitf95833e6dec7e6ca04e96ec81527a90894904254 (patch)
treed865bffaedd4ae7bc64a4b513693b2c25033a825 /rpc.php
parent213a12dbb00c60ff1873cfec86c9f9c35d86253f (diff)
issue100, switch search to POST HTTP
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
Diffstat (limited to 'rpc.php')
-rw-r--r--rpc.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/rpc.php b/rpc.php
index 1f8698e..b2d258c 100644
--- a/rpc.php
+++ b/rpc.php
@@ -43,10 +43,15 @@ class PHPFSPOT_RPC {
/* if no action is specified, no need to further process this
* function here.
*/
- if(!isset($_GET['action']))
+ if(!isset($_GET['action']) && !isset($_POST['action']))
return;
- switch($_GET['action']) {
+ if(isset($_GET['action']))
+ $action = $_GET['action'];
+ if(isset($_POST['action']))
+ $action = $_POST['action'];
+
+ switch($action) {
case 'showphoto':
if(isset($_GET['id']) && is_numeric($_GET['id'])) {
$fspot->showPhoto($_GET['id']);
@@ -102,7 +107,7 @@ class PHPFSPOT_RPC {
break;
case 'search':
- $fspot->startSearch($_GET['for']);
+ print $fspot->startSearch($_GET['for']);
break;
case 'update_sort_order':