]> git.wh0rd.org Git - tt-rss.git/commitdiff
make tag cache processing faster in cdm
authorAndrew Dolgov <fox@fakecake.org>
Thu, 2 May 2013 06:09:01 +0000 (10:09 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Thu, 2 May 2013 06:09:01 +0000 (10:09 +0400)
classes/feeds.php
include/functions.php

index f21bb3ce5ed3ed3db9514391021d8a7df6493046..31bcbac570fc215dabb07f5cb7bb49f141c9b49f 100644 (file)
@@ -514,8 +514,10 @@ class Feeds extends Handler_Protected {
 
                                } else {
 
-                                       $line["tags"] = get_article_tags($id, $_SESSION["uid"], $line["tag_cache"]);
-                                       unset($line["tag_cache"]);
+                                       if ($line["tag_cache"])
+                                               $tags = explode(",", $line["tag_cache"]);
+                                       else
+                                               $tags = false;
 
                                        $line["content"] = sanitize($line["content_preview"],
                                                        sql_bool_to_bool($line['hide_images']), false, $entry_site_url);
@@ -682,7 +684,7 @@ class Feeds extends Handler_Protected {
                                                $reply['content'] .= $p->hook_article_left_button($line);
                                        }
 
-                                       $tags_str = format_tags_string($line["tags"], $id);
+                                       $tags_str = format_tags_string($tags, $id);
 
                                        $reply['content'] .= "<img src='images/tag.png' alt='Tags' title='Tags'>
                                                <span id=\"ATSTR-$id\">$tags_str</span>
index c39b4938c4d1d1cc42e7b3ca144001bf77e54f80..0b8f5b0d5b9cd0b2a18182bc789d605a47ba23af 100644 (file)
                        ttrss_tags WHERE post_int_id = (SELECT int_id FROM ttrss_user_entries WHERE
                        ref_id = '$a_id' AND owner_uid = '$owner_uid' LIMIT 1) ORDER BY tag_name";
 
-               $obj_id = md5("TAGS:$owner_uid:$id");
                $tags = array();
 
                /* check cache first */
 
        function print_checkpoint($n, $s) {
                $ts = microtime(true);
-               echo sprintf("<!-- CP[$n] %.4f seconds -->", $ts - $s);
+               echo sprintf("<!-- CP[$n] %.4f seconds -->\n", $ts - $s);
                return $ts;
        }