diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php index ed737b5d8a..6c71446ed1 100644 --- a/libraries/server_privileges.lib.php +++ b/libraries/server_privileges.lib.php @@ -1119,14 +1119,20 @@ function PMA_getMessageForUpdatePassword($pma_pw, $pma_pw2, $err_url, $username, if (empty($message)) { $common_functions = PMA_CommonFunctions::getInstance(); - $hashing_function = (! empty($_REQUEST['pw_hash']) && $_REQUEST['pw_hash'] == 'old' ? 'OLD_' : '') - . 'PASSWORD'; + $hashing_function = + (! empty($_REQUEST['pw_hash']) && $_REQUEST['pw_hash'] == 'old' + ? 'OLD_' + : '' + ) + . 'PASSWORD'; // in $sql_query which will be displayed, hide the password $sql_query = 'SET PASSWORD FOR \'' . $common_functions->sqlAddSlashes($username) . '\'@\'' . $common_functions->sqlAddSlashes($hostname) . '\' = ' - . (($pma_pw == '') ? '\'\'' : $hashing_function . '(\'' . preg_replace('@.@s', '*', $pma_pw) . '\')'); + . (($pma_pw == '') + ? '\'\'' + : $hashing_function . '(\'' . preg_replace('@.@s', '*', $pma_pw) . '\')'); $local_query = 'SET PASSWORD FOR \'' . $common_functions->sqlAddSlashes($username) @@ -1137,7 +1143,9 @@ function PMA_getMessageForUpdatePassword($pma_pw, $pma_pw2, $err_url, $username, PMA_DBI_try_query($local_query) or $common_functions->mysqlDie(PMA_DBI_getError(), $sql_query, false, $err_url); $message = PMA_Message::success(__('The password for %s was changed successfully.')); - $message->addParam('\'' . htmlspecialchars($username) . '\'@\'' . htmlspecialchars($hostname) . '\''); + $message->addParam( + '\'' . htmlspecialchars($username) . '\'@\'' . htmlspecialchars($hostname) . '\'' + ); } return $message; } @@ -1158,7 +1166,8 @@ function PMA_getMessageAndSqlQueryForPrivilegesRevoke($db_and_table, $dbname, $db_and_table = PMA_wildcardEscapeForGrant($dbname, $tablename); $sql_query0 = 'REVOKE ALL PRIVILEGES ON ' . $db_and_table - . ' FROM \'' . PMA_CommonFunctions::getInstance()->sqlAddSlashes($username) . '\'@\'' + . ' FROM \'' + . PMA_CommonFunctions::getInstance()->sqlAddSlashes($username) . '\'@\'' . PMA_CommonFunctions::getInstance()->sqlAddSlashes($hostname) . '\';'; $sql_query1 = 'REVOKE GRANT OPTION ON ' . $db_and_table @@ -1172,7 +1181,9 @@ function PMA_getMessageAndSqlQueryForPrivilegesRevoke($db_and_table, $dbname, } $sql_query = $sql_query0 . ' ' . $sql_query1; $message = PMA_Message::success(__('You have revoked the privileges for %s')); - $message->addParam('\'' . htmlspecialchars($username) . '\'@\'' . htmlspecialchars($hostname) . '\''); + $message->addParam( + '\'' . htmlspecialchars($username) . '\'@\'' . htmlspecialchars($hostname) . '\'' + ); return array($message, $sql_query); } @@ -1223,7 +1234,8 @@ function PMA_getHtmlForAddUser($random_n, $dbname) $html_output = '
' . htmlspecialchars($current['Db']) . '
' . "\n" - . '' . join(',' . "\n" . ' ', PMA_extractPrivInfo($current, true)) . "\n" + . '' + . join(',' . "\n" . ' ', PMA_extractPrivInfo($current, true)) . "\n" . '
' . "\n" - . ' ' . join(',' . "\n" . ' ', PMA_extractPrivInfo($row, true)) . "\n" + . ' ' + . join(',' . "\n" . ' ', PMA_extractPrivInfo($row, true)) . "\n" . '