changeset 675:13ad8e133c22

Rename some functions.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 09 Nov 2014 02:43:34 +0200
parents 3e37a29468bf
children 8104e54bce71
files admajax.php msitegen.inc.php
diffstat 2 files changed, 26 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/admajax.php	Sun Nov 09 02:40:54 2014 +0200
+++ b/admajax.php	Sun Nov 09 02:43:34 2014 +0200
@@ -114,7 +114,7 @@
 
   return
     "  <h2>#".$id." - ".chentities($item["name"])."</h2>\n".
-    "  Type: ".stGetOptionListFromArray("cotype".$id, "  ", FALSE, $compoModeData, $item["ctype"], 0, "updateCompoType(".$id.")").
+    "  Type: ".stGetFormOptionListFromArray("cotype".$id, "  ", FALSE, $compoModeData, $item["ctype"], 0, "updateCompoType(".$id.")").
     " - ".$compoModeData[$item["ctype"]][1]."<br />\n".
     "  Name: ".stGetFormTextInput(40, SET_LEN_COMPO_NAME, "name", $id, $prefix, $item["name"])."<br />\n".
     "  File path: ".stGetFormTextInput(40, SET_LEN_COMPO_PATH, "cpath", $id, $prefix, $item["cpath"])."<br />\n".
@@ -279,14 +279,14 @@
   if ($currShowID <= 0)
     $currShowID = -1;
 
-  $str = stGetOptionListStart("ctrlEntryList", $indent, $outer);
+  $str = stGetFormOptionListStart("ctrlEntryList", $indent, $outer);
 
   if (($res = stExecSQL($sql)) !== false)
   {
     foreach ($res as $item)
     {
       $str .= $indent."  ".
-        stGetOptionListItem($item["show_id"],
+        stGetFormOptionListItem($item["show_id"],
         ($item["show_id"] == $currShowID),
         sprintf("%3d. %-25s by %-15s",
           $item["show_id"],
@@ -295,7 +295,7 @@
     }
   }
   
-  return $str.stGetOptionListEnd($indent, $outer);
+  return $str.stGetFormOptionListEnd($indent, $outer);
 }
 
 
@@ -307,7 +307,7 @@
     "FROM rot_list_data ".
     "ORDER BY id DESC";
 
-  $str = stGetOptionListStart("ctrlRotationLists", $indent, $outer);
+  $str = stGetFormOptionListStart("ctrlRotationLists", $indent, $outer);
   $currListID = stGetDisplayVar("rotateList");
 
   if (($res = stExecSQL($sql)) !== false)
@@ -315,28 +315,28 @@
     foreach ($res as $item)
     {
       $str .= $indent."  ".
-        stGetOptionListItem($item["id"],
+        stGetFormOptionListItem($item["id"],
         ($currListID == $item["id"]),
         $item["name"]." (".$item["nslides"]." slides)");
     }
   }
 
-  return $str.stGetOptionListEnd($indent, $outer);
+  return $str.stGetFormOptionListEnd($indent, $outer);
 }
 
 
 function stGetInfoDisplaySlides($indent, $outer)
 {
-  $str = stGetOptionListStart("ctrlDisplaySlides", $indent, $outer);
+  $str = stGetFormOptionListStart("ctrlDisplaySlides", $indent, $outer);
 
   $sql = "SELECT * FROM display_slides ORDER BY id DESC";
   if (($res = stExecSQL($sql)) !== false)
   {
     foreach ($res as $item)
-      $str .= $indent."  ".stGetOptionListItem($item["id"], FALSE, $item["title"]);
+      $str .= $indent."  ".stGetFormOptionListItem($item["id"], FALSE, $item["title"]);
   }
 
-  return $str.stGetOptionListEnd($indent, $outer);
+  return $str.stGetFormOptionListEnd($indent, $outer);
 }
 
 
@@ -352,17 +352,17 @@
     $indent."  ".stGetFormTextInput(30, SET_LEN_ROT_LIST_NAME, "", "ctrlEDRotationListName", "", $data["name"])."\n".
     $indent."  ".stGetFormButtonInput("updname", "", "", "Save", "updateRotationList(".$list_id.")")."\n".
     "<div>Available slides:</div>\n".
-    stGetOptionListStart("ctrlEDDisplaySlides", $indent."  ", TRUE);
+    stGetFormOptionListStart("ctrlEDDisplaySlides", $indent."  ", TRUE);
 
   $sql = "SELECT * FROM display_slides";
   if (($res = stExecSQL($sql)) !== false)
   {
     foreach ($res as $item)
-      $str .= $indent."    ".stGetOptionListItem($item["id"], FALSE, $item["title"]);
+      $str .= $indent."    ".stGetFormOptionListItem($item["id"], FALSE, $item["title"]);
   }
 
   $str .=
-    stGetOptionListEnd($indent."  ", TRUE).
+    stGetFormOptionListEnd($indent."  ", TRUE).
     "<div>List content:</div>\n".
     stGetInfoRotationListEditData($indent."  ", TRUE, $list_id).
     $indent."  <div class=\"ctrlButtons\">\n".
@@ -387,18 +387,18 @@
     "ORDER BY rot_list_slides.order_num DESC",
     $list_id);
 
