Missed file from r3296 and better debugging of invalid DB parameters

This commit is contained in:
Dan Stillman 2008-08-31 23:39:14 +00:00
parent a8bb8dae40
commit 84ef07c874
2 changed files with 7 additions and 4 deletions

View file

@ -303,9 +303,9 @@ var ZoteroPane = new function()
// Focus the quicksearch on pane open
setTimeout("document.getElementById('zotero-tb-search').inputField.select();", 1);
if (Zotero.Prefs.get('sync.server.autoSync') && Zotero.Sync.Server.enabled) {
if (Zotero.Prefs.get('sync.autoSync') && Zotero.Sync.Server.enabled) {
setTimeout(function () {
Zotero.Sync.Server.sync();
Zotero.Sync.Runner.sync();
}, 1000);
}
}

View file

@ -265,8 +265,11 @@ Zotero.DBConnection.prototype.getStatement = function (sql, params, checkParams)
var type = 'null';
}
else {
throw('Invalid bound parameter ' + params[i] +
' in ' + Zotero.varDump(params));
var msg = 'Invalid bound parameter ' + params[i]
+ ' in ' + Zotero.varDump(params)
+ ' [QUERY: ' + sql + ']';
Zotero.debug(msg);
throw(msg);
}
}
var value = params[i];