]> git.wh0rd.org Git - tt-rss.git/commitdiff
move counter cache to a separate class
authorAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Thu, 4 May 2017 12:22:57 +0000 (15:22 +0300)
committerAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Thu, 4 May 2017 12:22:57 +0000 (15:22 +0300)
fix references to get_article_tags

classes/api.php
classes/article.php
classes/ccache.php [new file with mode: 0644]
classes/feeds.php
classes/handler/public.php
classes/pref/feeds.php
include/ccache.php [deleted file]
include/functions.php
include/rssfuncs.php

index 6c7823a8f243bc154750a655089d35c136f2fa2f..31dd3c086a3fba5baed841db8e2cda13af201df7 100644 (file)
@@ -297,7 +297,7 @@ class API extends Handler {
                                        WHERE ref_id IN ($article_ids)");
 
                                while ($line = $this->dbh->fetch_assoc($result)) {
-                                       ccache_update($line["feed_id"], $_SESSION["uid"]);
+                                       CCache::update($line["feed_id"], $_SESSION["uid"]);
                                }
                        }
 
index 7924ded35be503ee0c3dfbbdbed8dc136f173f81..6d881f50ed2b2b94c9daeb5ae0ec43ea97acd193 100644 (file)
@@ -81,7 +81,7 @@ class Article extends Handler_Protected {
                }
 
                $feed_id = $this->getArticleFeed($id);
