mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-13 12:27:03 +02:00
added an option to limit message restores
This commit is contained in:
@ -15,7 +15,7 @@ class ControllerMessageRestore extends Controller {
|
||||
|
||||
$this->load->model('search/search');
|
||||
$this->load->model('search/message');
|
||||
|
||||
$this->load->model('audit/audit');
|
||||
$this->load->model('user/user');
|
||||
$this->load->model('mail/mail');
|
||||
|
||||
@ -38,6 +38,10 @@ class ControllerMessageRestore extends Controller {
|
||||
}
|
||||
|
||||
|
||||
if(!$this->model_audit_audit->can_restore()) {
|
||||
die("cannot restore at the moment");
|
||||
}
|
||||
|
||||
if(!verify_piler_id($this->data['id'])) {
|
||||
AUDIT(ACTION_UNKNOWN, '', '', $this->data['id'], 'unknown piler id: ' . $this->data['id']);
|
||||
die("invalid id: " . $this->data['id']);
|
||||
|
Reference in New Issue
Block a user