Ver Fonte

Adjust requested changes

rugk há 9 anos atrás
pai
commit
9b6748c54d
5 ficheiros alterados com 9 adições e 9 exclusões
  1. 2 2
      js/privatebin.js
  2. 5 0
      lib/Model/Paste.php
  3. 0 5
      lib/PrivateBin.php
  4. 1 1
      tpl/bootstrap.php
  5. 1 1
      tpl/page.php

+ 2 - 2
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.");

+ 5 - 0
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

+ 0 - 5
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;
             }

+ 1 - 1
tpl/bootstrap.php

@@ -69,7 +69,7 @@ if ($MARKDOWN):
 <?php
 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]>
 		<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
 		<![endif]-->

+ 1 - 1
tpl/page.php

@@ -47,7 +47,7 @@ if ($MARKDOWN):
 <?php
 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]>
 		<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
 		<![endif]-->