projects
/
phpfspot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make the full photo name available for the lightbox effect
[phpfspot.git]
/
rpc.php
diff --git
a/rpc.php
b/rpc.php
index 1f8698e408d6e4b0cc1fd9468aac7171cf07f91c..f850dad42e8d61306861f85639965bfe274b0942 100644
(file)
--- 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 no action is specified, no need to further process this
* function here.
*/
- if(!isset($_GET['action']))
+ if(!isset($_GET['action'])
&& !isset($_POST['action'])
)
return;
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']);
case 'showphoto':
if(isset($_GET['id']) && is_numeric($_GET['id'])) {
$fspot->showPhoto($_GET['id']);
@@
-62,14
+67,14
@@
class PHPFSPOT_RPC {
break;
case 'addtag':
break;
case 'addtag':
- if(isset($_
GET['id']) && is_numeric($_GE
T['id'])) {
-
$fspot->addTag($_GE
T['id']);
+ if(isset($_
POST['id']) && is_numeric($_POS
T['id'])) {
+
print $fspot->addTag($_POS
T['id']);
}
break;
case 'deltag':
}
break;
case 'deltag':
- if(isset($_
GET['id']) && is_numeric($_GE
T['id'])) {
-
$fspot->delTag($_GE
T['id']);
+ if(isset($_
POST['id']) && is_numeric($_POS
T['id'])) {
+
print $fspot->delTag($_POS
T['id']);
}
break;
}
break;
@@
-82,8
+87,8
@@
class PHPFSPOT_RPC {
break;
case 'tagcondition':
break;
case 'tagcondition':
- if(isset($_
GET['mode']) && in_array($_GE
T['mode'], Array('or', 'and'))) {
-
$fspot->setTagCondition($_GE
T['mode']);
+ if(isset($_
POST['mode']) && in_array($_POS
T['mode'], Array('or', 'and'))) {
+
print $fspot->setTagCondition($_POS
T['mode']);
}
break;
}
break;
@@
-94,6
+99,9
@@
class PHPFSPOT_RPC {
else {
unset($_SESSION['begin_with']);
}
else {
unset($_SESSION['begin_with']);
}
+ if(isset($_GET['last_photo']) && is_numeric($_GET['last_photo']))
+ $_SESSION['last_photo'] = $_GET['last_photo'];
+
$fspot->showPhotoIndex();
break;
$fspot->showPhotoIndex();
break;
@@
-102,7
+110,7
@@
class PHPFSPOT_RPC {
break;
case 'search':
break;
case 'search':
-
$fspot->startSearch($_GET['for']
);
+
print $fspot->startSearch(
);
break;
case 'update_sort_order':
break;
case 'update_sort_order':