summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-18 09:28:42 +0100
committerAndrew Dolgov <[email protected]>2009-01-18 09:28:42 +0100
commitceb30ba49d300d53a0693aba7e1f0e4c523aeedc (patch)
treef914db574e5d19af48c997eaf26dc5ff69de7a64 /backend.php
parentabd9b16507fd517dc56af1be0d11d7043063ddc5 (diff)
new style labels (bump schema)
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php50
1 files changed, 0 insertions, 50 deletions
diff --git a/backend.php b/backend.php
index 3e6eea662..3ce3f4b90 100644
--- a/backend.php
+++ b/backend.php
@@ -467,56 +467,6 @@
}
break; // rss
- case "labelFromSearch":
- $search = db_escape_string($_GET["search"]);
- $search_mode = db_escape_string($_GET["smode"]);
- $match_on = db_escape_string($_GET["match"]);
- $is_cat = db_escape_string($_GET["is_cat"]);
- $title = db_escape_string($_GET["title"]);
- $feed = sprintf("%d", $_GET["feed"]);
-
- $label_qparts = array();
-
- $search_expr = getSearchSql($search, $match_on);
-
- if ($is_cat) {
- if ($feed != 0) {
- $search_expr .= " AND ttrss_feeds.cat_id = $feed ";
- } else {
- $search_expr .= " AND ttrss_feeds.cat_id IS NULL ";
- }
- } else {
- if ($search_mode == "all_feeds") {
- // NOOP
- } else if ($search_mode == "this_cat") {
-
- $tmp_result = db_query($link, "SELECT cat_id
- FROM ttrss_feeds WHERE id = '$feed'");
-
- $cat_id = db_fetch_result($tmp_result, 0, "cat_id");
-
- if ($cat_id > 0) {
- $search_expr .= " AND ttrss_feeds.cat_id = $cat_id ";
- } else {
- $search_expr .= " AND ttrss_feeds.cat_id IS NULL ";
- }
- } else {
- $search_expr .= " AND ttrss_feeds.id = $feed ";
- }
-
- }
-
- $search_expr = db_escape_string($search_expr);
-
- print $search_expr;
-
- if ($title) {
- $result = db_query($link,
- "INSERT INTO ttrss_labels (sql_exp,description,owner_uid)
- VALUES ('$search_expr', '$title', '".$_SESSION["uid"]."')");
- }
- break; // labelFromSearch
-
case "getUnread":
$login = db_escape_string($_GET["login"]);