Exemple #1
0
 function remove()
 {
     $ids = explode(",", $this->dbh->escape_string($_REQUEST["ids"]));
     foreach ($ids as $id) {
         Pref_Feeds::remove_feed($id, $_SESSION["uid"]);
     }
     return;
 }
Exemple #2
0
 function unsubscribeFeed()
 {
     $feed_id = (int) $this->dbh->escape_string($_REQUEST["feed_id"]);
     $result = $this->dbh->query("SELECT id FROM ttrss_feeds WHERE\n\t\t\tid = '{$feed_id}' AND owner_uid = " . $_SESSION["uid"]);
     if ($this->dbh->num_rows($result) != 0) {
         Pref_Feeds::remove_feed($feed_id, $_SESSION["uid"]);
         $this->wrap(self::STATUS_OK, array("status" => "OK"));
     } else {
         $this->wrap(self::STATUS_ERR, array("error" => "FEED_NOT_FOUND"));
     }
 }