]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix UPD marking on mysql
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 8 Sep 2005 03:49:53 +0000 (04:49 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 8 Sep 2005 03:49:53 +0000 (04:49 +0100)
backend.php

index 329f2783d010d623509cef275fab54fa853eb039..e74310831fa37973d350738e2427295af84b076e 100644 (file)
                } 
 
                $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
                        $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 = "<img id='FUPDPIC-$id' src=\"images/updated.png\" 
-                                       alt=\"Updated\">";
-                               ++$num_unread;
-                       } else {
-                               $update_pic = "<img id='FUPDPIC-$id' src=\"images/blank_icon.png\" 
-                                       alt=\"Updated\">";
-                       } */
-
 //                     printf("L %d (%s) &gt; U %d (%s) = %d<br>", 
-//                             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 = "<img id='FUPDPIC-$id' src=\"images/updated.png\" 
                                        alt=\"Updated\">";