diff options
author | Andrew Dolgov <[email protected]> | 2007-05-15 08:37:10 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-05-15 08:37:10 +0100 |
commit | 961f4c7323a840d256f95f0c026178ddf9fa13c0 (patch) | |
tree | a90a772351f39c95ca1d856a969777749afdd987 /functions.php | |
parent | 53761dda370de2d37dfd2cb1446b1c634b26abf2 (diff) |
prefetch topmost articles on headlines load
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/functions.php b/functions.php index 1f8d86383..d68a4506f 100644 --- a/functions.php +++ b/functions.php @@ -3513,6 +3513,8 @@ function outputHeadlinesList($link, $feed, $subop, $view_mode, $limit, $cat_view, $next_unread_feed, $offset) { + $topmost_article_ids = array(); + if (!$offset) $offset = 0; if ($subop == "undefined") $subop = ""; @@ -3627,7 +3629,11 @@ $id = $line["id"]; $feed_id = $line["feed_id"]; - + + if (count($topmost_article_ids) < 5) { + array_push($topmost_article_ids, $id); + } + if ($line["last_read"] == "" && ($line["unread"] != "t" && $line["unread"] != "1")) { @@ -3801,6 +3807,6 @@ print "</div>"; - + return $topmost_article_ids; } ?> |