The branch, master has been updated
       via  7b054e9b7d677306ab93ea3812b5b5fc2ee6e2f2 (commit)
      from  88db32fafd2b8a6e3b4f3c04af4b1a34fdac7b3c (commit)


- Log -----------------------------------------------------------------
commit 7b054e9b7d677306ab93ea3812b5b5fc2ee6e2f2
Author: Madhura Jayaratne <[email protected]>
Date:   Fri Aug 19 20:48:27 2011 +0530

    Fix doc blocks, multi line if statements, switch-case statements

-----------------------------------------------------------------------

Summary of changes:
 libraries/url_generating.lib.php |   82 ++++++++++++++++++++-----------------
 1 files changed, 44 insertions(+), 38 deletions(-)

diff --git a/libraries/url_generating.lib.php b/libraries/url_generating.lib.php
index e3cc02a..3884125 100644
--- a/libraries/url_generating.lib.php
+++ b/libraries/url_generating.lib.php
@@ -9,13 +9,14 @@
 /**
  * Generates text with hidden inputs.
  *
- * @see     PMA_generate_common_url()
- * @param string   optional database name
- *                   (can also be an array of parameters)
- * @param string   optional table name
- * @param int      indenting level
- * @param string   do not generate a hidden field for this parameter
- *                  (can be an array of strings)
+ * @param string $db     optional database name
+ *                       (can also be an array of parameters)
+ * @param string $table  optional table name
+ * @param int    $indent indenting level
+ * @param string $skip   do not generate a hidden field for this parameter
+ *                       (can be an array of strings)
+ *
+ * @see PMA_generate_common_url()
  *
  * @return  string   string with input fields
  *
@@ -27,7 +28,6 @@
  * @global  boolean  whether recoding is allowed or not
  *
  * @access  public
- *
  */
 function PMA_generate_common_hidden_inputs($db = '', $table = '', $indent = 0, 
$skip = array())
 {
@@ -48,15 +48,16 @@ function PMA_generate_common_hidden_inputs($db = '', $table 
= '', $indent = 0, $
     }
 
     if (! empty($GLOBALS['server'])
-    &&  $GLOBALS['server'] != $GLOBALS['cfg']['ServerDefault']) {
+        && $GLOBALS['server'] != $GLOBALS['cfg']['ServerDefault']
+    ) {
         $params['server'] = $GLOBALS['server'];
     }
-    if (empty($_COOKIE['pma_lang'])
-    && ! empty($GLOBALS['lang'])) {
+    if (empty($_COOKIE['pma_lang']) && ! empty($GLOBALS['lang'])) {
         $params['lang'] = $GLOBALS['lang'];
     }
     if (empty($_COOKIE['pma_collation_connection'])
-    && ! empty($GLOBALS['collation_connection'])) {
+        && ! empty($GLOBALS['collation_connection'])
+    ) {
         $params['collation_connection'] = $GLOBALS['collation_connection'];
     }
 
@@ -102,8 +103,9 @@ function PMA_generate_common_hidden_inputs($db = '', $table 
= '', $indent = 0, $
  * <input type="hidden" name="ccc[b]" Value="ccc_b" />
  * </code>
  *
- * @param array $values
- * @param string $pre
+ * @param array  $values hidden values
+ * @param string $pre    prefix
+ *
  * @return string form fields of type hidden
  */
 function PMA_getHiddenFields($values, $pre = '')
@@ -160,19 +162,20 @@ function PMA_getHiddenFields($values, $pre = '')
  * // script.php?server=1&amp;lang=en
  * </code>
  *
- * @param mixed    assoc. array with url params or optional string with 
database name
- *                   if first param is an array there is also an ? prefixed to 
the url
+ * @param mixed  assoc. array with url params or optional string with database 
name
+ *               if first param is an array there is also an ? prefixed to the 
url
+ *
+ * @param string - if first param is array: 'html' to use htmlspecialchars()
+ *               on the resulting URL (for a normal URL displayed in HTML)
+ *               or something else to avoid using htmlspecialchars() (for
+ *               a URL sent via a header); if not set,'html' is assumed
+ *               - if first param is not array:  optional table name
  *
- * @param string   - if first param is array: 'html' to use htmlspecialchars()
- *                   on the resulting URL (for a normal URL displayed in HTML)
- *                   or something else to avoid using htmlspecialchars() (for
- *                   a URL sent via a header); if not set,'html' is assumed
- *                   - if first param is not array:  optional table name
+ * @param string - if first param is array: optional character to
+ *               use instead of '?'
+ *               - if first param is not array: optional character to use
+ *               instead of '&amp;' for dividing URL parameters
  *
- * @param string   - if first param is array: optional character to
- *                   use instead of '?'
- *                   - if first param is not array: optional character to use
- *                    instead of '&amp;' for dividing URL parameters
  * @return  string   string with URL parameters
  * @access  public
  */
@@ -219,17 +222,18 @@ function PMA_generate_common_url()
 
     if (isset($GLOBALS['server'])
         && $GLOBALS['server'] != $GLOBALS['cfg']['ServerDefault']
-            // avoid overwriting when creating navi panel links to servers
-        && ! isset($params['server'])) {
+        // avoid overwriting when creating navi panel links to servers
+        && ! isset($params['server'])
+    ) {
         $params['server'] = $GLOBALS['server'];
     }
 
-    if (empty($_COOKIE['pma_lang'])
-      && ! empty($GLOBALS['lang'])) {
+    if (empty($_COOKIE['pma_lang']) && ! empty($GLOBALS['lang'])) {
         $params['lang'] = $GLOBALS['lang'];
     }
     if (empty($_COOKIE['pma_collation_connection'])
-      && ! empty($GLOBALS['collation_connection'])) {
+        && ! empty($GLOBALS['collation_connection'])
+    ) {
         $params['collation_connection'] = $GLOBALS['collation_connection'];
     }
 
@@ -256,7 +260,9 @@ function PMA_generate_common_url()
  * extracted from arg_separator.input as set in php.ini
  * we do not use arg_separator.output to avoid problems with &amp; and &
  *
- * @param string  whether to encode separator or not, currently 'none' or 
'html'
+ * @param string $encode whether to encode separator or not,
+ * currently 'none' or 'html'
+ *
  * @return  string  character used for separating url parts usally ; or &
  * @access  public
  */
@@ -278,13 +284,13 @@ function PMA_get_arg_separator($encode = 'none')
     }
 
     switch ($encode) {
-        case 'html':
-            return htmlentities($separator);
-            break;
-        case 'text' :
-        case 'none' :
-        default :
-            return $separator;
+    case 'html':
+        return htmlentities($separator);
+        break;
+    case 'text' :
+    case 'none' :
+    default :
+        return $separator;
     }
 }
 


hooks/post-receive
-- 
phpMyAdmin

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Phpmyadmin-git mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-git

Reply via email to