X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=rpc.php;h=bdb7004ad6de1d6a03ec68c1760077517aa8e67d;hp=d0a6c1c9e088ea68c96153a30705fee9af1371a8;hb=8de7a22ceac0fab9eb984854758608d7aeb079d3;hpb=fc802d09f196e338f7485e38057ec84df5c81bf2;ds=sidebyside diff --git a/rpc.php b/rpc.php index d0a6c1c..bdb7004 100644 --- a/rpc.php +++ b/rpc.php @@ -95,10 +95,18 @@ class PHPFSPOT_RPC { break; case 'search': - $fspot->startSearch($_GET['for'], $_GET['from'], $_GET['to'], $_GET['sort_order']); + $fspot->startSearch($_GET['for'], $_GET['sort_order'], $_GET['from'], $_GET['to']); + + if((isset($_GET['from']) && $fspot->isValidDate($_GET['from'])) && + (isset($_GET['to']) && $fspot->isValidDate($_GET['to']))) { + } + else { + $fspot->startSearch($_GET['for'], $_GET['sort_order']); + } break; case 'get_export': + /* $_GET['mode'] will be validated by getExport() */ $fspot->getExport($_GET['mode']); break;