changeset 631:759323b00be3

Fix a silly bug in updating of site settings.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 01 Nov 2014 13:26:45 +0200
parents b84fc6e7847e
children e06be145e487
files admin.php
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/admin.php	Sat Nov 01 07:11:13 2014 +0200
+++ b/admin.php	Sat Nov 01 13:26:45 2014 +0200
@@ -35,14 +35,15 @@
       }
     }
 
-    echo "jsSettingsArgs[".$group["id"]."] = jsMakePostArgs({".implode(",", $args)."}, \"st\", \"\");\n";
+    echo "jsSettingsArgs[".$group["id"]."] = {".implode(",", $args)."};\n";
   }
 
   echo
   "\n".
   "function jsUpdateSettings(id)\n".
   "{\n".
-  "  jsSendPOSTRequest(\"action=update&type=settings&id=\"+id+\"&\"+jsSettingsArgs[id]);\n".
+  "  if (id in jsSettingsArgs)\n".
+  "    jsSendPOSTRequest(\"action=update&type=settings&id=\"+id+\"&\"+jsMakePostArgs(jsSettingsArgs[id], \"st\", \"\"));\n".
   "  return false;\n".
   "}\n".
   "\n";