Merge remote-tracking branch 'remotes/thororm/master' into attachment-handling

# Conflicts:
#	tpl/bootstrap.php
#	tpl/page.php
This commit is contained in:
thororm
2017-05-13 19:48:25 +02:00
16 changed files with 468 additions and 80 deletions

View File

@@ -42,6 +42,7 @@ class Configuration
'password' => true,
'fileupload' => false,
'burnafterreadingselected' => false,
'instantburnafterreading' => false,
'defaultformatter' => 'plaintext',
'syntaxhighlightingtheme' => null,
'sizelimit' => 2097152,

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