Adjust requested changes

This commit is contained in:
rugk
2017-04-13 10:46:09 +02:00
parent 073b52ce96
commit 9b6748c54d
5 changed files with 9 additions and 9 deletions

View File

@@ -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

View File

@@ -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;
}