1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-11-01 23:14:58 +03:00

Optimize function call

Signed-off-by: Marc Delisle <marc@infomarc.info>
This commit is contained in:
Marc Delisle
2015-09-25 13:48:55 -04:00
parent a8e66a5853
commit 62a4e61a65

View File

@@ -4905,6 +4905,7 @@ function PMA_getSqlQueriesForDisplayAndAddUser($username, $hostname, $password)
$slashedUsername = PMA_Util::sqlAddSlashes($username);
$slashedHostname = PMA_Util::sqlAddSlashes($hostname);
$slashedPassword = PMA_Util::sqlAddSlashes($password);
$serverType = PMA_Util::getServerType();
$create_user_stmt = sprintf(
'CREATE USER \'%s\'@\'%s\'',
@@ -4913,14 +4914,14 @@ function PMA_getSqlQueriesForDisplayAndAddUser($username, $hostname, $password)
);
if (PMA_MYSQL_INT_VERSION >= 50507
&& PMA_Util::getServerType() == 'MySQL'
&& $serverType == 'MySQL'
&& isset($_REQUEST['authentication_plugin'])
) {
$create_user_stmt .= ' IDENTIFIED WITH '
. $_REQUEST['authentication_plugin'];
}
if (PMA_MYSQL_INT_VERSION >= 50707
&& PMA_Util::getServerType() == 'MySQL'
&& $serverType == 'MySQL'
&& strpos($create_user_stmt, '%') !== false
) {
$create_user_stmt = str_replace(
@@ -4947,7 +4948,7 @@ function PMA_getSqlQueriesForDisplayAndAddUser($username, $hostname, $password)
$real_sql_query = $sql_query = $sql_query_stmt;
if (PMA_MYSQL_INT_VERSION < 50707
|| PMA_Util::getServerType() != 'MySQL'
|| $serverType != 'MySQL'
) {
if ($_POST['pred_password'] == 'keep') {
$password_set_real = sprintf(
@@ -5032,7 +5033,7 @@ function PMA_getSqlQueriesForDisplayAndAddUser($username, $hostname, $password)
$sql_query = '';
}
if (PMA_Util::getServerType() == 'MySQL'
if ($serverType == 'MySQL'
&& PMA_MYSQL_INT_VERSION >= 50700
) {
$password_set_real = null;