summaryrefslogtreecommitdiff
path: root/classes/handler
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-10-04 09:10:44 +0400
committerAndrew Dolgov <[email protected]>2013-10-04 09:10:44 +0400
commit84c53d0e1dba8633fe9fc8ba2d46bb3e3c096173 (patch)
treec14be93623076e6b09c93489afb6b2fe149c300d /classes/handler
parent8b16eeb1a39b9dee8266d27b3b1db573e9be62e5 (diff)
fix http 304 header being calculated incorrectly for published and starred feeds
Diffstat (limited to 'classes/handler')
-rw-r--r--classes/handler/public.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index 649fc31aa..c5a2a03cb 100644
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -15,11 +15,15 @@ class Handler_Public extends Handler {
if (!$limit) $limit = 60;
$date_sort_field = "date_entered DESC, updated DESC";
+ $date_check_field = "date_entered";
- if ($feed == -2)
+ if ($feed == -2 && !$is_cat) {
$date_sort_field = "last_published DESC";
- else if ($feed == -1)
+ $date_check_field = "last_published";
+ } else if ($feed == -1 && !$is_cat) {
$date_sort_field = "last_marked DESC";
+ $date_check_field = "last_marked";
+ }
switch ($order) {
case "title":
@@ -41,7 +45,8 @@ class Handler_Public extends Handler {
$result = $qfh_ret[0];
if ($this->dbh->num_rows($result) != 0) {
- $ts = strtotime($this->dbh->fetch_result($result, 0, "date_entered"));
+
+ $ts = strtotime($this->dbh->fetch_result($result, 0, $date_check_field));
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) &&
strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $ts) {