diff --git a/js/privatebin.js b/js/privatebin.js index 394ebb37..0dbdff12 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 938d1840..6bd6f2e2 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 30283cdc..cd7ff576 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 166207c1..8a09748f 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 a4b9e54e..172d7d47 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -47,7 +47,7 @@ if ($MARKDOWN): - +