diff options
Diffstat (limited to 'rpc.php')
-rw-r--r-- | rpc.php | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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': |