diff --git a/include/login_form.php b/include/login_form.php index d1af23459..211302a87 100755 --- a/include/login_form.php +++ b/include/login_form.php @@ -59,7 +59,7 @@ if (login && login != this.previousLogin) { this.previousLogin = login; - xhrJson("public.php", {op: "getprofiles", login: login}, + xhr.json("public.php", {op: "getprofiles", login: login}, (reply) => { const profile = dijit.byId('profile'); diff --git a/js/App.js b/js/App.js index d61c6ead0..0c12c7e6f 100644 --- a/js/App.js +++ b/js/App.js @@ -775,7 +775,7 @@ const App = { checkForUpdates: function() { console.log('checking for updates...'); - xhrJson("backend.php", {op: 'rpc', method: 'checkforupdates'}) + xhr.json("backend.php", {op: 'rpc', method: 'checkforupdates'}) .then((reply) => { console.log('update reply', reply); diff --git a/js/Article.js b/js/Article.js index 90be90f7b..379e05644 100644 --- a/js/Article.js +++ b/js/Article.js @@ -115,7 +115,7 @@ const Article = { displayUrl: function (id) { const query = {op: "article", method: "getmetadatabyid", id: id}; - xhrJson("backend.php", query, (reply) => { + xhr.json("backend.php", query, (reply) => { if (reply && reply.link) { prompt(__("Article URL:"), reply.link); } else { @@ -358,7 +358,7 @@ const Article = { const tmph = dojo.connect(dialog, 'onShow', function () { dojo.disconnect(tmph); - xhrJson("backend.php", {op: "article", method: "printArticleTags", id: id}, (reply) => { + xhr.json("backend.php", {op: "article", method: "printArticleTags", id: id}, (reply) => { dijit.getEnclosingWidget(App.byId("tags_str")) .attr('value', reply.tags.join(", ")) diff --git a/js/CommonDialogs.js b/js/CommonDialogs.js index 6ace91c8c..3acd2b577 100644 --- a/js/CommonDialogs.js +++ b/js/CommonDialogs.js @@ -78,7 +78,7 @@ const CommonDialogs = { return false; }, subscribeToFeed: function() { - xhrJson("backend.php", + xhr.json("backend.php", {op: "feeds", method: "subscribeToFeed"}, (reply) => { const dialog = new fox.SingleUseDialog({ @@ -265,7 +265,7 @@ const CommonDialogs = { }, showFeedsWithErrors: function() { - xhrJson("backend.php", {op: "pref-feeds", method: "feedsWithErrors"}, (reply) => { + xhr.json("backend.php", {op: "pref-feeds", method: "feedsWithErrors"}, (reply) => { const dialog = new fox.SingleUseDialog({ id: "errorFeedsDlg", @@ -446,7 +446,7 @@ const CommonDialogs = { Notify.progress("Loading, please wait...", true); - xhrJson("backend.php", {op: "pref-feeds", method: "getOPMLKey"}, (reply) => { + xhr.json("backend.php", {op: "pref-feeds", method: "getOPMLKey"}, (reply) => { try { const dialog = new fox.SingleUseDialog({ title: __("Public OPML URL"), @@ -454,7 +454,7 @@ const CommonDialogs = { if (confirm(__("Replace current OPML publishing address with a new one?"))) { Notify.progress("Trying to change address...", true); - xhrJson("backend.php", {op: "pref-feeds", method: "regenOPMLKey"}, (reply) => { + xhr.json("backend.php", {op: "pref-feeds", method: "regenOPMLKey"}, (reply) => { if (reply) { const new_link = reply.link; const target = this.domNode.querySelector('.generated_url'); @@ -504,7 +504,7 @@ const CommonDialogs = { Notify.progress("Loading, please wait...", true); - xhrJson("backend.php", {op: "pref-feeds", method: "getsharedurl", id: feed, is_cat: is_cat, search: search}, (reply) => { + xhr.json("backend.php", {op: "pref-feeds", method: "getsharedurl", id: feed, is_cat: is_cat, search: search}, (reply) => { try { const dialog = new fox.SingleUseDialog({ title: __("Show as feed"), @@ -515,7 +515,7 @@ const CommonDialogs = { const query = {op: "pref-feeds", method: "regenFeedKey", id: feed, is_cat: is_cat}; - xhrJson("backend.php", query, (reply) => { + xhr.json("backend.php", query, (reply) => { const new_link = reply.link; const target = this.domNode.querySelector(".generated_url"); diff --git a/js/Feeds.js b/js/Feeds.js index 67c78cbfe..7cefe2235 100644 --- a/js/Feeds.js +++ b/js/Feeds.js @@ -558,7 +558,7 @@ const Feeds = { return tree.model.store.getValue(nuf, 'bare_id'); }, search: function() { - xhrJson("backend.php", + xhr.json("backend.php", {op: "feeds", method: "search"}, (reply) => { try { diff --git a/js/PrefFeedTree.js b/js/PrefFeedTree.js index 92194e037..c7228e6ff 100644 --- a/js/PrefFeedTree.js +++ b/js/PrefFeedTree.js @@ -210,14 +210,14 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b return false; }, checkErrorFeeds: function() { - xhrJson("backend.php", {op: "pref-feeds", method: "feedsWithErrors"}, (reply) => { + xhr.json("backend.php", {op: "pref-feeds", method: "feedsWithErrors"}, (reply) => { if (reply.length > 0) { Element.show(dijit.byId("pref_feeds_errors_btn").domNode); } }); }, checkInactiveFeeds: function() { - xhrJson("backend.php", {op: "pref-feeds", method: "inactivefeeds"}, (reply) => { + xhr.json("backend.php", {op: "pref-feeds", method: "inactivefeeds"}, (reply) => { if (reply.length > 0) { Element.show(dijit.byId("pref_feeds_inactive_btn").domNode); } @@ -385,7 +385,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b } }, batchSubscribe: function() { - xhrJson("backend.php", {op: 'pref-feeds', method: 'batchSubscribe'}, (reply) => { + xhr.json("backend.php", {op: 'pref-feeds', method: 'batchSubscribe'}, (reply) => { const dialog = new fox.SingleUseDialog({ id: "batchSubDlg", title: __("Batch subscribe"), @@ -458,7 +458,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b }); }, showInactiveFeeds: function() { - xhrJson("backend.php", {op: 'pref-feeds', method: 'inactivefeeds'}, function (reply) { + xhr.json("backend.php", {op: 'pref-feeds', method: 'inactivefeeds'}, function (reply) { const dialog = new fox.SingleUseDialog({ id: "inactiveFeedsDlg", diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js index d4db15c3b..c17966291 100644 --- a/js/PrefHelpers.js +++ b/js/PrefHelpers.js @@ -132,7 +132,7 @@ const Helpers = { } }, refresh: function() { - xhrJson("backend.php", {op: 'pref-prefs', method: 'getprofiles'}, (reply) => { + xhr.json("backend.php", {op: 'pref-prefs', method: 'getprofiles'}, (reply) => { dialog.attr('content', `