added instantburnafterreading option to address #174

This commit is contained in:
El RIDO 2017-04-11 17:23:26 +02:00
parent ab2e789aee
commit f54036976a
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
5 changed files with 42 additions and 1 deletions

View file

@ -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->_conf->getKey('instantburnafterreading')) {
$this->delete();
}
// set formatter for for the view.
if (!property_exists($data->meta, 'formatter')) {
// support < 0.21 syntax highlighting