Fix mistakenly broken regexp

This commit is contained in:
Michal Čihař 2011-07-22 09:25:14 +02:00
parent 9405dbb82a
commit 236582fb4f
3 changed files with 4 additions and 4 deletions

View File

@ -567,7 +567,7 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
} // end if
if (!empty($error_message)) {
$error_message = preg_replace("@((\015\012)|(\015)|(\012)) {3,}@", "\n\n", $error_message);
$error_message = preg_replace("@((\015\012)|(\015)|(\012)){3,}@", "\n\n", $error_message);
}
// modified to show the help on error-returns
// (now error-messages-server)

View File

@ -30,7 +30,7 @@ function PMA_getIp()
$trusted_header_value = PMA_getenv($GLOBALS['cfg']['TrustedProxies'][$direct_ip]);
$matches = array();
// the $ checks that the header contains only one IP address, ?: makes sure the () don't capture
$is_ip = preg_match('|^(?:[0-9]{1,3}\.) {3,3}[0-9]{1,3}$|', $trusted_header_value, $matches);
$is_ip = preg_match('|^(?:[0-9]{1,3}\.){3,3}[0-9]{1,3}$|', $trusted_header_value, $matches);
if ($is_ip && (count($matches) == 1)) {
// True IP behind a proxy
return $matches[0];
@ -46,7 +46,7 @@ function PMA_getIp()
* Based on IP Pattern Matcher
* Originally by J.Adams <jna@retina.net>
* Found on <http://www.php.net/manual/en/function.ip2long.php>
* Modified for phpMyAdmin
* Modified for phpMyAdmin
*
* Matches:
* xxx.xxx.xxx.xxx (exact)

View File

@ -2725,7 +2725,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
function PMA_SQP_formatNone($arr)
{
$formatted_sql = htmlspecialchars($arr['raw']);
$formatted_sql = preg_replace("@((\015\012)|(\015)|(\012)) {3,}@", "\n\n", $formatted_sql);
$formatted_sql = preg_replace("@((\015\012)|(\015)|(\012)){3,}@", "\n\n", $formatted_sql);
return $formatted_sql;
} // end of the "PMA_SQP_formatNone()" function