mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-07-24 23:35:26 -04:00
renaming controller #342
This commit is contained in:
parent
90e83ddb30
commit
f9c8441edb
10 changed files with 74 additions and 74 deletions
|
@ -14,7 +14,7 @@ namespace PrivateBin\Model;
|
|||
|
||||
use Exception;
|
||||
use PrivateBin\Persistence\ServerSalt;
|
||||
use PrivateBin\PrivateBin;
|
||||
use PrivateBin\Controller;
|
||||
use PrivateBin\Sjcl;
|
||||
|
||||
/**
|
||||
|
@ -35,14 +35,14 @@ class Paste extends AbstractModel
|
|||
{
|
||||
$data = $this->_store->read($this->getId());
|
||||
if ($data === false) {
|
||||
throw new Exception(PrivateBin::GENERIC_ERROR, 64);
|
||||
throw new Exception(Controller::GENERIC_ERROR, 64);
|
||||
}
|
||||
|
||||
// check if paste has expired and delete it if neccessary.
|
||||
if (property_exists($data->meta, 'expire_date')) {
|
||||
if ($data->meta->expire_date < time()) {
|
||||
$this->delete();
|
||||
throw new Exception(PrivateBin::GENERIC_ERROR, 63);
|
||||
throw new Exception(Controller::GENERIC_ERROR, 63);
|
||||
}
|
||||
// We kindly provide the remaining time before expiration (in seconds)
|
||||
$data->meta->remaining_time = $data->meta->expire_date - time();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue