diff --git a/browse_foreigners.php b/browse_foreigners.php
index c31d74ca8a..1a8150454c 100644
--- a/browse_foreigners.php
+++ b/browse_foreigners.php
@@ -59,16 +59,16 @@ if (is_array($foreignData['disp_row'])) {
if ($foreignData['the_total'] > $GLOBALS['cfg']['MaxRows']) {
$gotopage = PMA_pageselector(
- $session_max_rows,
- $pageNow,
- $nbTotalPage,
- 200,
- 5,
- 5,
- 20,
- 10,
- __('Page number:')
- );
+ $session_max_rows,
+ $pageNow,
+ $nbTotalPage,
+ 200,
+ 5,
+ 5,
+ 20,
+ 10,
+ __('Page number:')
+ );
}
}
?>
@@ -220,9 +220,10 @@ if (is_array($foreignData['disp_row'])) {
} else {
$val_ordered_current_val_title =
htmlspecialchars($val_ordered_current_val);
- $val_ordered_current_val =
- htmlspecialchars(PMA_substr($val_ordered_current_val, 0,
- $cfg['LimitChars']) . '...');
+ $val_ordered_current_val = htmlspecialchars(
+ PMA_substr($val_ordered_current_val, 0, $cfg['LimitChars'])
+ . '...'
+ );
}
if (PMA_strlen($key_ordered_current_val) <= $cfg['LimitChars']) {
$key_ordered_current_val = htmlspecialchars($key_ordered_current_val);
diff --git a/libraries/Theme_Manager.class.php b/libraries/Theme_Manager.class.php
index d6c4ea0989..eac54ef52a 100644
--- a/libraries/Theme_Manager.class.php
+++ b/libraries/Theme_Manager.class.php
@@ -106,9 +106,12 @@ class PMA_Theme_Manager
if (! $this->checkTheme($GLOBALS['cfg']['ThemeDefault'])) {
trigger_error(
- sprintf(__('Default theme %s not found!'),
- htmlspecialchars($GLOBALS['cfg']['ThemeDefault'])),
- E_USER_ERROR);
+ sprintf(
+ __('Default theme %s not found!'),
+ htmlspecialchars($GLOBALS['cfg']['ThemeDefault'])
+ ),
+ E_USER_ERROR
+ );
$GLOBALS['cfg']['ThemeDefault'] = false;
}
@@ -144,7 +147,10 @@ class PMA_Theme_Manager
{
if (! $this->checkTheme($theme)) {
trigger_error(
- sprintf(__('Theme %s not found!'), htmlspecialchars($theme)),
+ sprintf(
+ __('Theme %s not found!'),
+ htmlspecialchars($theme)
+ ),
E_USER_ERROR);
return false;
}
@@ -203,7 +209,7 @@ class PMA_Theme_Manager
* @param string $folder
* @return boolean
*/
- /*private*/ function _checkThemeFolder($folder)
+ private function _checkThemeFolder($folder)
{
if (! is_dir($folder)) {
trigger_error(
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index b03e5dc855..6912e38795 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -50,21 +50,21 @@ function PMA_pow($base, $exp, $use_function = false)
return false;
}
switch ($use_function) {
- case 'bcpow' :
- // bcscale() needed for testing PMA_pow() with base values < 1
- bcscale(10);
- $pow = bcpow($base, $exp);
- break;
- case 'gmp_pow' :
- $pow = gmp_strval(gmp_pow($base, $exp));
- break;
- case 'pow' :
- $base = (float) $base;
- $exp = (int) $exp;
- $pow = pow($base, $exp);
- break;
- default:
- $pow = $use_function($base, $exp);
+ case 'bcpow' :
+ // bcscale() needed for testing PMA_pow() with base values < 1
+ bcscale(10);
+ $pow = bcpow($base, $exp);
+ break;
+ case 'gmp_pow' :
+ $pow = gmp_strval(gmp_pow($base, $exp));
+ break;
+ case 'pow' :
+ $base = (float) $base;
+ $exp = (int) $exp;
+ $pow = pow($base, $exp);
+ break;
+ default:
+ $pow = $use_function($base, $exp);
}
return $pow;
@@ -301,23 +301,23 @@ function PMA_formatSql($parsed_sql, $unparsed_sql = '')
$formatted_sql = '';
switch ($cfg['SQP']['fmtType']) {
- case 'none':
- if ($unparsed_sql != '') {
- $formatted_sql = '' . "\n"
- . PMA_SQP_formatNone(array('raw' => $unparsed_sql)) . "\n"
- . '';
- } else {
- $formatted_sql = PMA_SQP_formatNone($parsed_sql);
- }
- break;
- case 'html':
- $formatted_sql = PMA_SQP_formatHtml($parsed_sql, 'color');
- break;
- case 'text':
- $formatted_sql = PMA_SQP_formatHtml($parsed_sql, 'text');
- break;
- default:
- break;
+ case 'none':
+ if ($unparsed_sql != '') {
+ $formatted_sql = '' . "\n"
+ . PMA_SQP_formatNone(array('raw' => $unparsed_sql)) . "\n"
+ . '';
+ } else {
+ $formatted_sql = PMA_SQP_formatNone($parsed_sql);
+ }
+ break;
+ case 'html':
+ $formatted_sql = PMA_SQP_formatHtml($parsed_sql, 'color');
+ break;
+ case 'text':
+ $formatted_sql = PMA_SQP_formatHtml($parsed_sql, 'text');
+ break;
+ default:
+ break;
} // end switch
return $formatted_sql;
@@ -350,57 +350,57 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '', $ju
$link = str_replace('_', '-', strtolower($link));
switch ($cfg['MySQLManualType']) {
- case 'chapters':
- if (empty($chapter)) {
- $chapter = 'index';
+ case 'chapters':
+ if (empty($chapter)) {
+ $chapter = 'index';
+ }
+ if (empty($anchor)) {
+ $anchor = $link;
+ }
+ $url = $cfg['MySQLManualBase'] . '/' . $chapter . '.html#' . $anchor;
+ break;
+ case 'big':
+ if (empty($anchor)) {
+ $anchor = $link;
+ }
+ $url = $cfg['MySQLManualBase'] . '#' . $anchor;
+ break;
+ case 'searchable':
+ if (empty($link)) {
+ $link = 'index';
+ }
+ $url = $cfg['MySQLManualBase'] . '/' . $link . '.html';
+ if (!empty($anchor)) {
+ $url .= '#' . $anchor;
+ }
+ break;
+ case 'viewable':
+ default:
+ if (empty($link)) {
+ $link = 'index';
+ }
+ $mysql = '5.0';
+ $lang = 'en';
+ if (defined('PMA_MYSQL_INT_VERSION')) {
+ if (PMA_MYSQL_INT_VERSION >= 50500) {
+ $mysql = '5.5';
+ /* l10n: Language to use for MySQL 5.5 documentation, please use only languages which do exist in official documentation. */
+ $lang = _pgettext('MySQL 5.5 documentation language', 'en');
+ } else if (PMA_MYSQL_INT_VERSION >= 50100) {
+ $mysql = '5.1';
+ /* l10n: Language to use for MySQL 5.1 documentation, please use only languages which do exist in official documentation. */
+ $lang = _pgettext('MySQL 5.1 documentation language', 'en');
+ } else {
+ $mysql = '5.0';
+ /* l10n: Language to use for MySQL 5.0 documentation, please use only languages which do exist in official documentation. */
+ $lang = _pgettext('MySQL 5.0 documentation language', 'en');
}
- if (empty($anchor)) {
- $anchor = $link;
- }
- $url = $cfg['MySQLManualBase'] . '/' . $chapter . '.html#' . $anchor;
- break;
- case 'big':
- if (empty($anchor)) {
- $anchor = $link;
- }
- $url = $cfg['MySQLManualBase'] . '#' . $anchor;
- break;
- case 'searchable':
- if (empty($link)) {
- $link = 'index';
- }
- $url = $cfg['MySQLManualBase'] . '/' . $link . '.html';
- if (!empty($anchor)) {
- $url .= '#' . $anchor;
- }
- break;
- case 'viewable':
- default:
- if (empty($link)) {
- $link = 'index';
- }
- $mysql = '5.0';
- $lang = 'en';
- if (defined('PMA_MYSQL_INT_VERSION')) {
- if (PMA_MYSQL_INT_VERSION >= 50500) {
- $mysql = '5.5';
- /* l10n: Language to use for MySQL 5.5 documentation, please use only languages which do exist in official documentation. */
- $lang = _pgettext('MySQL 5.5 documentation language', 'en');
- } else if (PMA_MYSQL_INT_VERSION >= 50100) {
- $mysql = '5.1';
- /* l10n: Language to use for MySQL 5.1 documentation, please use only languages which do exist in official documentation. */
- $lang = _pgettext('MySQL 5.1 documentation language', 'en');
- } else {
- $mysql = '5.0';
- /* l10n: Language to use for MySQL 5.0 documentation, please use only languages which do exist in official documentation. */
- $lang = _pgettext('MySQL 5.0 documentation language', 'en');
- }
- }
- $url = $cfg['MySQLManualBase'] . '/' . $mysql . '/' . $lang . '/' . $link . '.html';
- if (!empty($anchor)) {
- $url .= '#' . $anchor;
- }
- break;
+ }
+ $url = $cfg['MySQLManualBase'] . '/' . $mysql . '/' . $lang . '/' . $link . '.html';
+ if (!empty($anchor)) {
+ $url .= '#' . $anchor;
+ }
+ break;
}
$open_link = '';
@@ -615,14 +615,14 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
$_SESSION['Import_message']['message'] = $error_msg_output;
if ($exit) {
- /**
- * If in an Ajax request
- * - avoid displaying a Back link
- * - use PMA_ajaxResponse() to transmit the message and exit
- */
- if ($GLOBALS['is_ajax_request'] == true) {
- PMA_ajaxResponse($error_msg_output, false);
- }
+ /**
+ * If in an Ajax request
+ * - avoid displaying a Back link
+ * - use PMA_ajaxResponse() to transmit the message and exit
+ */
+ if ($GLOBALS['is_ajax_request'] == true) {
+ PMA_ajaxResponse($error_msg_output, false);
+ }
if (! empty($back_url)) {
if (strstr($back_url, '?')) {
$back_url .= '&no_history=true';
@@ -635,13 +635,13 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
$error_msg_output .= '