don't try to show non existing images in index matrix
[phpfspot.git] / rpc.php
diff --git a/rpc.php b/rpc.php
index 2bb96280344ec53164e1ebc6bbea756e6854446d..cffb4edaa6f48addba713962afb7c114a9adede2 100644 (file)
--- a/rpc.php
+++ b/rpc.php
@@ -45,10 +45,39 @@ class PHPFSPOT_RPC {
       switch($_GET['action']) {
          case 'showphoto':
 
-            $fspot->prepare_single_photo($_GET['id']);
-            $fspot->tmpl->show("body.tpl");
+            $fspot->showPhoto($_GET['id']);
+            break;
+   
+         case 'show_available_tags':
 
+            $fspot->getAvailableTags();
             break;
+
+         case 'show_selected_tags':
+
+            $fspot->getSelectedTags();
+            break;
+
+         case 'addtag':
+
+            $fspot->addTag($_GET['id']);
+            break;
+
+         case 'deltag':
+
+            $fspot->delTag($_GET['id']);
+            break;
+
+         case 'resettags':
+
+            $fspot->resetTags();
+            break;
+
+         case 'show_photo_index':
+
+            $fspot->showPhotoIndex();
+            break;
+
       }
 
    } // process_ajax_request();