diff options
Diffstat (limited to 'modules/pref-labels.php')
-rw-r--r-- | modules/pref-labels.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/modules/pref-labels.php b/modules/pref-labels.php index a744b9f6a..d9cacecc3 100644 --- a/modules/pref-labels.php +++ b/modules/pref-labels.php @@ -93,15 +93,27 @@ } if ($subop == "add") { - $caption = db_escape_string($_REQUEST["caption"]); + $output = db_escape_string($_REQUEST["output"]); if ($caption) { if (label_create($link, $caption)) { - print T_sprintf("Created label <b>%s</b>", htmlspecialchars($caption)); + if (!$output) { + print T_sprintf("Created label <b>%s</b>", htmlspecialchars($caption)); + } } + if ($output == "select") { + header("Content-Type: text/xml"); + + print "<rpc-reply><payload><![CDATA["; + + print_label_select($link, "select_label", + $caption, ""); + + print "]]></payload></rpc-reply>"; + } } return; |