changeset 152:6e6fba2da3d1

Add some comments.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 25 Oct 2013 02:10:14 +0300
parents a778629edff9
children aecf145e7c70
files showajax.php
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/showajax.php	Thu Oct 24 17:27:01 2013 +0300
+++ b/showajax.php	Fri Oct 25 02:10:14 2013 +0300
@@ -72,6 +72,8 @@
 //
 $updated = FALSE;
 
+
+// Temporary slides are handled globally
 if (stGetDisplayVar("tempDuration") > 0 &&
     stGetDisplayVar("tempSlide") > 0 &&
     stGetDisplayVar("tempSlideSet"))
@@ -89,10 +91,14 @@
   }
 }
 else
+// Otherwise we act according to global show mode
 switch (stGetDisplayVar("showMode"))
 {
   case SMODE_ROTATE:
   default:
+    //
+    // Rotation / normal slide show mode
+    //
     stSetDisplayVar("activeSlideMode", SMODE_ROTATE);
     
     if (stGetDisplayVar("rotateList") == 0)
@@ -140,13 +146,21 @@
     break;
   
   case SMODE_COMPO:
+    //
+    // Competition mode, is controlled from admin UI, so we donẗ
+    // actually do anything here.
+    //
     break;
 }
 
+// Check if we need to update the "last updated" timestamp
 if ($updated)
   stSetDisplayVar("lastUpdate", time());
 
 
+//
+// Serve the request
+//
 $type = stGetRequestItem("type");
 switch (stGetRequestItem("action"))
 {
@@ -185,7 +199,7 @@
           break;
         
         case SMODE_COMPO:
-          // Competition mode
+          // Competition mode, show entry data
           $compo = stFetchSQL(stPrepareSQL(
             "SELECT * FROM compos WHERE id=%d",
             stGetDisplayVar("compoID")));