summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-12-28 12:04:21 +0300
committerAndrew Dolgov <[email protected]>2009-12-28 12:04:21 +0300
commit7e329f13ab74bd283ace97f6a6faf3966ffd7f70 (patch)
treef1ce232fa64c7542480860a6b0b8150ef8e8ca83 /functions.php
parent5163fc709e36417352cb56293e3bdd7aa1b989aa (diff)
add remove_feed() and remove_feed_category()
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index 0c23e7ec7..02521b313 100644
--- a/functions.php
+++ b/functions.php
@@ -6316,4 +6316,31 @@
}
}
}
+
+ function remove_feed($link, $id, $owner_uid) {
+
+ if ($id > 0) {
+ db_query($link, "DELETE FROM ttrss_feeds
+ WHERE id = '$id' AND owner_uid = $owner_uid");
+
+ if (file_exists(ICONS_DIR . "/$id.ico")) {
+ unlink(ICONS_DIR . "/$id.ico");
+ }
+
+ ccache_remove($link, $id, $owner_uid);
+
+ } else {
+ label_remove($link, -11-$id, $owner_uid);
+ ccache_remove($link, -11-$id, $owner_uid);
+ }
+ }
+
+ function remove_feed_category($link, $id, $owner_uid) {
+
+ db_query($link, "DELETE FROM ttrss_feed_categories
+ WHERE id = '$id' AND owner_uid = $owner_uid");
+
+ ccache_remove($link, $id, $owner_uid, true);
+ }
+
?>