changeset 249:6927edc7e266

Get compo name list as JSON.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 24 Nov 2013 00:25:03 +0200
parents 8d46f1358233
children 34f540cea1ff
files admajax.php
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/admajax.php	Sun Nov 24 00:24:38 2013 +0200
+++ b/admajax.php	Sun Nov 24 00:25:03 2013 +0200
@@ -276,9 +276,11 @@
         break;
       
       case "entries":
+        $index = 0;
         foreach (stExecSQL("SELECT * FROM compos") as $compo)
         {
-          echo "registerTab(\"CM\",\"Compo".$compo["id"]."\",\"".chentities($compo["name"])."\");";
+          if ($index++ > 0) echo ",";
+          echo "\"Compo".$compo["id"]."\":\"".chentities($compo["name"])."\"";
         }
         break;