mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-13 01:37:02 +02:00
added an option to limit message downloads
This commit is contained in:
@ -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']);
|
||||
|
@ -14,7 +14,7 @@ class ControllerMessageHeaders extends Controller {
|
||||
|
||||
$this->load->model('search/search');
|
||||
$this->load->model('search/message');
|
||||
|
||||
$this->load->model('audit/audit');
|
||||
$this->load->model('user/user');
|
||||
|
||||
$this->document->title = $this->data['text_message'];
|
||||
@ -39,6 +39,8 @@ class ControllerMessageHeaders extends Controller {
|
||||
|
||||
$this->data['message'] = $this->model_search_message->get_message_headers($this->data['piler_id']);
|
||||
|
||||
$this->data['can_download'] = $this->model_audit_audit->can_download();
|
||||
|
||||
$this->render();
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,8 @@ class ControllerMessageJournal extends Controller {
|
||||
|
||||
$this->data['data'] = $this->model_search_message->get_message_journal($this->data['piler_id']);
|
||||
|
||||
$this->data['can_download'] = $this->model_audit_audit->can_download();
|
||||
|
||||
$this->render();
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,8 @@ class ControllerMessageView extends Controller {
|
||||
|
||||
$this->data['images'] = array();
|
||||
|
||||
$this->data['can_download'] = $this->model_audit_audit->can_download();
|
||||
|
||||
foreach($this->data['attachments'] as $a) {
|
||||
if(preg_match("/image/", $a['type'])) {
|
||||
$attachment = $this->model_search_message->get_attachment_by_id($a['id']);
|
||||
|
Reference in New Issue
Block a user