From be2c09f36c789402d26ffefb82bc0ea7114368af Mon Sep 17 00:00:00 2001 From: Dieter Adriaenssens Date: Tue, 15 Jan 2013 20:15:50 +0100 Subject: [PATCH] improve coding style --- libraries/Util.class.php | 32 ++++++++++++++--------- libraries/display_change_password.lib.php | 12 +++++---- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 5d1cce6623..5155564a31 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -1238,7 +1238,8 @@ class PMA_Util $edit_link .= PMA_generate_common_url($url_params) . '#querybox'; $edit_link = ' [' . self::linkOrButton( - $edit_link, __('Edit'), array('onclick' => $onclick, 'class' => 'disableAjax') + $edit_link, __('Edit'), + array('onclick' => $onclick, 'class' => 'disableAjax') ) . ']'; } else { @@ -1839,8 +1840,9 @@ class PMA_Util * * @return string html-code for tab-navigation */ - public static function getHtmlTabs($tabs, $url_params, $menu_id, $resizable = false) - { + public static function getHtmlTabs($tabs, $url_params, $menu_id, + $resizable = false + ) { $class = ''; if ($resizable) { $class = ' class="resizable-menu"'; @@ -2196,7 +2198,7 @@ class PMA_Util ) { // need (string) === (string) // '' !== 0 but '' == 0 - if ((string) $select_expr['alias'] === (string) $meta->name) { + if ((string)$select_expr['alias'] === (string)$meta->name) { $meta->orgname = $select_expr['column']; break; } // end if @@ -2392,7 +2394,8 @@ class PMA_Util * @access public */ public static function pageselector( - $name, $rows, $pageNow = 1, $nbTotalPage = 1, $showAll = 200, $sliceStart = 5, + $name, $rows, $pageNow = 1, $nbTotalPage = 1, $showAll = 200, + $sliceStart = 5, $sliceEnd = 5, $percent = 20, $range = 10, $prompt = '' ) { $increment = floor($nbTotalPage / $percent); @@ -2524,7 +2527,8 @@ class PMA_Util * @todo use $pos from $_url_params */ public static function getListNavigator( - $count, $pos, $_url_params, $script, $frame, $max_count, $name = 'pos', $classes = array() + $count, $pos, $_url_params, $script, $frame, $max_count, $name = 'pos', + $classes = array() ) { $class = $frame == 'frame_navigation' ? ' class="ajax"' : ''; @@ -2558,11 +2562,13 @@ class PMA_Util $_url_params[$name] = 0; $list_navigator_html .= '' . $caption1 . ''; + . PMA_generate_common_url($_url_params) . '">' . $caption1 + . ''; $_url_params[$name] = $pos - $max_count; $list_navigator_html .= '' . $caption2 . ''; + . PMA_generate_common_url($_url_params) . '">' . $caption2 + . ''; } $list_navigator_html .= '
' . $caption3 . ''; + . PMA_generate_common_url($_url_params) . '" >' . $caption3 + . ''; $_url_params[$name] = floor($count / $max_count) * $max_count; if ($_url_params[$name] == $count) { @@ -2600,7 +2607,8 @@ class PMA_Util } $list_navigator_html .= '' . $caption4 . ''; + . PMA_generate_common_url($_url_params) . '" >' . $caption4 + . ''; } $list_navigator_html .= '' . "\n"; } @@ -4079,8 +4087,8 @@ class PMA_Util * @return void */ public static function fillTooltip( - &$tooltip_truename, &$tooltip_aliasname, $table) - { + &$tooltip_truename, &$tooltip_aliasname, $table + ) { if (strstr($table['Comment'], '; InnoDB free') === false) { if (!strstr($table['Comment'], 'InnoDB free') === false) { // here we have just InnoDB generated part diff --git a/libraries/display_change_password.lib.php b/libraries/display_change_password.lib.php index f6355c76a3..ba5b012e20 100644 --- a/libraries/display_change_password.lib.php +++ b/libraries/display_change_password.lib.php @@ -12,18 +12,20 @@ if (! defined('PHPMYADMIN')) { /** * Get HTML for the Change password dialog * - * @param string $username - * @param string $hostname + * @param string $username username + * @param string $hostname hostname * * @return string html snippet */ -function PMA_getHtmlForChangePassword($username, $hostname) { - +function PMA_getHtmlForChangePassword($username, $hostname) +{ /** * autocomplete feature of IE kills the "onchange" event handler and it * must be replaced by the "onpropertychange" one in this case */ - $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5 && PMA_USR_BROWSER_VER < 7) + $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' + && PMA_USR_BROWSER_VER >= 5 + && PMA_USR_BROWSER_VER < 7) ? 'onpropertychange' : 'onchange';