fixes for browser lacking Gears

This commit is contained in:
Andrew Dolgov 2009-02-10 11:56:20 +03:00
parent a206a56c6d
commit 23e2fb8496
1 changed files with 5 additions and 3 deletions

View File

@ -750,8 +750,7 @@ function update_offline_data(stage) {
try {
if (!stage) stage = 0;
if (offline_mode) return;
if (getInitParam("offline_enabled") != "1") return;
if (!db || offline_mode || getInitParam("offline_enabled") != "1") return;
debug("update_offline_data: stage " + stage);
@ -939,7 +938,7 @@ function get_local_feed_unread(id) {
function enable_offline_reading() {
try {
if (getInitParam("offline_enabled") == "1") {
if (db && getInitParam("offline_enabled") == "1") {
init_local_sync_data();
Element.show("restartOfflinePic");
window.setTimeout("update_offline_data(0)", 100);
@ -1293,6 +1292,9 @@ function format_article_labels(labels, id) {
function init_local_sync_data() {
try {
if (!db) return;
var rs = db.execute("SELECT COUNT(*) FROM syncdata WHERE key = 'last_online'");
var has_last_online = 0;