summaryrefslogtreecommitdiffstats
path: root/rpc.php
diff options
context:
space:
mode:
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':