Adjust requested changes

This commit is contained in:
rugk 2017-04-13 10:46:09 +02:00
parent 073b52ce96
commit 9b6748c54d
No known key found for this signature in database
GPG key ID: 05D40A636AFAB34D
5 changed files with 9 additions and 9 deletions

View file

@ -43,7 +43,7 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
var me = {}; var me = {};
/** /**
* list of UserAgents (parts) known to belong to a bot * blacklist of UserAgents (parts) known to belong to a bot
* *
* @private * @private
* @enum {Object} * @enum {Object}
@ -1390,7 +1390,7 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
if (pasteMetaData.burnafterreading) { if (pasteMetaData.burnafterreading) {
// display paste "for your eyes only" if it is deleted // 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 // has been downloaded
Alert.showRemaining("FOR YOUR EYES ONLY. Don't close this window, this message can't be displayed again."); Alert.showRemaining("FOR YOUR EYES ONLY. Don't close this window, this message can't be displayed again.");

View file

@ -48,6 +48,11 @@ class Paste extends AbstractModel
$data->meta->remaining_time = $data->meta->expire_date - time(); $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. // set formatter for for the view.
if (!property_exists($data->meta, 'formatter')) { if (!property_exists($data->meta, 'formatter')) {
// support < 0.21 syntax highlighting // support < 0.21 syntax highlighting

View file

@ -376,11 +376,6 @@ class PrivateBin
unset($data->meta->salt); unset($data->meta->salt);
} }
$this->_data = json_encode($data); $this->_data = json_encode($data);
// If the paste was meant to be read only once, delete it.
if ($paste->isBurnafterreading()) {
$paste->delete();
}
} else { } else {
$this->_error = self::GENERIC_ERROR; $this->_error = self::GENERIC_ERROR;
} }

View file

@ -69,7 +69,7 @@ if ($MARKDOWN):
<?php <?php
endif; endif;
?> ?>
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-fkW9atVxkKFf2q0zX8hWvuR1wTcQQIsIbjPsI5MxxFOn1i5ib1KMDrsjmf5tDuhGHRDa3nF/tQUzQUyirGm+lA==" crossorigin="anonymous"></script> <script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-RFxFzaLFEWaKebOSTwwDtsfv1WBl7x/FOjBeoHxTGOeuwy5jUp2Woyiw4cJUtyMMlFHMQmd4REzomUIksszKKg==" crossorigin="anonymous"></script>
<!--[if lt IE 10]> <!--[if lt IE 10]>
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style> <style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
<![endif]--> <![endif]-->

View file

@ -47,7 +47,7 @@ if ($MARKDOWN):
<?php <?php
endif; endif;
?> ?>
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-fkW9atVxkKFf2q0zX8hWvuR1wTcQQIsIbjPsI5MxxFOn1i5ib1KMDrsjmf5tDuhGHRDa3nF/tQUzQUyirGm+lA==" crossorigin="anonymous"></script> <script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-RFxFzaLFEWaKebOSTwwDtsfv1WBl7x/FOjBeoHxTGOeuwy5jUp2Woyiw4cJUtyMMlFHMQmd4REzomUIksszKKg==" crossorigin="anonymous"></script>
<!--[if lt IE 10]> <!--[if lt IE 10]>
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style> <style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
<![endif]--> <![endif]-->