$enabled_feeds = $this->host->get($this, "enabled_feeds");
if (!array($enabled_feeds)) $enabled_feeds = array();
+ $enabled_feeds = $this->filter_unknown_feeds($enabled_feeds);
+ $this->host->set($this, "enabled_feeds", $enabled_feeds);
+
if (count($enabled_feeds) > 0) {
print "<h3>" . __("Currently enabled for (click to edit):") . "</h3>";
return 2;
}
+ private function filter_unknown_feeds($enabled_feeds) {
+ $tmp = array();
+
+ foreach ($enabled_feeds as $feed) {
+
+ $result = db_query("SELECT id FROM ttrss_feeds WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]);
+
+ if (db_num_rows($result) != 0) {
+ array_push($tmp, $feed);
+ }
+ }
+
+ return $tmp;
+ }
+
}
?>