found and fixed a bug when using expiration together with discussion

This commit is contained in:
El RIDO
2015-10-03 17:54:18 +02:00
parent add980d36f
commit e5b096ed8c
2 changed files with 36 additions and 1 deletions

View File

@@ -243,6 +243,8 @@ class zerobin
{
$paste = $this->_model->getPaste();
try {
$paste->setData($data);
if (!empty($attachment))
{
$paste->setAttachment($attachment);
@@ -262,7 +264,6 @@ class zerobin
$formatter = $this->_request->getParam('formatter');
if (!empty($formatter)) $paste->setFormatter($formatter);
$paste->setData($data);
$paste->store();
} catch (Exception $e) {
return $this->_return_message(1, $e->getMessage());