Skip to content
Browse files

Various coding style improvements

  • Loading branch information...
1 parent ff5d2fe commit 0087992c06cca7bd0644bdf35c4a4c8b0f5e912a @nijel nijel committed Sep 19, 2012
Showing with 22 additions and 19 deletions.
  1. +19 −16 libraries/display_select_lang.lib.php
  2. +2 −2 libraries/plugins/auth/AuthenticationCookie.class.php
  3. +1 −1 main.php
View
35 libraries/display_select_lang.lib.php
@@ -26,20 +26,24 @@ function PMA_Language_cmp(&$a, &$b)
/**
* Displays for for language selection
*
+ * @param boolean $use_fieldset whether to use fieldset for selection
+ * @param boolean $show_doc whether to show documentation links
+ *
+ * @return void
+ *
* @access public
*/
-function PMA_select_language($use_fieldset = false, $show_doc = true)
+function PMA_Language_select($use_fieldset = false, $show_doc = true)
{
if (count($GLOBALS['available_languages']) == 1) {
// no use in switching languages, there is only one available
return;
}
global $cfg, $lang;
- ?>
-<form method="post" action="index.php" target="_parent">
- <?php
+ echo '<form method="post" action="index.php" target="_parent">';
+
$_form_params = array(
'db' => $GLOBALS['db'],
'table' => $GLOBALS['table'],
@@ -55,14 +59,14 @@ function PMA_select_language($use_fieldset = false, $show_doc = true)
$language_title .= PMA_Util::showDocu('faq7_2');
}
if ($use_fieldset) {
- echo '<fieldset><legend lang="en" dir="ltr">' . $language_title . '</legend>';
+ echo '<fieldset><legend lang="en" dir="ltr">'
+ . $language_title . '</legend>';
} else {
- echo '<bdo lang="en" dir="ltr"><label for="sel-lang">' . $language_title . ':</label></bdo>';
+ echo '<bdo lang="en" dir="ltr"><label for="sel-lang">'
+ . $language_title . ':</label></bdo>';
}
- ?>
- <select name="lang" class="autosubmit" lang="en" dir="ltr" id="sel-lang">
- <?php
+ echo '<select name="lang" class="autosubmit" lang="en" dir="ltr" id="sel-lang">';
uasort($GLOBALS['available_languages'], 'PMA_Language_cmp');
foreach ($GLOBALS['available_languages'] as $id => $tmplang) {
@@ -79,15 +83,14 @@ function PMA_select_language($use_fieldset = false, $show_doc = true)
echo '<option value="' . $id . '"' . $selected . '>' . $lang_name
. '</option>' . "\n";
}
- ?>
- </select>
- <?php
+ echo '</select>';
+
if ($use_fieldset) {
echo '</fieldset>';
}
- ?>
-</form>
- <?php
-} // End of function PMA_select_language
+
+ echo '</form>';
+
+} // End of function PMA_Language_select
?>
View
4 libraries/plugins/auth/AuthenticationCookie.class.php
@@ -48,7 +48,7 @@
);
}
}
-
+
/**
* Handles the cookie authentication method
*
@@ -163,7 +163,7 @@ public function auth()
if (empty($GLOBALS['cfg']['Lang'])) {
include_once './libraries/display_select_lang.lib.php';
// use fieldset, don't show doc link
- PMA_select_language(true, false);
+ PMA_Language_select(true, false);
}
echo '</div>
<br />
View
2 main.php
@@ -149,7 +149,7 @@
if (empty($cfg['Lang']) && count($GLOBALS['available_languages']) > 1) {
echo '<li id="li_select_lang">';
include_once 'libraries/display_select_lang.lib.php';
- PMA_select_language();
+ PMA_Language_select();
echo '</li>';
}

0 comments on commit 0087992

Please sign in to comment.
Something went wrong with that request. Please try again.