changeset 449:3e334425a421

Moar work.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 06 Dec 2013 16:20:34 +0200
parents 882de5f597da
children c7cc689071aa
files admajax.php
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/admajax.php	Fri Dec 06 16:20:18 2013 +0200
+++ b/admajax.php	Fri Dec 06 16:20:34 2013 +0200
@@ -314,10 +314,14 @@
 
 function stGetInfoRotationListEditFull($indent, $outer, $list_id)
 {
+  $sql = stPrepareSQL("SELECT * FROM rotationListData WHERE id=%d", $list_id);
+  if (($data = stFetchSQL($sql)) === false)
+    return "";
+  
   $str =
     ($outer ? $indent."<div class=\"ctrlBox\" id=\"ctrlRotationListEdit\">\n" : "").
     $indent."  <div class=\"ctrlTitle\">Edit rotation list</div>\n".
-    $indent."  ".stGetFormTextInput(30, SET_LEN_ROT_LIST_NAME, "ctrlEDRotationListName", "", "", "")."\n".
+    $indent."  ".stGetFormTextInput(30, SET_LEN_ROT_LIST_NAME, "ctrlEDRotationListName", "", "", $data["name"])."\n".
     $indent."  ".stGetFormButtonInput("updname", "", "", "Save", "updateRotationListName()")."\n".
     "<br />\n".
     stGetOptionListStart("ctrlEDDisplaySlides", $indent."  ", TRUE);
@@ -359,7 +363,9 @@
   if (($res = stExecSQL($sql)) !== false)
   {
     foreach ($res as $item)
+    {
       $str .= $indent."  ".stGetOptionListItem($item["id"], FALSE, $item["title"]);
+    }
   }
 
   $str .= stGetOptionListEnd($indent, $outer);
@@ -788,6 +794,9 @@
         break;
 
       case "infoMain":
+        //
+        // Main information control screen
+        //
         $showMode = stGetDisplayVar("showMode");
         echo
           "<div id=\"ctrlModeControls\">\n".