sort-order is now set via AJAX, not while submit a search-query
[phpfspot.git] / rpc.php
diff --git a/rpc.php b/rpc.php
index 0bd04fe9d036e1bef630467205bc07849685dd04..1f016336b4102a7f10ebad60d0acc6632665f5fa 100644 (file)
--- a/rpc.php
+++ b/rpc.php
@@ -101,13 +101,19 @@ class PHPFSPOT_RPC {
             break;
 
          case 'search':
             break;
 
          case 'search':
-               $fspot->startSearch($_GET['for'], $_GET['sort_order'], $_GET['from'], $_GET['to']);
+            $fspot->startSearch($_GET['for'], $_GET['from'], $_GET['to']);
             
             if((isset($_GET['from']) && $fspot->isValidDate($_GET['from'])) &&
                (isset($_GET['to']) && $fspot->isValidDate($_GET['to']))) {
             }
             else {
             
             if((isset($_GET['from']) && $fspot->isValidDate($_GET['from'])) &&
                (isset($_GET['to']) && $fspot->isValidDate($_GET['to']))) {
             }
             else {
-               $fspot->startSearch($_GET['for'], $_GET['sort_order']);
+               $fspot->startSearch($_GET['for']);
+            }
+            break;
+
+         case 'update_sort_order':
+            if(isset($_POST['value']) && is_string($_POST['value'])) {
+               print $fspot->updateSortOrder($_POST['value']);
             }
             break;
 
             }
             break;