diff options
author | Marc Delisle <marc@infomarc.info> | 2014-10-20 21:14:05 +0400 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2014-10-20 21:14:05 +0400 |
commit | 8a3bf5af9f3333ac7bd526a1d945c0ebf47c3815 (patch) | |
tree | 2e05d34a8a3aa9035d07c77b612a46cdf2f94fea /server_privileges.php | |
parent | c541114ddbbe89877f5a0c73fbc2923c79bb6403 (diff) |
Refactor code duplication
Signed-off-by: Marc Delisle <marc@infomarc.info>
Diffstat (limited to 'server_privileges.php')
-rw-r--r-- | server_privileges.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/server_privileges.php b/server_privileges.php index 616ebd7660..1515d32bbc 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -43,13 +43,8 @@ $post_patterns = array( '/_priv$/i', '/^max_/i' ); -foreach (array_keys($_POST) as $post_key) { - foreach ($post_patterns as $one_post_pattern) { - if (preg_match($one_post_pattern, $post_key)) { - $GLOBALS[$post_key] = $_POST[$post_key]; - } - } -} + +PMA_setPostAsGlobal($post_patterns); require 'libraries/server_common.inc.php'; |