1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 07:25:54 +00:00

move getArticleFeed to Article

move print_label_select to controls
This commit is contained in:
Andrew Dolgov
2017-05-04 14:26:44 +03:00
parent e60d5b0a84
commit 4122da0290
4 changed files with 38 additions and 36 deletions

View File

@@ -80,7 +80,7 @@ class Article extends Handler_Protected {
WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
}
$feed_id = getArticleFeed($id);
$feed_id = $this->getArticleFeed($id);
ccache_update($feed_id, $_SESSION["uid"]);
}
@@ -371,6 +371,16 @@ class Article extends Handler_Protected {
print json_encode($reply);
}
function getArticleFeed($id) {
$result = db_query("SELECT feed_id FROM ttrss_user_entries
WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
if (db_num_rows($result) != 0) {
return db_fetch_result($result, 0, "feed_id");
} else {
return 0;
}
}
}