From 874fb36d6b7a78cb5dd592970d9c6d4239e03fa6 Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Tue, 20 Aug 2019 15:41:18 +0200 Subject: [PATCH] gdpr fixes Signed-off-by: Janos SUTO --- config.php.in | 9 +++++ webui/controller/login/login.php | 3 ++ webui/controller/message/bulkremove.php | 4 +-- webui/model/audit/removal.php | 2 +- .../theme/default/templates/audit/removal.tpl | 16 ++++----- .../templates/common/layout-audit-removal.tpl | 35 ++++++++++++------- 6 files changed, 46 insertions(+), 23 deletions(-) diff --git a/config.php.in b/config.php.in index 61356182..8f33fb7d 100644 --- a/config.php.in +++ b/config.php.in @@ -277,6 +277,15 @@ $config['FOUR_EYES_LOGIN_FOR_AUDITOR'] = 0; $config['MEMCACHED_PREFIX'] = '_piler:'; $config['MEMCACHED_TTL'] = 900; +$config['JS_CODE'] = ' + + + + + + +'; + $SUPPRESS_RECIPIENTS = array(); diff --git a/webui/controller/login/login.php b/webui/controller/login/login.php index 04625da3..67efb2f2 100644 --- a/webui/controller/login/login.php +++ b/webui/controller/login/login.php @@ -75,6 +75,9 @@ class ControllerLoginLogin extends Controller { if(isAdminUser() == 1) { header("Location: " . SITE_URL . "index.php?route=health/health"); exit; + } else ifisAdminUser() == 4) { + header("Location: " . SITE_URL . "index.php?route=audit/removal"); + exit; } header("Location: " . SITE_URL . "search.php"); diff --git a/webui/controller/message/bulkremove.php b/webui/controller/message/bulkremove.php index fcd7d400..62826409 100644 --- a/webui/controller/message/bulkremove.php +++ b/webui/controller/message/bulkremove.php @@ -34,9 +34,9 @@ class ControllerMessageBulkremove extends Controller { } if(NEED_TO_APPROVE_DELETE) { - $deleted = 0; - } else { $deleted = -1; + } else { + $deleted = 1; } foreach($idlist as $id) { diff --git a/webui/model/audit/removal.php b/webui/model/audit/removal.php index 1d276525..2daecc5a 100644 --- a/webui/model/audit/removal.php +++ b/webui/model/audit/removal.php @@ -9,7 +9,7 @@ class ModelAuditRemoval extends Model { if($page_len > 0) { $limit = " LIMIT " . (int)$from . ", " . (int)$page_len; } $query = $this->db->query("SELECT * FROM " . TABLE_DELETED . " WHERE deleted=-1 ORDER BY date1 DESC $limit"); - + return $query->rows; } diff --git a/webui/view/theme/default/templates/audit/removal.tpl b/webui/view/theme/default/templates/audit/removal.tpl index fd630be6..53da88ec 100644 --- a/webui/view/theme/default/templates/audit/removal.tpl +++ b/webui/view/theme/default/templates/audit/removal.tpl @@ -13,7 +13,7 @@ - + @@ -31,18 +31,18 @@ - + - - - - -   -   + + + + +   +   diff --git a/webui/view/theme/default/templates/common/layout-audit-removal.tpl b/webui/view/theme/default/templates/common/layout-audit-removal.tpl index 53c4ec28..8742550d 100644 --- a/webui/view/theme/default/templates/common/layout-audit-removal.tpl +++ b/webui/view/theme/default/templates/common/layout-audit-removal.tpl @@ -13,18 +13,8 @@ - - - + - - - - - @@ -41,7 +31,21 @@
-