From a5819bb35d94e318d3d221dd7bbc4bea36c24ef0 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov
Date: Wed, 13 Jan 2010 12:48:49 +0300
Subject: code cleanup; remove unnecessary callbacks; rework subscribtion
dialog
---
modules/backend-rpc.php | 17 +++++++
modules/popup-dialog.php | 14 +++---
modules/pref-feeds.php | 116 ++++++++++++++++++++++-------------------------
3 files changed, 77 insertions(+), 70 deletions(-)
(limited to 'modules')
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php
index 4bf633d2f..e10a20de3 100644
--- a/modules/backend-rpc.php
+++ b/modules/backend-rpc.php
@@ -3,6 +3,23 @@
$subop = $_REQUEST["subop"];
+ if ($subop == "addfeed") {
+
+ $feed = db_escape_string($_REQUEST['feed']);
+ $cat = db_escape_string($_REQUEST['cat']);
+ $login = db_escape_string($_REQUEST['login']);
+ $pass = db_escape_string($_REQUEST['pass']);
+
+ $rc = subscribe_to_feed($link, $feed, $cat, $login, $pass);
+
+ print "";
+ print "";
+ print "";
+
+ return;
+
+ }
+
if ($subop == "setpref") {
if (WEB_DEMO_MODE) {
return;
diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php
index a035cfe91..b5aae1846 100644
--- a/modules/popup-dialog.php
+++ b/modules/popup-dialog.php
@@ -90,9 +90,9 @@
print "";
- }
+ $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE
+ feed_url = '$feed_url' AND owner_uid = " . $_SESSION["uid"]);
- print "
";
+ $feed_id = db_fetch_result($result, 0, "id");
- print "";
- return;
+ print "";
+
+ if ($feed_id) {
+ print "
";
}
+ print "";
+
+ print "";
+ return;
}
}
@@ -1358,21 +1362,6 @@
print "";
-/* print "
";
-
- if (get_pref($link, 'ENABLE_FEED_CATS')) {
-
- print __('Selection:') . " ";
-
- print_feed_cat_select($link, "sfeed_set_fcat", "", "disabled");
-
- print " ";
- }
-
- print "
"; */
-
} else {
print "";
@@ -1538,4 +1527,5 @@
return $feedctr;
}
+
?>
--
cgit v1.2.3