added a select option to auditors to define the recipients of the message to be restored

This commit is contained in:
SJ
2012-12-20 14:11:17 +01:00
parent cc55883b35
commit a079c915c6
13 changed files with 123 additions and 28 deletions

View File

@@ -21,8 +21,9 @@ class ControllerMessageView extends Controller {
$this->document->title = $this->data['text_message'];
$this->data['id'] = '';
$this->data['rcpt'] = array();
if(isset($_SERVER['REQUEST_URI'])) { $this->data['id'] = preg_replace("/\/message.php\//", "", $_SERVER['REQUEST_URI']); }
if(isset($_SERVER['REQUEST_URI'])) { $a = preg_split("/\//", $_SERVER['REQUEST_URI']); $this->data['id'] = $a[count($a)-1]; }
if($this->request->server['REQUEST_METHOD'] == 'POST') {
$this->data['id'] = $this->request->post['id'];
@@ -44,6 +45,8 @@ class ControllerMessageView extends Controller {
$this->data['username'] = Registry::get('username');
if(Registry::get('auditor_user') == 1) { $this->data['rcpt'] = $this->model_search_search->get_message_addresses_in_my_domain($this->data['id']); }
/* fix username if we are admin */
if(isset($this->request->get['user']) && strlen($this->request->get['user']) > 1 && (Registry::get('admin_user') == 1 || $this->model_user_user->isUserInMyDomain($this->request->get['user']) == 1) ) {