summaryrefslogtreecommitdiff
path: root/include/controls.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-13 22:16:17 +0300
committerAndrew Dolgov <[email protected]>2021-02-13 22:16:17 +0300
commit103d30ad3f92ed03156fee400801d9a38f946b34 (patch)
treeef9fa7330f7509a60f0edf67314310b6f0b04e93 /include/controls.php
parentc36b2adf8488cdf88b0ef05d211c16815f8c5407 (diff)
batch subscribe: use client dialog
Diffstat (limited to 'include/controls.php')
-rwxr-xr-xinclude/controls.php26
1 files changed, 18 insertions, 8 deletions
diff --git a/include/controls.php b/include/controls.php
index 8f49e99c5..e6678db9a 100755
--- a/include/controls.php
+++ b/include/controls.php
@@ -181,11 +181,19 @@ function print_feed_multi_select($id, $default_ids = [],
}
}
-function print_feed_cat_select($id, $default_id,
- $attributes, $include_all_cats = true, $root_id = null, $nest_level = 0) {
+function print_feed_cat_select($id, $default_id, $attributes, $include_all_cats = true,
+ $root_id = null, $nest_level = 0) {
+
+ print format_feed_cat_select($id, $default_id, $attributes, $include_all_cats, $root_id, $nest_level);
+}
+
+function format_feed_cat_select($id, $default_id, $attributes, $include_all_cats = true,
+ $root_id = null, $nest_level = 0) {
+
+ $ret = "";
if (!$root_id) {
- print "<select id=\"$id\" name=\"$id\" default=\"$default_id\" $attributes>";
+ $ret .= "<select id=\"$id\" name=\"$id\" default=\"$default_id\" $attributes>";
}
$pdo = Db::pdo();
@@ -215,18 +223,18 @@ function print_feed_cat_select($id, $default_id,
$line["title"] = " " . $line["title"];
if ($line["title"])
- printf("<option $is_selected value='%d'>%s</option>",
+ $ret .= sprintf("<option $is_selected value='%d'>%s</option>",
$line["id"], htmlspecialchars($line["title"]));
if ($line["num_children"] > 0)
- print_feed_cat_select($id, $default_id, $attributes,
+ $ret .= format_feed_cat_select($id, $default_id, $attributes,
$include_all_cats, $line["id"], $nest_level+1);
}
if (!$root_id) {
if ($include_all_cats) {
if ($found > 0) {
- print "<option disabled=\"1\">―――――――――――――――</option>";
+ $ret .= "<option disabled=\"1\">―――――――――――――――</option>";
}
if ($default_id == 0) {
@@ -235,10 +243,12 @@ function print_feed_cat_select($id, $default_id,
$is_selected = "";
}
- print "<option $is_selected value=\"0\">".__('Uncategorized')."</option>";
+ $ret .= "<option $is_selected value=\"0\">".__('Uncategorized')."</option>";
}
- print "</select>";
+ $ret .= "</select>";
}
+
+ return $ret;
}
function stylesheet_tag($filename, $id = false) {