]> git.wh0rd.org - tt-rss.git/commitdiff
article download fixes
authorAndrew Dolgov <fox@bah.org.ru>
Tue, 3 Feb 2009 13:26:45 +0000 (16:26 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Tue, 3 Feb 2009 13:26:45 +0000 (16:26 +0300)
modules/backend-rpc.php
modules/popup-dialog.php
tt-rss.js

index 53635f9665bc45f3aca7de84fc436ae9d04d851b..751934f351668e669fe91783c8b62f252f96371b 100644 (file)
        
                                        while ($line = db_fetch_assoc($result)) {
                                                print "<article><![CDATA[";
+
+                                               $line["marked"] = (int)sql_bool_to_bool($line["marked"]);
+                                               $line["unread"] = (int)sql_bool_to_bool($line["unread"]);
+
                                                print json_encode($line);
                                                print "]]></article>";
                                        }
index e62f84e9c7cda76715b44a12a597268e0b159e5b..d7e786684d7db5d9486de8bcfef501c782996653 100644 (file)
                        $amount = array(
                                50  => 50,
                                100 => 100,
-                               250 => 250);
+                               250 => 250,
+                               500 => 500);
 
                        print_select_hash("amount", 50, $amount);
 
index 5a92282d838c847177bff5043717cc125e0ca606..e1ca160af0d7fc3d123358108c684ef345102320 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -144,6 +144,10 @@ function backend_sanity_check_callback(transport) {
                        return;
                }
 
+               if (getURLParam("offline")) {
+                       return init_offline();
+               }
+
                var reply = transport.responseXML.firstChild.firstChild;
 
                if (!reply) {
@@ -1505,7 +1509,7 @@ function init_gears() {
 
                        db.execute("CREATE TABLE if not exists offline_feeds (id integer, title text)");
 
-                       db.execute("CREATE TABLE if not exists offline_data (id integer, feed_id integer, title text, link text, guid text, updated text, content text, tags text)");
+                       db.execute("CREATE TABLE if not exists offline_data (id integer, feed_id integer, title text, link text, guid text, updated text, content text, tags text, unread text, marked text)");
 
                        var qmcDownload = document.getElementById("qmcDownload");
                        if (qmcDownload) Element.show(qmcDownload);
@@ -1564,9 +1568,10 @@ function offline_download_parse(stage, transport) {
                                        if (a) {
                                                db.execute("DELETE FROM offline_data WHERE id = ?", [a.id]);
                                                db.execute("INSERT INTO offline_data "+
-                                                       "(id, feed_id, title, link, guid, updated, content) "+
-                                                       "VALUES (?, ?, ?, ?, ?, ?, ?)", 
-                                                       [a.id, a.feed_id, a.title, a.link, a.guid, a.updated, a.content]);
+                                                       "(id, feed_id, title, link, guid, updated, content, unread, marked) "+
+                                                       "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", 
+                                                       [a.id, a.feed_id, a.title, a.link, a.guid, a.updated, 
+                                                               a.content, a.unread, a.marked]);
 
                                        }
                                }