mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-13 01:27:03 +02:00
improved the private feature
This commit is contained in:
@ -20,6 +20,7 @@ class ControllerMessagePrivate extends Controller {
|
||||
$this->document->title = $this->data['text_message'];
|
||||
|
||||
$this->data['id'] = $this->request->post['id'];
|
||||
$this->data['val'] = $this->request->post['val'];
|
||||
|
||||
if(!verify_piler_id($this->data['id'])) {
|
||||
AUDIT(ACTION_UNKNOWN, '', '', $this->data['id'], 'unknown id: ' . $this->data['id']);
|
||||
@ -36,9 +37,11 @@ class ControllerMessagePrivate extends Controller {
|
||||
$this->data['username'] = Registry::get('username');
|
||||
|
||||
if(Registry::get('auditor_user') == 1) {
|
||||
syslog(LOG_INFO, "hokamoka:" . $this->data['id']);
|
||||
|
||||
$this->model_search_message->mark_as_private($this->data['id']);
|
||||
if($this->data['val'] == 1) {
|
||||
$this->model_search_message->mark_as_private($this->data['id']);
|
||||
} else {
|
||||
$this->model_search_message->unmark_as_private($this->data['id']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -80,6 +80,8 @@ class ControllerMessageView extends Controller {
|
||||
$this->data['message']['tag'] = $this->model_search_message->get_message_tag($this->data['id'], $session->get("uid"));
|
||||
$this->data['message']['note'] = $this->model_search_message->get_message_note($this->data['id'], $session->get("uid"));
|
||||
|
||||
$this->data['message']['private'] = $this->model_search_message->get_message_private($this->data['id']);
|
||||
|
||||
$this->data['spam'] = $this->model_search_message->is_message_spam($this->data['id']);
|
||||
|
||||
$this->data['images'] = array();
|
||||
|
Reference in New Issue
Block a user