summaryrefslogtreecommitdiff
path: root/execute.php
diff options
context:
space:
mode:
authorGuillaume Mazoyer <respawneral@gmail.com>2014-08-05 14:37:09 +0200
committerGuillaume Mazoyer <respawneral@gmail.com>2014-08-05 14:37:09 +0200
commitb5de18337a148017f5d3bfa101ee4cc25f2dee98 (patch)
treea39a1afac6821ffc93925dc92d7f3814a2de4a66 /execute.php
parentb5b262d957f1ed42b0252952cb1d5c74d49a49bb (diff)
Add help button.
Add a help button to the parameter field to get more information about the selected command and especially about the parameter needed for the command to be properly executed. The help appears in a modal dialog whose content is updated when a command is selected.
Diffstat (limited to 'execute.php')
-rw-r--r--execute.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/execute.php b/execute.php
index 12d819e..cd94ae6 100644
--- a/execute.php
+++ b/execute.php
@@ -68,6 +68,12 @@ if (!isset($_POST['dontlook']) || !empty($_POST['dontlook'])) {
die('Spam detected');
}
+// Just asked for the documentation
+if (isset($_POST['doc']) && !empty($_POST['doc'])) {
+ $query = htmlspecialchars($_POST['doc']);
+ print json_encode($config['doc'][$query]);
+}
+
if (isset($_POST['query']) && !empty($_POST['query']) &&
isset($_POST['routers']) && !empty($_POST['routers']) &&
isset($_POST['parameters']) && !empty($_POST['parameters'])) {