]> git.wh0rd.org - tt-rss.git/blobdiff - js/functions.js
better handle PDOExceptions during open transaction in feed update
[tt-rss.git] / js / functions.js
index 46b9958ea602cb20c440f7dbda25648603ddf7ce..70842925c54a883b82e269892d4a84d75be26d91 100755 (executable)
@@ -301,7 +301,7 @@ function getURLParam(param){
 }
 
 function closeInfoBox() {
-       dialog = dijit.byId("infoBox");
+       var dialog = dijit.byId("infoBox");
 
        if (dialog)     dialog.hide();
 
@@ -564,8 +564,6 @@ function addLabel(select, callback) {
 
                notify_progress("Loading, please wait...", true);
 
-               if (inPreferences() && !select) active_tab = "labelConfig";
-
                new Ajax.Request("backend.php", {
                        parameters: query,
                        onComplete: function(transport) {
@@ -646,7 +644,7 @@ function quickAddFeed() {
                                                                dialog.show_error(__("Specified URL doesn't seem to contain any feeds."));
                                                                break;
                                                        case 4:
-                                                               feeds = rc['feeds'];
+                                                               var feeds = rc['feeds'];
 
                                                                Element.show("fadd_multiple_notify");
 
@@ -939,7 +937,7 @@ function quickAddFilter() {
        if (dijit.byId("filterEditDlg"))
                dijit.byId("filterEditDlg").destroyRecursive();
 
-       dialog = new dijit.Dialog({
+       var dialog = new dijit.Dialog({
                id: "filterEditDlg",
                title: __("Create Filter"),
                style: "width: 600px",
@@ -1032,7 +1030,7 @@ function quickAddFilter() {
 
                                        var title = false;
 
-                                       if (reply && reply) title = reply.title;
+                                       if (reply && reply.title) title = reply.title;
 
                                        if (title || getActiveFeedId() || activeFeedIsCat()) {
 
@@ -1257,7 +1255,7 @@ function editFeed(feed) {
        if (dijit.byId("feedEditDlg"))
                dijit.byId("feedEditDlg").destroyRecursive();
 
-       dialog = new dijit.Dialog({
+       var dialog = new dijit.Dialog({
                id: "feedEditDlg",
                title: __("Edit Feed"),
                style: "width: 600px",
@@ -1432,7 +1430,7 @@ function showFeedsWithErrors() {
        if (dijit.byId("errorFeedsDlg"))
                dijit.byId("errorFeedsDlg").destroyRecursive();
 
-       dialog = new dijit.Dialog({
+       var dialog = new dijit.Dialog({
                id: "errorFeedsDlg",
                title: __("Feeds with update errors"),
                style: "width: 600px",
@@ -1486,7 +1484,7 @@ function helpDialog(topic) {
        if (dijit.byId("helpDlg"))
                dijit.byId("helpDlg").destroyRecursive();
 
-       dialog = new dijit.Dialog({
+       var dialog = new dijit.Dialog({
                id: "helpDlg",
                title: __("Help"),
                style: "width: 600px",