mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 17:20:13 +01:00
fixing database schema for message removal
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
4b2eefb712
commit
b80c588a10
@ -473,10 +473,13 @@ create table if not exists `timestamp` (
|
|||||||
|
|
||||||
create table if not exists `deleted` (
|
create table if not exists `deleted` (
|
||||||
`id` bigint unsigned not null unique,
|
`id` bigint unsigned not null unique,
|
||||||
`email` varchar(128) not null,
|
`requestor` varchar(128) not null,
|
||||||
`reason` varchar(128) not null,
|
`reason1` varchar(128) not null,
|
||||||
`date1` int unsigned default 0,
|
`date1` int unsigned default 0,
|
||||||
|
`approver` varchar(128) default null,
|
||||||
|
`reason2` varchar(128) not null,
|
||||||
`date2` int unsigned default 0,
|
`date2` int unsigned default 0,
|
||||||
|
`approved` tinyint(1) default 0,
|
||||||
`deleted` tinyint(1) default 0,
|
`deleted` tinyint(1) default 0,
|
||||||
key (`id`),
|
key (`id`),
|
||||||
key (deleted)
|
key (deleted)
|
||||||
|
@ -7,7 +7,7 @@ class ControllerAuditRemoval extends Controller {
|
|||||||
|
|
||||||
$this->id = "content";
|
$this->id = "content";
|
||||||
$this->template = "audit/removal.tpl";
|
$this->template = "audit/removal.tpl";
|
||||||
$this->layout = "common/layout";
|
$this->layout = "common/layout-audit";
|
||||||
|
|
||||||
$request = Registry::get('request');
|
$request = Registry::get('request');
|
||||||
$db = Registry::get('db');
|
$db = Registry::get('db');
|
||||||
|
@ -40,7 +40,7 @@ class ControllerMessageBulkremove extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach($idlist as $id) {
|
foreach($idlist as $id) {
|
||||||
$db->query("INSERT INTO " . TABLE_DELETED . " (id, email, reason, date1, deleted) VALUES(?,?,?,?,?)", [$id, $this->data['username'], $this->request->post['reason'], NOW, $deleted]);
|
$db->query("INSERT INTO " . TABLE_DELETED . " (id, requestor, reason1, date1, deleted) VALUES(?,?,?,?,?)", [$id, $this->data['username'], $this->request->post['reason'], NOW, $deleted]);
|
||||||
|
|
||||||
if(NEED_TO_APPROVE_DELETE) {
|
if(NEED_TO_APPROVE_DELETE) {
|
||||||
AUDIT(ACTION_MARK_MESSAGE_FOR_REMOVAL, '', '', $id, '');
|
AUDIT(ACTION_MARK_MESSAGE_FOR_REMOVAL, '', '', $id, '');
|
||||||
|
@ -686,13 +686,13 @@ class ModelSearchSearch extends Model {
|
|||||||
|
|
||||||
if($id == '') { return 0; }
|
if($id == '') { return 0; }
|
||||||
|
|
||||||
if(Registry::get('auditor_user') == 1 && RESTRICTED_AUDITOR == 0) { return 1; }
|
if((Registry::get('auditor_user') == 1 || Registry::get('data_officer') == 1) && RESTRICTED_AUDITOR == 0) { return 1; }
|
||||||
|
|
||||||
$session = Registry::get('session');
|
$session = Registry::get('session');
|
||||||
|
|
||||||
array_push($arr, $id);
|
array_push($arr, $id);
|
||||||
|
|
||||||
if(Registry::get('auditor_user') == 1 && RESTRICTED_AUDITOR == 1) {
|
if((Registry::get('auditor_user') == 1 || Registry::get('data_officer') == 1) && RESTRICTED_AUDITOR == 1) {
|
||||||
if(validdomain($session->get("domain")) == 1) {
|
if(validdomain($session->get("domain")) == 1) {
|
||||||
$q .= ",?";
|
$q .= ",?";
|
||||||
array_push($a, $session->get("domain"));
|
array_push($a, $session->get("domain"));
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if(Registry::get('auditor_user') == 1) { ?>
|
<?php if(Registry::get('auditor_user') == 1 || Registry::get('data_officer') == 1) { ?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var mailviewsplit = new rcube_splitter({id:'splitter2', p1: 'mailcontframe', p2: 'mailpreviewframe', orientation: 'h', relative: true, start: 341});
|
var mailviewsplit = new rcube_splitter({id:'splitter2', p1: 'mailcontframe', p2: 'mailpreviewframe', orientation: 'h', relative: true, start: 341});
|
||||||
@ -94,7 +94,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if(Registry::get('auditor_user') == 1) { ?>
|
<?php if(Registry::get('auditor_user') == 1 || Registry::get('data_officer') == 1) { ?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
Loading…
Reference in New Issue
Block a user