From: Andrew Dolgov Date: Wed, 4 Oct 2006 05:54:03 +0000 (+0100) Subject: clean old feed cat editor code X-Git-Tag: 1.2.4~13 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7750efcc273b9128774b1b0e45ab285a1cedca0a;p=tt-rss.git clean old feed cat editor code --- diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 7e5868ae..695dea20 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -391,15 +391,6 @@ } } -/* if ($subop == "saveCat") { - $cat_title = db_escape_string(trim($_GET["title"])); - $cat_id = db_escape_string($_GET["id"]); - - $result = db_query($link, "UPDATE ttrss_feed_categories SET - title = '$cat_title' WHERE id = '$cat_id' AND owner_uid = ".$_SESSION["uid"]); - -} */ - if ($subop == "remove") { if (!WEB_DEMO_MODE) { @@ -446,64 +437,6 @@ } } -/* if ($subop == "addCat") { - - if (!WEB_DEMO_MODE) { - - $feed_cat = db_escape_string(trim($_GET["cat"])); - - $result = db_query($link, - "SELECT id FROM ttrss_feed_categories - WHERE title = '$feed_cat' AND owner_uid = ".$_SESSION["uid"]); - - if (db_num_rows($result) == 0) { - - $result = db_query($link, - "INSERT INTO ttrss_feed_categories (owner_uid,title) - VALUES ('".$_SESSION["uid"]."', '$feed_cat')"); - - } else { - - print "
- Category $feed_cat already exists in the database. -
"; - } - - - } - } - - if ($subop == "removeCats") { - - if (!WEB_DEMO_MODE) { - - $ids = split(",", db_escape_string($_GET["ids"])); - - foreach ($ids as $id) { - - db_query($link, "BEGIN"); - - $result = db_query($link, - "SELECT count(id) as num_feeds FROM ttrss_feeds - WHERE cat_id = '$id'"); - - $num_feeds = db_fetch_result($result, 0, "num_feeds"); - - if ($num_feeds == 0) { - db_query($link, "DELETE FROM ttrss_feed_categories - WHERE id = '$id' AND owner_uid = " . $_SESSION["uid"]); - } else { - - print "
- Unable to delete non empty feed categories.
"; - - } - - db_query($link, "COMMIT"); - } - } - } */ - if ($subop == "categorize") { if (!WEB_DEMO_MODE) {