1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-29 04:47:11 +00:00

add remove_feed() and remove_feed_category()

This commit is contained in:
Andrew Dolgov
2009-12-28 12:04:21 +03:00
parent 5163fc709e
commit 7e329f13ab
2 changed files with 31 additions and 45 deletions

View File

@@ -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);
}
?>