From: Andrew Dolgov Date: Thu, 8 Sep 2005 03:49:53 +0000 (+0100) Subject: fix UPD marking on mysql X-Git-Tag: 1.0.4~32 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c05a19f39615bb9f8acadabcb0c572253a51a035;p=tt-rss.git fix UPD marking on mysql --- diff --git a/backend.php b/backend.php index 329f2783..e7431083 100644 --- a/backend.php +++ b/backend.php @@ -344,7 +344,9 @@ } $result = db_query($link, "SELECT - id,title,updated,unread,feed_id,marked,link,last_read + id,title,updated,unread,feed_id,marked,link,last_read, + SUBSTRING(last_read,1,19) as last_read_noms, + SUBSTRING(updated,1,19) as updated_noms FROM ttrss_entries WHERE @@ -364,25 +366,13 @@ $id = $line["id"]; $feed_id = $line["feed_id"]; -/* if ($line["last_read"] && $line["updated"] && - strtotime($line["last_read"]) < strtotime($line["updated"]) && - ($line["unread"] == "f" || $line["unread"] == "0")) { - - $update_pic = "\"Updated\""; - ++$num_unread; - } else { - $update_pic = "\"Updated\""; - } */ - // printf("L %d (%s) > U %d (%s) = %d
", -// strtotime($line["last_read"]), $line["last_read"], +// strtotime($line["last_read_noms"]), $line["last_read_noms"], // strtotime($line["updated"]), $line["updated"], // strtotime($line["last_read"]) >= strtotime($line["updated"])); if ($line["last_read"] != "" && $line["updated"] != "" && - strtotime($line["last_read"]) < strtotime($line["updated"])) { + strtotime($line["last_read_noms"]) < strtotime($line["updated_noms"])) { $update_pic = "\"Updated\"";