From a459c4692cebda3643226a4b29ac8f425e038aec Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sat, 1 Jun 2019 23:49:40 +0200 Subject: [PATCH] correcting API use, avoid history glitch --- js/privatebin.js | 4 ++-- lib/Model/Paste.php | 2 +- tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index 0de8594..e15a787 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -1187,7 +1187,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { // reload data ServerInteraction.prepare(); - ServerInteraction.setUrl(Helper.baseUri() + '?' + me.getPasteId()); + ServerInteraction.setUrl(Helper.baseUri() + '?pasteid=' + me.getPasteId()); ServerInteraction.setFailure(function (status, data) { // revert loading status… @@ -4658,7 +4658,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { Model.getPasteData(function (data) { ServerInteraction.prepare(); - ServerInteraction.setUrl(Helper.baseUri() + '?' + Model.getPasteId()); + ServerInteraction.setUrl(Helper.baseUri() + '?pasteid=' + Model.getPasteId()); ServerInteraction.setFailure(function (status, data) { // revert loading status… diff --git a/lib/Model/Paste.php b/lib/Model/Paste.php index cb572fc..2789084 100644 --- a/lib/Model/Paste.php +++ b/lib/Model/Paste.php @@ -73,7 +73,7 @@ class Paste extends AbstractModel $data['comments'] = array_values($this->getComments()); $data['comment_count'] = count($data['comments']); $data['comment_offset'] = 0; - $data['@context'] = 'js/paste.jsonld'; + $data['@context'] = '?jsonld=paste'; $this->_data = $data; return $this->_data; diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index b45dc5f..0e5d55b 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -72,7 +72,7 @@ if ($MARKDOWN): endif; ?> - + diff --git a/tpl/page.php b/tpl/page.php index 288bca5..f8905ff 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -50,7 +50,7 @@ if ($MARKDOWN): endif; ?> - +