mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-05-30 20:04:33 -04:00
Merge branch 'master' into burnafterreading-fix, regression in expired paste error
This commit is contained in:
commit
caf87cc6f1
86 changed files with 3901 additions and 1586 deletions
|
@ -7,7 +7,7 @@
|
|||
* @link https://github.com/PrivateBin/PrivateBin
|
||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||
* @version 1.1
|
||||
* @version 1.1.1
|
||||
*/
|
||||
|
||||
namespace PrivateBin\Model;
|
||||
|
@ -48,6 +48,11 @@ class Paste extends AbstractModel
|
|||
$data->meta->remaining_time = $data->meta->expire_date - time();
|
||||
}
|
||||
|
||||
// check if non-expired burn after reading paste needs to be deleted
|
||||
if (property_exists($data->meta, 'burnafterreading') && $data->meta->burnafterreading) {
|
||||
$this->delete();
|
||||
}
|
||||
|
||||
// set formatter for for the view.
|
||||
if (!property_exists($data->meta, 'formatter')) {
|
||||
// support < 0.21 syntax highlighting
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue