From 5ad02a3d1c8418e31c38a23f7c319a0e240bec2a Mon Sep 17 00:00:00 2001 From: rugk Date: Mon, 6 Feb 2017 20:39:52 +0100 Subject: [PATCH] Use original reload function for manual paste open link This fixes the issue where clicking on the link took you to the home page. I seriously missed that this.reloadPage does not do the thing I thought it does, so I updated the doc to make it clear and switched back to the correct function. Basically reverts https://github.com/PrivateBin/PrivateBin/pull/170/commits/86cd5e1c152d12c114d98d4b7f9277a37b9c334a --- js/privatebin.js | 6 ++++-- tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index ba3c0c60..1e98abfb 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -1350,6 +1350,8 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) { /** * reload the page * + * This takes the user to the PrivateBin home page. + * * @name controller.reloadPage * @function * @param {Event} event @@ -1552,8 +1554,8 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) { { // check if location is (already) shown in URL bar if (window.location.href === this.pasteUrl.attr('href')) { - // if so we need to load link by reloading the site - this.reloadPage(event); + // if so we need to load link by reloading the current site + window.location.reload(true); } }, diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 8e153978..c3dc81ee 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -69,7 +69,7 @@ if ($MARKDOWN): - + diff --git a/tpl/page.php b/tpl/page.php index 1130dbf8..6ab8f9f5 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -47,7 +47,7 @@ if ($MARKDOWN): - +