-               ccache_update($feed_id, $_SESSION["uid"]);
+               CCache::update($feed_id, $_SESSION["uid"]);
        }
 
        static function create_published_article($title, $url, $content, $labels_str,
@@ -544,7 +544,7 @@ class Article extends Handler_Protected {
                                SET unread = false,last_read = NOW()
                                WHERE ref_id = '$id' AND owner_uid = $owner_uid");
 
-                       ccache_update($feed_id, $owner_uid);
+                       CCache::update($feed_id, $owner_uid);
                }
 
                $result = db_query("SELECT id,title,link,content,feed_id,comments,int_id,lang,
@@ -909,7 +909,7 @@ class Article extends Handler_Protected {
                        WHERE ($ids_qpart) AND owner_uid = $owner_uid");
 
                while ($line = db_fetch_assoc($result)) {
-                       ccache_update($line["feed_id"], $owner_uid);
+                       CCache::update($line["feed_id"], $owner_uid);
                }
        }
 
diff --git a/classes/ccache.php b/classes/ccache.php
new file mode 100644 (file)
index 0000000..4efb96d
--- /dev/null
@@ -0,0 +1,228 @@
+<?php
+class CCache {
+       /* function ccache_zero($feed_id, $owner_uid) {
+               db_query("UPDATE ttrss_counters_cache SET
+                       value = 0, updated = NOW() WHERE
+                       feed_id = '$feed_id' AND owner_uid = '$owner_uid'");
+       } */
+
+       static function zero_all($owner_uid) {
+               db_query("UPDATE ttrss_counters_cache SET
+                       value = 0 WHERE owner_uid = '$owner_uid'");
+
+               db_query("UPDATE ttrss_cat_counters_cache SET
+                       value = 0 WHERE owner_uid = '$owner_uid'");
+       }
+
+       static function remove($feed_id, $owner_uid, $is_cat = false) {
+
+               if (!$is_cat) {
+                       $table = "ttrss_counters_cache";
+               } else {
+                       $table = "ttrss_cat_counters_cache";
+               }
+
+               db_query("DELETE FROM $table WHERE
+                       feed_id = '$feed_id' AND owner_uid = '$owner_uid'");
+
+       }
+
+       static function update_all($owner_uid) {
+
+               if (get_pref('ENABLE_FEED_CATS', $owner_uid)) {
+
+                       $result = db_query("SELECT feed_id FROM ttrss_cat_counters_cache
+                               WHERE feed_id > 0 AND owner_uid = '$owner_uid'");
+
+                       while ($line = db_fetch_assoc($result)) {
+                               CCache::update($line["feed_id"], $owner_uid, true);
+                       }
+
+                       /* We have to manually include category 0 */
+
+                       CCache::update(0, $owner_uid, true);
+
+               } else {
+                       $result = db_query("SELECT feed_id FROM ttrss_counters_cache
+                               WHERE feed_id > 0 AND owner_uid = '$owner_uid'");
+
+                       while ($line = db_fetch_assoc($result)) {
+                               print CCache::update($line["feed_id"], $owner_uid);
+
+                       }
+
+               }
+       }
+
+       static function find($feed_id, $owner_uid, $is_cat = false,
+                                                $no_update = false) {
+
+               if (!is_numeric($feed_id)) return;
+
+               if (!$is_cat) {
+                       $table = "ttrss_counters_cache";
+                       /* if ($feed_id > 0) {
+                               $tmp_result = db_query("SELECT owner_uid FROM ttrss_feeds
+                                       WHERE id = '$feed_id'");
+                               $owner_uid = db_fetch_result($tmp_result, 0, "owner_uid");
+                       } */
+               } else {
+                       $table = "ttrss_cat_counters_cache";
+               }
+
+               if (DB_TYPE == "pgsql") {
+                       $date_qpart = "updated > NOW() - INTERVAL '15 minutes'";
+               } else if (DB_TYPE == "mysql") {
+                       $date_qpart = "updated > DATE_SUB(NOW(), INTERVAL 15 MINUTE)";
+               }
+
+               $result = db_query("SELECT value FROM $table
+                       WHERE owner_uid = '$owner_uid' AND feed_id = '$feed_id'
+                       LIMIT 1");
+
+               if (db_num_rows($result) == 1) {
+                       return db_fetch_result($result, 0, "value");
+               } else {
+                       if ($no_update) {
+                               return -1;
+                       } else {
+                               return CCache::update($feed_id, $owner_uid, $is_cat);
+                       }
+               }
+
+       }
+
+       static function update($feed_id, $owner_uid, $is_cat = false,
+                                                  $update_pcat = true, $pcat_fast = false) {
+
+               if (!is_numeric($feed_id)) return;
+
+               /* if (!$is_cat && $feed_id > 0) {
+                       $tmp_result = db_query("SELECT owner_uid FROM ttrss_feeds
+                               WHERE id = '$feed_id'");
+                       $owner_uid = db_fetch_result($tmp_result, 0, "owner_uid");
+               } */
+
+               $prev_unread = CCache::find($feed_id, $owner_uid, $is_cat, true);
+
+               /* When updating a label, all we need to do is recalculate feed counters
+                * because labels are not cached */
+
+               if ($feed_id < 0) {
+                       CCache::update_all($owner_uid);
+                       return;
+               }
+
+               if (!$is_cat) {
+                       $table = "ttrss_counters_cache";
+               } else {
+                       $table = "ttrss_cat_counters_cache";
+               }
+
+               if ($is_cat && $feed_id >= 0) {
+                       if ($feed_id != 0) {
+                               $cat_qpart = "cat_id = '$feed_id'";
+                       } else {
+                               $cat_qpart = "cat_id IS NULL";
+                       }
+
+                       /* Recalculate counters for child feeds */
+
+                       if (!$pcat_fast) {
+                               $result = db_query("SELECT id FROM ttrss_feeds
+                                               WHERE owner_uid = '$owner_uid' AND $cat_qpart");
+
+                               while ($line = db_fetch_assoc($result)) {
+                                       CCache::update($line["id"], $owner_uid, false, false);
+                               }
+                       }
+
+                       $result = db_query("SELECT SUM(value) AS sv
+                               FROM ttrss_counters_cache, ttrss_feeds
+                               WHERE id = feed_id AND $cat_qpart AND
+                               ttrss_counters_cache.owner_uid = $owner_uid AND
+                               ttrss_feeds.owner_uid = '$owner_uid'");
+
+                       $unread = (int) db_fetch_result($result, 0, "sv");
+
+               } else {
+                       $unread = (int) Feeds::getFeedArticles($feed_id, $is_cat, true, $owner_uid);
+               }
+
+               db_query("BEGIN");
+
+               $result = db_query("SELECT feed_id FROM $table
+                       WHERE owner_uid = '$owner_uid' AND feed_id = '$feed_id' LIMIT 1");
+
+               if (db_num_rows($result) == 1) {
+                       db_query("UPDATE $table SET
+                               value = '$unread', updated = NOW() WHERE
+                               feed_id = '$feed_id' AND owner_uid = '$owner_uid'");
+
+               } else {
+                       db_query("INSERT INTO $table
+                               (feed_id, value, owner_uid, updated)
+                               VALUES
+                               ($feed_id, $unread, $owner_uid, NOW())");
+               }
+
+               db_query("COMMIT");
+
+               if ($feed_id > 0 && $prev_unread != $unread) {
+
+                       if (!$is_cat) {
+
+                               /* Update parent category */
+
+                               if ($update_pcat) {
+
+                                       $result = db_query("SELECT cat_id FROM ttrss_feeds
+                                               WHERE owner_uid = '$owner_uid' AND id = '$feed_id'");
+
+                                       $cat_id = (int) db_fetch_result($result, 0, "cat_id");
+
+                                       CCache::update($cat_id, $owner_uid, true, true, true);
+
+                               }
+                       }
+               } else if ($feed_id < 0) {
+                       CCache::update_all($owner_uid);
+               }
+
+               return $unread;
+       }
+
+       /* function ccache_cleanup($owner_uid) {
+
+               if (DB_TYPE == "pgsql") {
+                       db_query("DELETE FROM ttrss_counters_cache AS c1 WHERE
+                               (SELECT count(*) FROM ttrss_counters_cache AS c2
+                                       WHERE c1.feed_id = c2.feed_id AND c2.owner_uid = c1.owner_uid) > 1
+                                       AND owner_uid = '$owner_uid'");
+
+                       db_query("DELETE FROM ttrss_cat_counters_cache AS c1 WHERE
+                               (SELECT count(*) FROM ttrss_cat_counters_cache AS c2
+                                       WHERE c1.feed_id = c2.feed_id AND c2.owner_uid = c1.owner_uid) > 1
+                                       AND owner_uid = '$owner_uid'");
+               } else {
+                       db_query("DELETE c1 FROM
+                                       ttrss_counters_cache AS c1,
+                                       ttrss_counters_cache AS c2
+                               WHERE
+                                       c1.owner_uid = '$owner_uid' AND
+                                       c1.owner_uid = c2.owner_uid AND
+                                       c1.feed_id = c2.feed_id");
+
+                       db_query("DELETE c1 FROM
+                                       ttrss_cat_counters_cache AS c1,
+                                       ttrss_cat_counters_cache AS c2
+                               WHERE
+                                       c1.owner_uid = '$owner_uid' AND
+                                       c1.owner_uid = c2.owner_uid AND
+                                       c1.feed_id = c2.feed_id");
+
+               }
+       } */
+
+
+}
\ No newline at end of file
index 0b326d2bf64895ea259cdde0a21f49be58fd8b50..23571c3692a3bf5834d267ef2c4bfb93461c7536 100755 (executable)
@@ -836,7 +836,7 @@ class Feeds extends Handler_Protected {
        function catchupAll() {
                $this->dbh->query("UPDATE ttrss_user_entries SET
                                                last_read = NOW(), unread = false WHERE unread = true AND owner_uid = " . $_SESSION["uid"]);
-               ccache_zero_all($_SESSION["uid"]);
+               CCache::zero_all($_SESSION["uid"]);
        }
 
        function view() {
@@ -890,7 +890,7 @@ class Feeds extends Handler_Protected {
                 * so for performance reasons we don't do that here */
 
                if ($feed >= 0) {
-                       ccache_update($feed, $_SESSION["uid"], $cat_view);
+                       CCache::update($feed, $_SESSION["uid"], $cat_view);
                }
 
                set_pref("_DEFAULT_VIEW_MODE", $view_mode);
@@ -1365,7 +1365,7 @@ class Feeds extends Handler_Protected {
 
                        }
 
-                       ccache_update($feed, $owner_uid, $cat_view);
+                       CCache::update($feed, $owner_uid, $cat_view);
 
                } else { // tag
                        db_query("UPDATE ttrss_user_entries
index ec0c0fc60f379f180897b60dca09470a2cf1a243..d525bc54c001405ac565233c9db842c9a126ad5f 100644 (file)
@@ -227,7 +227,7 @@ class Handler_Public extends Handler {
                                if ($line['note']) $article['note'] = $line['note'];
                                if ($article['author']) $article['author'] = $line['author'];
 
-                               $tags = get_article_tags($line["id"], $owner_uid);
+                               $tags = Article::get_article_tags($line["id"], $owner_uid);
 
                                if (count($tags) > 0) {
                                        $article['tags'] = array();
index f3df0297d41d5238dba67325f31512b1d739675c..c12e76f6b51df68c58283c4bf451f7936f07befd 100755 (executable)
@@ -1168,7 +1168,7 @@ class Pref_Feeds extends Handler_Protected {
 
                        while ($line = $this->dbh->fetch_assoc($result)) {
 
-                               $tags = get_article_tags($line["ref_id"]);
+                               $tags = Article::get_article_tags($line["ref_id"]);
 
                                $article_filters = get_article_filters($filters, $line['title'],
                                        $line['content'], $line['link'], strtotime($line['updated']),
@@ -1225,7 +1225,7 @@ class Pref_Feeds extends Handler_Protected {
 
                        while ($line = $this->dbh->fetch_assoc($tmp_result)) {
 
-                               $tags = get_article_tags($line["ref_id"]);
+                               $tags = Article::get_article_tags($line["ref_id"]);
 
                                $article_filters = get_article_filters($filters, $line['title'],
                                        $line['content'], $line['link'], strtotime($line['updated']),
@@ -1535,7 +1535,7 @@ class Pref_Feeds extends Handler_Protected {
                $cat_id = (int) $cat_id;
 
                if ($cat_id > 0) {
-                       $cat_unread = ccache_find($cat_id, $_SESSION["uid"], true);
+                       $cat_unread = CCache::find($cat_id, $_SESSION["uid"], true);
                } else if ($cat_id == 0 || $cat_id == -2) {
                        $cat_unread = Feeds::getCategoryUnread($cat_id);
                }
@@ -1740,7 +1740,7 @@ class Pref_Feeds extends Handler_Protected {
                $result = $this->dbh->query("DELETE FROM ttrss_entries WHERE
                        (SELECT COUNT(int_id) FROM ttrss_user_entries WHERE ref_id = id) = 0");
 
-               ccache_update($id, $_SESSION['uid']);
+               CCache::update($id, $_SESSION['uid']);
        } // function clear_feed_articles
 
        private function remove_feed_category($id, $owner_uid) {
@@ -1748,7 +1748,7 @@ class Pref_Feeds extends Handler_Protected {
                $this->dbh->query("DELETE FROM ttrss_feed_categories
                        WHERE id = '$id' AND owner_uid = $owner_uid");
 
-               ccache_remove($id, $owner_uid, true);
+               CCache::remove($id, $owner_uid, true);
        }
 
        static function remove_feed($id, $owner_uid) {
@@ -1803,11 +1803,11 @@ class Pref_Feeds extends Handler_Protected {
                                unlink(ICONS_DIR . "/$id.ico");
                        }
 
-                       ccache_remove($id, $owner_uid);
+                       CCache::remove($id, $owner_uid);
 
                } else {
                        label_remove(feed_to_label_id($id), $owner_uid);
-                       //ccache_remove($id, $owner_uid); don't think labels are cached
+                       //CCache::remove($id, $owner_uid); don't think labels are cached
                }
        }
 
diff --git a/include/ccache.php b/include/ccache.php
deleted file mode 100644 (file)
index c6f7dde..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-<?php
-       /* function ccache_zero($feed_id, $owner_uid) {
-               db_query("UPDATE ttrss_counters_cache SET
-                       value = 0, updated = NOW() WHERE
-                       feed_id = '$feed_id' AND owner_uid = '$owner_uid'");
-       } */
-
-       function ccache_zero_all($owner_uid) {
-               db_query("UPDATE ttrss_counters_cache SET
-                       value = 0 WHERE owner_uid = '$owner_uid'");
-
-               db_query("UPDATE ttrss_cat_counters_cache SET
-                       value = 0 WHERE owner_uid = '$owner_uid'");
-       }
-
-       function ccache_remove($feed_id, $owner_uid, $is_cat = false) {
-
-               if (!$is_cat) {
-                       $table = "ttrss_counters_cache";
-               } else {
-                       $table = "ttrss_cat_counters_cache";
-               }
-
-               db_query("DELETE FROM $table WHERE
-                       feed_id = '$feed_id' AND owner_uid = '$owner_uid'");
-
-       }
-
-       function ccache_update_all($owner_uid) {
-
-               if (get_pref('ENABLE_FEED_CATS', $owner_uid)) {
-
-                       $result = db_query("SELECT feed_id FROM ttrss_cat_counters_cache
-                               WHERE feed_id > 0 AND owner_uid = '$owner_uid'");
-
-                       while ($line = db_fetch_assoc($result)) {
-                               ccache_update($line["feed_id"], $owner_uid, true);
-                       }
-
-                       /* We have to manually include category 0 */
-
-                       ccache_update(0, $owner_uid, true);
-
-               } else {
-                       $result = db_query("SELECT feed_id FROM ttrss_counters_cache
-                               WHERE feed_id > 0 AND owner_uid = '$owner_uid'");
-
-                       while ($line = db_fetch_assoc($result)) {
-                               print ccache_update($line["feed_id"], $owner_uid);
-
-                       }
-
-               }
-       }
-
-       function ccache_find($feed_id, $owner_uid, $is_cat = false,
-               $no_update = false) {
-
-               if (!is_numeric($feed_id)) return;
-
-               if (!$is_cat) {
-                       $table = "ttrss_counters_cache";
-                       /* if ($feed_id > 0) {
-                               $tmp_result = db_query("SELECT owner_uid FROM ttrss_feeds
-                                       WHERE id = '$feed_id'");
-                               $owner_uid = db_fetch_result($tmp_result, 0, "owner_uid");
-                       } */
-               } else {
-                       $table = "ttrss_cat_counters_cache";
-               }
-
-               if (DB_TYPE == "pgsql") {
-                       $date_qpart = "updated > NOW() - INTERVAL '15 minutes'";
-               } else if (DB_TYPE == "mysql") {
-                       $date_qpart = "updated > DATE_SUB(NOW(), INTERVAL 15 MINUTE)";
-               }
-
-               $result = db_query("SELECT value FROM $table
-                       WHERE owner_uid = '$owner_uid' AND feed_id = '$feed_id'
-                       LIMIT 1");
-
-               if (db_num_rows($result) == 1) {
-                       return db_fetch_result($result, 0, "value");
-               } else {
-                       if ($no_update) {
-                               return -1;
-                       } else {
-                               return ccache_update($feed_id, $owner_uid, $is_cat);
-                       }
-               }
-
-       }
-
-       function ccache_update($feed_id, $owner_uid, $is_cat = false,
-               $update_pcat = true, $pcat_fast = false) {
-
-               if (!is_numeric($feed_id)) return;
-
-               /* if (!$is_cat && $feed_id > 0) {
-                       $tmp_result = db_query("SELECT owner_uid FROM ttrss_feeds
-                               WHERE id = '$feed_id'");
-                       $owner_uid = db_fetch_result($tmp_result, 0, "owner_uid");
-               } */
-
-               $prev_unread = ccache_find($feed_id, $owner_uid, $is_cat, true);
-
-               /* When updating a label, all we need to do is recalculate feed counters
-                * because labels are not cached */
-
-               if ($feed_id < 0) {
-                       ccache_update_all($owner_uid);
-                       return;
-               }
-
-               if (!$is_cat) {
-                       $table = "ttrss_counters_cache";
-               } else {
-                       $table = "ttrss_cat_counters_cache";
-               }
-
-               if ($is_cat && $feed_id >= 0) {
-                       if ($feed_id != 0) {
-                               $cat_qpart = "cat_id = '$feed_id'";
-                       } else {
-                               $cat_qpart = "cat_id IS NULL";
-                       }
-
-                       /* Recalculate counters for child feeds */
-
-                       if (!$pcat_fast) {
-                               $result = db_query("SELECT id FROM ttrss_feeds
-                                               WHERE owner_uid = '$owner_uid' AND $cat_qpart");
-
-                               while ($line = db_fetch_assoc($result)) {
-                                       ccache_update($line["id"], $owner_uid, false, false);
-                               }
-                       }
-
-                       $result = db_query("SELECT SUM(value) AS sv
-                               FROM ttrss_counters_cache, ttrss_feeds
-                               WHERE id = feed_id AND $cat_qpart AND
-                               ttrss_counters_cache.owner_uid = $owner_uid AND
-                               ttrss_feeds.owner_uid = '$owner_uid'");
-
-                       $unread = (int) db_fetch_result($result, 0, "sv");
-
-               } else {
-                       $unread = (int) Feeds::getFeedArticles($feed_id, $is_cat, true, $owner_uid);
-               }
-
-               db_query("BEGIN");
-
-               $result = db_query("SELECT feed_id FROM $table
-                       WHERE owner_uid = '$owner_uid' AND feed_id = '$feed_id' LIMIT 1");
-
-               if (db_num_rows($result) == 1) {
-                       db_query("UPDATE $table SET
-                               value = '$unread', updated = NOW() WHERE
-                               feed_id = '$feed_id' AND owner_uid = '$owner_uid'");
-
-               } else {
-                       db_query("INSERT INTO $table
-                               (feed_id, value, owner_uid, updated)
-                               VALUES
-                               ($feed_id, $unread, $owner_uid, NOW())");
-               }
-
-               db_query("COMMIT");
-
-               if ($feed_id > 0 && $prev_unread != $unread) {
-
-                       if (!$is_cat) {
-
-                               /* Update parent category */
-
-                               if ($update_pcat) {
-
-                                       $result = db_query("SELECT cat_id FROM ttrss_feeds
-                                               WHERE owner_uid = '$owner_uid' AND id = '$feed_id'");
-
-                                       $cat_id = (int) db_fetch_result($result, 0, "cat_id");
-
-                                       ccache_update($cat_id, $owner_uid, true, true, true);
-
-                               }
-                       }
-               } else if ($feed_id < 0) {
-                       ccache_update_all($owner_uid);
-               }
-
-               return $unread;
-       }
-
-       /* function ccache_cleanup($owner_uid) {
-
-               if (DB_TYPE == "pgsql") {
-                       db_query("DELETE FROM ttrss_counters_cache AS c1 WHERE
-                               (SELECT count(*) FROM ttrss_counters_cache AS c2
-                                       WHERE c1.feed_id = c2.feed_id AND c2.owner_uid = c1.owner_uid) > 1
-                                       AND owner_uid = '$owner_uid'");
-
-                       db_query("DELETE FROM ttrss_cat_counters_cache AS c1 WHERE
-                               (SELECT count(*) FROM ttrss_cat_counters_cache AS c2
-                                       WHERE c1.feed_id = c2.feed_id AND c2.owner_uid = c1.owner_uid) > 1
-                                       AND owner_uid = '$owner_uid'");
-               } else {
-                       db_query("DELETE c1 FROM
-                                       ttrss_counters_cache AS c1,
-                                       ttrss_counters_cache AS c2
-                               WHERE
-                                       c1.owner_uid = '$owner_uid' AND
-                                       c1.owner_uid = c2.owner_uid AND
-                                       c1.feed_id = c2.feed_id");
-
-                       db_query("DELETE c1 FROM
-                                       ttrss_cat_counters_cache AS c1,
-                                       ttrss_cat_counters_cache AS c2
-                               WHERE
-                                       c1.owner_uid = '$owner_uid' AND
-                                       c1.owner_uid = c2.owner_uid AND
-                                       c1.feed_id = c2.feed_id");
-
-               }
-       } */
-
index 987e0c3f8026cf5b812c71dddf46dd332498b7a8..30d92d091a66e381afea854ed0f1a4892d96dec6 100644 (file)
 
        require_once 'db-prefs.php';
        require_once 'version.php';
-       require_once 'ccache.php';
        require_once 'labels.php';
        require_once 'controls.php';
 
 
                if ($purge_interval == -1 || !$purge_interval) {
                        if ($owner_uid) {
-                               ccache_update($feed_id, $owner_uid);
+                               CCache::update($feed_id, $owner_uid);
                        }
                        return;
                }
 
                $rows = db_affected_rows($result);
 
-               ccache_update($feed_id, $owner_uid);
+               CCache::update($feed_id, $owner_uid);
 
                if ($debug) {
                        _debug("Purged feed $feed_id ($purge_interval): deleted $rows articles");
                /* Special case: NULL category doesn't actually exist in the DB */
 
                $cv = array("id" => 0, "kind" => "cat",
-                       "counter" => (int) ccache_find(0, $_SESSION["uid"], true));
+                       "counter" => (int) CCache::find(0, $_SESSION["uid"], true));
 
                array_push($ret_arr, $cv);
 
index bb812754725c645424efc7745d74742c3d766f05..a7d30d674dfc039a71a0e2d172d7f70ba627aa56 100644 (file)
                                        $article_labels = get_article_labels($base_entry_id, $owner_uid);
                                        $entry_language = db_fetch_result($result, 0, "lang");
 
-                                       $existing_tags = get_article_tags($base_entry_id, $owner_uid);
+                                       $existing_tags = Article::get_article_tags($base_entry_id, $owner_uid);
                                        $entry_tags = array_unique(array_merge($entry_tags, $existing_tags));
 
                                } else {