From 9b6748c54df2ddca76bc1f895f005ce26a12bb25 Mon Sep 17 00:00:00 2001 From: rugk Date: Thu, 13 Apr 2017 10:46:09 +0200 Subject: [PATCH] Adjust requested changes --- js/privatebin.js | 4 ++-- lib/Model/Paste.php | 5 +++++ lib/PrivateBin.php | 5 ----- tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index 394ebb3..0dbdff1 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -43,7 +43,7 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) { var me = {}; /** - * list of UserAgents (parts) known to belong to a bot + * blacklist of UserAgents (parts) known to belong to a bot * * @private * @enum {Object} @@ -1390,7 +1390,7 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) { if (pasteMetaData.burnafterreading) { // display paste "for your eyes only" if it is deleted - // the paste has been deleted when the JSOn with the ciohertext + // the paste has been deleted when the JSON with the ciphertext // has been downloaded Alert.showRemaining("FOR YOUR EYES ONLY. Don't close this window, this message can't be displayed again."); diff --git a/lib/Model/Paste.php b/lib/Model/Paste.php index 938d184..6bd6f2e 100644 --- a/lib/Model/Paste.php +++ b/lib/Model/Paste.php @@ -48,6 +48,11 @@ class Paste extends AbstractModel $data->meta->remaining_time = $data->meta->expire_date - time(); } + // If the paste was meant to be read only once, delete it. + if ($paste->isBurnafterreading()) { + $paste->delete(); + } + // set formatter for for the view. if (!property_exists($data->meta, 'formatter')) { // support < 0.21 syntax highlighting diff --git a/lib/PrivateBin.php b/lib/PrivateBin.php index 30283cd..cd7ff57 100644 --- a/lib/PrivateBin.php +++ b/lib/PrivateBin.php @@ -376,11 +376,6 @@ class PrivateBin unset($data->meta->salt); } $this->_data = json_encode($data); - - // If the paste was meant to be read only once, delete it. - if ($paste->isBurnafterreading()) { - $paste->delete(); - } } else { $this->_error = self::GENERIC_ERROR; } diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 166207c..8a09748 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 a4b9e54..172d7d4 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -47,7 +47,7 @@ if ($MARKDOWN): - +