-  $str = stGetOptionListStart("ctrlEDRotationList", $indent, $outer);
+  $str = stGetFormOptionListStart("ctrlEDRotationList", $indent, $outer);
 
   if (($res = stExecSQL($sql)) !== false)
   {
     foreach ($res as $item)
     {
       $str .= $indent."  ".
-        stGetOptionListItem($item["id"]."_".$item["order_num"], FALSE, $item["title"]);
+        stGetFormOptionListItem($item["id"]."_".$item["order_num"], FALSE, $item["title"]);
     }
   }
 
-  return $str.stGetOptionListEnd($indent, $outer);
+  return $str.stGetFormOptionListEnd($indent, $outer);
 }
 
 
@@ -970,7 +970,7 @@
           "hit 'Next entry' to activate the first entry to show. <b>Notice! You need to have generated 'show positions' ".
           "before starting compos!</b></div>\n".
           "  <div class=\"ctrlDBox1\">\n".
-          stGetOptionListStart("ctrlCompoList", "    ", TRUE);
+          stGetFormOptionListStart("ctrlCompoList", "    ", TRUE);
 
         $sql =
           "SELECT compos.*, ".
@@ -985,14 +985,14 @@
         {
           foreach ($res as $item)
           {
-            echo "      ".stGetOptionListItem($item["id"],
+            echo "      ".stGetFormOptionListItem($item["id"],
               ($item["id"] == $currCompoID),
               sprintf("%-20s (%d entries)", substr($item["name"], 0, 20), $item["nentries"]));
           }
         }
 
         echo
-          stGetOptionListEnd("    ", TRUE).
+          stGetFormOptionListEnd("    ", TRUE).
           "    <div class=\"ctrlButtons\">\n".
           "      ".stGetFormButtonInput("setcompo", "", "", "Change compo", "activateCompo()")."\n".
           "    </div>\n".
--- a/msitegen.inc.php	Sun Nov 09 02:40:54 2014 +0200
+++ b/msitegen.inc.php	Sun Nov 09 02:43:34 2014 +0200
@@ -266,7 +266,7 @@
 }
 
 
-function stGetOptionListStart($id, $indent, $outer, $size = 10, $onChange = "")
+function stGetFormOptionListStart($id, $indent, $outer, $size = 10, $onChange = "")
 {
   return
     ($outer ? $indent."<div id=\"".$id."\">\n" : "").
@@ -276,7 +276,7 @@
 }
 
 
-function stGetOptionListItem($value, $active, $name)
+function stGetFormOptionListItem($value, $active, $name)
 {
   return
     "<option value=\"".$value."\"".
@@ -285,7 +285,7 @@
 }
 
 
-function stGetOptionListEnd($indent, $outer)
+function stGetFormOptionListEnd($indent, $outer)
 {
   return
     $indent."</select>\n".
@@ -293,18 +293,18 @@
 }
 
 
-function stGetOptionListFromArray($id, $indent, $outer, $data, $active, $size = 10, $onChange = "")
+function stGetFormOptionListFromArray($id, $indent, $outer, $data, $active, $size = 10, $onChange = "")
 {
-  $str = stGetOptionListStart($id, $indent, $outer, $size, $onChange);
+  $str = stGetFormOptionListStart($id, $indent, $outer, $size, $onChange);
 
   foreach ($data as $key => $value)
   {
-    $str .= stGetOptionListItem($key,
+    $str .= stGetFormOptionListItem($key,
       ($key == $active),
       is_array($value) ? $value[0] : $value);
   }
 
-  return $str.stGetOptionListEnd($indent, $outer);
+  return $str.stGetFormOptionListEnd($indent, $outer);
 }