summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-11-17 08:10:31 +0100
committerAndrew Dolgov <[email protected]>2005-11-17 08:10:31 +0100
commitb1895692268f3500b473b63d236e0fd1c427972f (patch)
treedb4c3c8911c2cc6cc9a0f2c4183a1206c708f69c /backend.php
parent36990e3304d7cb30c34cb8b716c224096bf82fa3 (diff)
display help_text in prefs editor
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php25
1 files changed, 22 insertions, 3 deletions
diff --git a/backend.php b/backend.php
index ed497f471..e413fbafb 100644
--- a/backend.php
+++ b/backend.php
@@ -1506,7 +1506,7 @@
if ($op == "pref-prefs") {
- $subop = $_POST["subop"];
+ $subop = $_REQUEST["subop"];
if ($subop == "Save configuration") {
@@ -1546,6 +1546,20 @@
}
+ } else if ($subop == "getHelp") {
+
+ $pref_name = db_escape_string($_GET["pn"]);
+
+ $result = db_query($link, "SELECT help_text FROM ttrss_prefs
+ WHERE pref_name = '$pref_name'");
+
+ if (db_num_rows($result) > 0) {
+ $help_text = db_fetch_result($result, 0, "help_text");
+ print $help_text;
+ } else {
+ print "Unknown option: $pref_name";
+ }
+
} else if ($subop == "Reset to defaults") {
db_query($link, "UPDATE ttrss_prefs SET value = def_value");
@@ -1589,12 +1603,17 @@
print "<tr class=\"$class\">";
- print "<td width=\"40%\">" . $line["short_desc"] . "</td>";
-
$type_name = $line["type_name"];
$pref_name = $line["pref_name"];
$value = $line["value"];
$def_value = $line["def_value"];
+ $help_text = $line["help_text"];
+
+ print "<td width=\"40%\" id=\"$pref_name\">" . $line["short_desc"];
+
+ if ($help_text) print "<div class=\"prefHelp\">$help_text</div>";
+
+ print "</td>";
print "<td>";