added an option to limit message downloads

This commit is contained in:
SJ
2015-07-28 21:56:50 +02:00
parent 19b9340868
commit 39468c3877
12 changed files with 39 additions and 1 deletions

View File

@ -14,11 +14,14 @@ class ControllerMessageDownload extends Controller {
$this->load->model('search/search');
$this->load->model('search/message');
$this->load->model('audit/audit');
$this->document->title = $this->data['text_message'];
$this->data['id'] = @$this->request->get['id'];
if(!$this->model_audit_audit->can_download()) { die("you cannot download at the moment"); }
if(!verify_piler_id($this->data['id'])) {
AUDIT(ACTION_UNKNOWN, '', '', $this->data['id'], 'unknown id: ' . $this->data['id']);
die("invalid id: " . $this->data['id']);