mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 18:40:13 +01:00
added an option to delete emails from archive for auditors
This commit is contained in:
parent
2b6e12d89a
commit
db578ea6d0
@ -15,8 +15,6 @@ class ControllerMessageBulkremove extends Controller {
|
||||
|
||||
$this->load->model('search/search');
|
||||
$this->load->model('search/message');
|
||||
//$this->load->model('message/remove');
|
||||
|
||||
$this->load->model('user/user');
|
||||
|
||||
|
||||
@ -29,23 +27,21 @@ class ControllerMessageBulkremove extends Controller {
|
||||
|
||||
$this->data['username'] = Registry::get('username');
|
||||
|
||||
$this->model_search_message->connect_to_pilergetd();
|
||||
if(Registry::get('auditor_user') == 0) {
|
||||
die("go away");
|
||||
}
|
||||
|
||||
foreach($idlist as $id) {
|
||||
|
||||
AUDIT(ACTION_REMOVE_MESSAGE, '', '', $id, '');
|
||||
|
||||
$piler_id = $this->model_search_message->get_piler_id_by_id($id);
|
||||
$db->query("UPDATE " . TABLE_META . " SET retained=? WHERE id=?", array(NOW, $id));
|
||||
|
||||
syslog(LOG_INFO, "removing $piler_id");
|
||||
syslog(LOG_INFO, $this->data['username'] . " removed message: $id");
|
||||
|
||||
$x = 1;
|
||||
|
||||
if($x == 1) { $this->data['removed']++; }
|
||||
$this->data['removed']++;
|
||||
}
|
||||
|
||||
$this->model_search_message->disconnect_from_pilergetd();
|
||||
|
||||
$this->render();
|
||||
}
|
||||
|
||||
|
@ -556,6 +556,8 @@ class ModelSearchSearch extends Model {
|
||||
$this->model_search_message->connect_to_pilergetd();
|
||||
|
||||
foreach($query->rows as $m) {
|
||||
if($m['retained'] < NOW) continue;
|
||||
|
||||
$m['shortfrom'] = make_short_string($m['from'], MAX_CGI_FROM_SUBJ_LEN);
|
||||
$m['from'] = escape_gt_lt_quote_symbols($m['from']);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user