summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-05-04 14:26:44 +0300
committerAndrew Dolgov <[email protected]>2017-05-04 14:26:44 +0300
commit4122da0290d7bdb85e94b3e4b509be3ee56c6356 (patch)
tree3f79c20aeb007e2373a99bfa10477293307e5804 /include
parente60d5b0a84d8ef1035c1b717124ab8db38f28dfc (diff)
move getArticleFeed to Article
move print_label_select to controls
Diffstat (limited to 'include')
-rw-r--r--include/controls.php25
-rw-r--r--include/functions2.php35
2 files changed, 25 insertions, 35 deletions
diff --git a/include/controls.php b/include/controls.php
index 0c5683082..3ddf4fd9d 100644
--- a/include/controls.php
+++ b/include/controls.php
@@ -300,3 +300,28 @@ function format_inline_player($url, $ctype) {
return "";
}
+
+function print_label_select($name, $value, $attributes = "") {
+
+ $result = db_query("SELECT caption FROM ttrss_labels2
+ WHERE owner_uid = '".$_SESSION["uid"]."' ORDER BY caption");
+
+ print "<select default=\"$value\" name=\"" . htmlspecialchars($name) .
+ "\" $attributes>";
+
+ while ($line = db_fetch_assoc($result)) {
+
+ $issel = ($line["caption"] == $value) ? "selected=\"1\"" : "";
+
+ print "<option value=\"".htmlspecialchars($line["caption"])."\"
+ $issel>" . htmlspecialchars($line["caption"]) . "</option>";
+
+ }
+
+# print "<option value=\"ADD_LABEL\">" .__("Add label...") . "</option>";
+
+ print "</select>";
+
+
+}
+
diff --git a/include/functions2.php b/include/functions2.php
index c89e572f2..e92202350 100644
--- a/include/functions2.php
+++ b/include/functions2.php
@@ -1669,17 +1669,6 @@
return false;
}
- function getArticleFeed($id) {
- $result = db_query("SELECT feed_id FROM ttrss_user_entries
- WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
-
- if (db_num_rows($result) != 0) {
- return db_fetch_result($result, 0, "feed_id");
- } else {
- return 0;
- }
- }
-
/**
* Fixes incomplete URLs by prepending "http://".
* Also replaces feed:// with http://, and
@@ -1825,30 +1814,6 @@
return is_html(fetch_file_contents($url, false, $login, $pass));
}
- function print_label_select($name, $value, $attributes = "") {
-
- $result = db_query("SELECT caption FROM ttrss_labels2
- WHERE owner_uid = '".$_SESSION["uid"]."' ORDER BY caption");
-
- print "<select default=\"$value\" name=\"" . htmlspecialchars($name) .
- "\" $attributes>";
-
- while ($line = db_fetch_assoc($result)) {
-
- $issel = ($line["caption"] == $value) ? "selected=\"1\"" : "";
-
- print "<option value=\"".htmlspecialchars($line["caption"])."\"
- $issel>" . htmlspecialchars($line["caption"]) . "</option>";
-
- }
-
-# print "<option value=\"ADD_LABEL\">" .__("Add label...") . "</option>";
-
- print "</select>";
-
-
- }
-
function format_article_enclosures($id, $always_display_enclosures,
$article_content, $hide_images = false) {