From d19908eab1bbda9afd0cd430a4affdcee9742835 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?=
Date: Thu, 29 Aug 2019 18:53:27 -0300
Subject: [PATCH] Extract global/db specific privs view logic to twig
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: MaurĂcio Meneghini Fauth
---
libraries/classes/Server/Privileges.php | 285 +----------
.../global_db_specific_privileges.twig | 463 +++++++++++++++++-
2 files changed, 464 insertions(+), 284 deletions(-)
diff --git a/libraries/classes/Server/Privileges.php b/libraries/classes/Server/Privileges.php
index f241d0ba5b..5f0ececc02 100644
--- a/libraries/classes/Server/Privileges.php
+++ b/libraries/classes/Server/Privileges.php
@@ -727,7 +727,11 @@ class Privileges
);
} else {
// global or db-specific
- $html_output .= $this->getHtmlForGlobalOrDbSpecificPrivs($db, $table, $row);
+ $html_output .= $this->template->render('server/privileges/global_db_specific_privileges', [
+ 'is_global' => $db === '*',
+ 'is_database' => $table === '*',
+ 'row' => $row,
+ ]);
}
if ($submit) {
$html_output .= '
- {{ global_priv_table|raw }}
+
+
+
+
+
{% if is_global %}
+