update_local_feedlist_counters();
}
+ rs.close();
+
return false;
} catch (e) {
}
- var rs;
-
var limit = 30;
var toolbar_form = document.forms["main_toolbar_form"];
rs.next();
line_num++;
}
+
+ rs.close();
if (offset == 0) {
tmp += "</table>";
rs.next();
}
+ rs.close();
+
tmp += "</ul>";
render_feedlist(tmp);
var query = "backend.php?op=rpc&subop=download&stage=" + stage;
var rs = db.execute("SELECT MAX(id), MIN(id) FROM articles");
+
if (rs.isValidRow() && rs.field(0)) {
var offline_dl_max_id = rs.field(0);
var offline_dl_min_id = rs.field(1);
query = query + "&cidb=" + offline_dl_min_id;
}
+ rs.close();
+
new Ajax.Request(query, {
onComplete: function(transport) {
offline_download_parse(stage, transport);
rs.next();
}
+ rs.close();
+
set_feedlist_counter(-4, get_local_feed_unread(-4));
set_feedlist_counter(-1, get_local_feed_unread(-1));
rs = db.execute("SELECT SUM(unread) FROM articles WHERE feed_id = ?", [id]);
}
+ var a = false;
+
if (rs.isValidRow()) {
- return rs.field(0);
+ a = rs.field(0);
} else {
- return 0;
+ a = 0;
}
+ rs.close();
+
+ return a;
+
} catch (e) {
exception_error("get_local_feed_unread", e);
}
if (db) {
var rs = db.execute("SELECT article FROM cache WHERE id = ?", [id]);
+ var a = false;
if (rs.isValidRow()) {
- return rs.field(0);
+ var a = rs.field(0);
}
+ rs.close();
+
+ return a;
+
} else {
for (var i = 0; i < article_cache.length; i++) {
if (article_cache[i]["id"] == id) {
if (db) {
var rs = db.execute("SELECT article FROM cache WHERE id = ? AND param = ?",
[id, param]);
+ var a = false;
if (rs.isValidRow()) {
- return rs.field(0);
+ a = rs.field(0);
}
+ rs.close();
+
+ return a;
+
} else {
for (var i = 0; i < article_cache.length; i++) {
if (article_cache[i]["id"] == id && article_cache[i]["param"] == param) {
if (db) {
var rs = db.execute("SELECT COUNT(*) AS c FROM cache WHERE id = ?",
[id]);
+ var a = false;
if (rs.isValidRow()) {
- return rs.field(0) != "0";
+ a = rs.field(0) != "0";
}
+ rs.close();
+
+ return a;
+
} else {
for (var i = 0; i < article_cache.length; i++) {
if (article_cache[i]["id"] == id) {
if (db) {
var rs = db.execute("SELECT COUNT(*) AS c FROM cache WHERE id = ? AND param = ?",
[id, param]);
+ var a = false;
if (rs.isValidRow()) {
- return rs.field(0) != "0";
+ a = rs.field(0) != "0";
}
+ rs.close();
+
+ return a;
+
} else {
for (var i = 0; i < article_cache.length; i++) {
if (article_cache[i]["id"] == id && article_cache[i]["param"] == param) {