summaryrefslogtreecommitdiff
path: root/js/Article.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-13 10:10:44 +0300
committerAndrew Dolgov <[email protected]>2021-02-13 10:10:44 +0300
commiteec5871f5f0de01e7a4bf5ba69c81315a8ea88e3 (patch)
tree928772498847fd9d87357a13f8c36e669f8b30ae /js/Article.js
parentd3940b625962048b6a7f951ba76f872ce2c1f6d2 (diff)
fail better if requested article URL is blank
Diffstat (limited to 'js/Article.js')
-rw-r--r--js/Article.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/Article.js b/js/Article.js
index 61368dfed..f8b0415b9 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -123,11 +123,13 @@ const Article = {
Article.setActive(0);
},
displayUrl: function (id) {
- const query = {op: "rpc", method: "getlinktitlebyid", id: id};
+ const query = {op: "article", method: "get_metadata_by_id", id: id};
xhrJson("backend.php", query, (reply) => {
if (reply && reply.link) {
prompt(__("Article URL:"), reply.link);
+ } else {
+ alert(__("No URL could be displayed for this article."));
}
});
},