1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-25 21:21:29 +00:00

properly handle on-the-fly adding of labels

This commit is contained in:
Andrew Dolgov
2010-11-09 13:14:59 +03:00
parent 3acc0da647
commit 10249c41b7
4 changed files with 42 additions and 13 deletions

View File

@@ -523,14 +523,14 @@
$result = db_query($link, "SELECT caption FROM ttrss_labels2
WHERE owner_uid = '".$_SESSION["uid"]."' ORDER BY caption");
print "<select default=\"$value\" name=\"$name\" style=\"$style\"
onchange=\"labelSelectOnChange(this)\" >";
print "<select default=\"$value\" name=\"" . htmlspecialchars($name) .
"\" style=\"$style\" onchange=\"labelSelectOnChange(this)\" >";
while ($line = db_fetch_assoc($result)) {
$issel = ($line["caption"] == $value) ? "selected" : "";
$issel = ($line["caption"] == $value) ? "selected=\"1\"" : "";
print "<option $issel>" . $line["caption"] . "</option>";
print "<option $issel>" . htmlspecialchars($line["caption"]) . "</option>";
}

View File

@@ -107,12 +107,12 @@
if ($output == "select") {
header("Content-Type: text/xml");
print "<rpc-reply><payload><![CDATA[";
print "<rpc-reply><payload>";
print_label_select($link, "select_label",
$caption, "");
print "]]></payload></rpc-reply>";
print "</payload></rpc-reply>";
}
}