X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=rpc.php;h=748fd250640326d4ed049fca4736a8d0f657435d;hp=ada2857a1083fbfec0cb70ee7dd206f025d166d0;hb=3eb8cfe677dbd50680ffd1ebcc14aa733feba5b3;hpb=f36faab3aed613fc0e1e10a34a88bf1065c80f79 diff --git a/rpc.php b/rpc.php index ada2857..748fd25 100644 --- a/rpc.php +++ b/rpc.php @@ -135,20 +135,25 @@ class PHPFSPOT_RPC { } break; + case 'update_photo_version': + if(isset($_POST['photo_version']) && is_numeric($_POST['photo_version']) && + isset($_POST['photo_idx']) && is_numeric($_POST['photo_idx'])) { + print $phpfspot->update_photo_version($_POST['photo_idx'], $_POST['photo_version']); + } + break; + case 'get_export': /* $_GET['mode'] will be validated by getExport() */ $phpfspot->getExport($_GET['mode']); break; case 'get_photo_to_show': - $phpfspot->getCurrentPhoto(); + print $phpfspot->get_current_photo(); break; case 'get_calendar_matrix': - if((is_numeric($_GET['year']) || !isset($_GET['year'])) && - (is_numeric($_GET['month']) || !isset($_GET['month'])) && - (is_numeric($_GET['day']) || !isset($_GET['day']))) { - $phpfspot->get_calendar_matrix($_GET['year'], $_GET['month'], $_GET['day']); + if(isset($_GET['date']) && is_string($_GET['date'])) { + $phpfspot->get_calendar_matrix($_GET['date']); } break;