summaryrefslogtreecommitdiff
path: root/classes/article.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-01-24 14:25:31 +0300
committerAndrew Dolgov <[email protected]>2020-01-24 14:25:31 +0300
commit6080cca9ca1de60a5d4a1ef06d4873eca07d9ef2 (patch)
tree3a59a6803fbb38067746895bfcb277d2db688e81 /classes/article.php
parenta6d314b753d7e79da06c733efd5a96caf9b5f562 (diff)
scrap counter cache system; rework counters to sum() booleans instead
Diffstat (limited to 'classes/article.php')
-rwxr-xr-xclasses/article.php73
1 files changed, 0 insertions, 73 deletions
diff --git a/classes/article.php b/classes/article.php
index fc81838ed..74dbdae53 100755
--- a/classes/article.php
+++ b/classes/article.php
@@ -27,69 +27,6 @@ class Article extends Handler_Protected {
}
}
- /*
- function view() {
- $id = clean($_REQUEST["id"]);
- $cids = explode(",", clean($_REQUEST["cids"]));
- $mode = clean($_REQUEST["mode"]);
-
- // in prefetch mode we only output requested cids, main article
- // just gets marked as read (it already exists in client cache)
-
- $articles = array();
-
- if ($mode == "") {
- array_push($articles, $this->format_article($id, false));
- } else if ($mode == "zoom") {
- array_push($articles, $this->format_article($id, true, true));
- } else if ($mode == "raw") {
- if (isset($_REQUEST['html'])) {
- header("Content-Type: text/html");
- print '<link rel="stylesheet" type="text/css" href="css/default.css"/>';
- }
-
- $article = $this->format_article($id, false, isset($_REQUEST["zoom"]));
- print $article['content'];
- return;
- }
-
- $this->catchupArticleById($id, 0);
-
- if (!$_SESSION["bw_limit"]) {
- foreach ($cids as $cid) {
- if ($cid) {
- array_push($articles, $this->format_article($cid, false, false));
- }
- }
- }
-
- print json_encode($articles);
- } */
-
- /*
- private function catchupArticleById($id, $cmode) {
-
- if ($cmode == 0) {
- $sth = $this->pdo->prepare("UPDATE ttrss_user_entries SET
- unread = false,last_read = NOW()
- WHERE ref_id = ? AND owner_uid = ?");
- } else if ($cmode == 1) {
- $sth = $this->pdo->prepare("UPDATE ttrss_user_entries SET
- unread = true
- WHERE ref_id = ? AND owner_uid = ?");
- } else {
- $sth = $this->pdo->prepare("UPDATE ttrss_user_entries SET
- unread = NOT unread,last_read = NOW()
- WHERE ref_id = ? AND owner_uid = ?");
- }
-
- $sth->execute([$id, $_SESSION['uid']]);
-
- $feed_id = $this->getArticleFeed($id);
- CCache::update($feed_id, $_SESSION["uid"]);
- }
- */
-
static function create_published_article($title, $url, $content, $labels_str,
$owner_uid) {
@@ -718,16 +655,6 @@ class Article extends Handler_Protected {
}
$sth->execute(array_merge($ids, [$owner_uid]));
-
- /* update ccache */
-
- $sth = $pdo->prepare("SELECT DISTINCT feed_id FROM ttrss_user_entries
- WHERE ref_id IN ($ids_qmarks) AND owner_uid = ?");
- $sth->execute(array_merge($ids, [$owner_uid]));
-
- while ($line = $sth->fetch()) {
- CCache::update($line["feed_id"], $owner_uid);
- }
}
static function getLastArticleId() {