[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_5-19811-gf44ba87

Madhura Jayaratne madhuracj at users.sourceforge.net
Wed Sep 21 14:25:16 CEST 2011


The branch, master has been updated
       via  f44ba87d59c814659fce2e13b602c5fa4cf2f1fe (commit)
       via  92a00cdbe6e6b6491fb81cf072584adeeb952d1d (commit)
       via  bd786ea7c2d2ac9801f3ddd51b6bbb55118514ee (commit)
       via  74461617386de90b16ac2fa4e82ec99be2efad60 (commit)
       via  5dc7f9b5fa504e2e01e55b6ceb2a156a63fdc297 (commit)
       via  e42539a817a504e8367fb09fec3c0b06e035f3bc (commit)
       via  2e7a8c9eead022e0713704b471af3a0d7d908063 (commit)
       via  379ad840d32a3c58d3b4fe9d27a3fc4aab19a2ba (commit)
      from  010d11189ac7a2b3419254e7fcfb4fd00fac76bf (commit)


- Log -----------------------------------------------------------------
commit f44ba87d59c814659fce2e13b602c5fa4cf2f1fe
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date:   Wed Sep 21 17:51:35 2011 +0530

    Fix some doc blocks

commit 92a00cdbe6e6b6491fb81cf072584adeeb952d1d
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date:   Wed Sep 21 16:48:24 2011 +0530

    Coding style improvements

commit bd786ea7c2d2ac9801f3ddd51b6bbb55118514ee
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date:   Wed Sep 21 16:29:13 2011 +0530

    Fix indentation for multiline function calls

commit 74461617386de90b16ac2fa4e82ec99be2efad60
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date:   Wed Sep 21 16:15:12 2011 +0530

    Proper indentation for multiline if statements

commit 5dc7f9b5fa504e2e01e55b6ceb2a156a63fdc297
Merge: e42539a 010d111
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date:   Wed Sep 21 14:47:15 2011 +0530

    Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin

commit e42539a817a504e8367fb09fec3c0b06e035f3bc
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date:   Wed Sep 21 14:44:23 2011 +0530

    Use PMA_getIcon()

commit 2e7a8c9eead022e0713704b471af3a0d7d908063
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date:   Wed Sep 21 12:18:49 2011 +0530

    better variable name

commit 379ad840d32a3c58d3b4fe9d27a3fc4aab19a2ba
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date:   Wed Sep 21 11:34:08 2011 +0530

    Fixing some undefined variables

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

Summary of changes:
 db_structure.php              |   10 +-
 db_tracking.php               |    6 +-
 libraries/display_tbl.lib.php |  432 +++++++++++++++++++++++++----------------
 querywindow.php               |   16 +--
 4 files changed, 271 insertions(+), 193 deletions(-)

diff --git a/db_structure.php b/db_structure.php
index b46fe29..3926eae 100644
--- a/db_structure.php
+++ b/db_structure.php
@@ -607,16 +607,10 @@ PMA_listNavigator(
 /* Printable view of a table */
 echo '<p>';
 echo '<a href="db_printview.php?' . $url_query . '">';
-if ($cfg['PropertiesIconic']) {
-     echo '<img class="icon ic_b_print" src="themes/dot.gif" alt="" />';
-}
-echo __('Print view') . '</a> ';
+echo PMA_getIcon('b_print.png', __('Print view'), true) . '</a>';
 
 echo '<a href="./db_datadict.php?' . $url_query . '">';
-if ($cfg['PropertiesIconic']) {
-    echo '<img class="icon ic_b_tblanalyse" src="themes/dot.gif" alt="" />';
-}
-echo __('Data Dictionary') . '</a>';
+echo PMA_getIcon('b_tblanalyse.png', __('Data Dictionary'), true) . '</a>';
 echo '</p>';
 
 if (empty($db_is_information_schema)) {
diff --git a/db_tracking.php b/db_tracking.php
index fd4f7ed..c876204 100644
--- a/db_tracking.php
+++ b/db_tracking.php
@@ -196,11 +196,7 @@ if (isset($my_tables)) {
     foreach ($my_tables as $key => $tablename) {
         if (PMA_Tracker::getVersion($GLOBALS['db'], $tablename) == -1) {
             $my_link = '<a href="tbl_tracking.php?' . $url_query . '&table=' . htmlspecialchars($tablename) .'">';
-
-            if ($cfg['PropertiesIconic']) {
-                $my_link .= '<img class="icon ic_eye" src="themes/dot.gif" alt="' . __('Track table') . '" /> ';
-            }
-            $my_link .= __('Track table') . '</a>';
+            $my_link .= PMA_getIcon('eye.png', __('Track table')) . '</a>';
         ?>
             <tr class="noclick <?php echo $style;?>">
             <td><?php echo htmlspecialchars($tablename);?></td>
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index 704a96b..75ddc56 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -134,7 +134,7 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
                 // 2.3.2 Displays edit/delete/sort/insert links?
                 if ($is_link
                     && ($fields_meta[$i]->table == '' || $fields_meta[$i]->table != $prev_table)
-                    ) {
+                ) {
                     $do_display['edit_lnk'] = 'nn'; // don't display links
                     $do_display['del_lnk']  = 'nn';
                     /**
@@ -362,14 +362,17 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
     } // end show all
 
     // Move to the next page or to the last one
-    if (($_SESSION['tmp_user_values']['pos'] + $_SESSION['tmp_user_values']['max_rows'] < $unlim_num_rows) && $num_rows >= $_SESSION['tmp_user_values']['max_rows']
-        && $_SESSION['tmp_user_values']['max_rows'] != 'all') {
-
+    if (($_SESSION['tmp_user_values']['pos'] + $_SESSION['tmp_user_values']['max_rows'] < $unlim_num_rows)
+        && $num_rows >= $_SESSION['tmp_user_values']['max_rows']
+        && $_SESSION['tmp_user_values']['max_rows'] != 'all'
+    ) {
         // display the Next button
-        PMA_displayTableNavigationOneButton('>',
+        PMA_displayTableNavigationOneButton(
+            '>',
             _pgettext('Next page', 'Next'),
             $pos_next,
-            $html_sql_query);
+            $html_sql_query
+        );
 
         // prepare some options for the End button
         if ($is_innodb && $unlim_num_rows > $GLOBALS['cfg']['MaxExactCount']) {
@@ -381,14 +384,15 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
         }
 
         // display the End button
-        PMA_displayTableNavigationOneButton('>>',
+        PMA_displayTableNavigationOneButton(
+            '>>',
             _pgettext('Last page', 'End'),
             @((ceil($unlim_num_rows / $_SESSION['tmp_user_values']['max_rows'])- 1) * $_SESSION['tmp_user_values']['max_rows']),
             $html_sql_query,
             'onsubmit="return ' . (($_SESSION['tmp_user_values']['pos'] + $_SESSION['tmp_user_values']['max_rows'] < $unlim_num_rows && $num_rows >= $_SESSION['tmp_user_values']['max_rows']) ? 'true' : 'false') . '"',
             $input_for_real_end,
             $onclick
-            );
+        );
     } // end move toward
 
     // show separator if pagination happen
@@ -436,8 +440,10 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
             unset($choices);
         }
 
-        printf(__('Headers every %s rows'),
-            '<input type="text" size="3" name="repeat_cells" value="' . $_SESSION['tmp_user_values']['repeat_cells'] . '" class="textfield" />');
+        printf(
+            __('Headers every %s rows'),
+            '<input type="text" size="3" name="repeat_cells" value="' . $_SESSION['tmp_user_values']['repeat_cells'] . '" class="textfield" />'
+        );
         echo "\n";
         ?>
         </form>
@@ -505,9 +511,13 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
         $unsorted_sql_query = trim($unsorted_sql_query);
 
         // sorting by indexes, only if it makes sense (only one table ref)
-        if (isset($analyzed_sql) && isset($analyzed_sql[0]) &&
-            isset($analyzed_sql[0]['querytype']) && $analyzed_sql[0]['querytype'] == 'SELECT' &&
-            isset($analyzed_sql[0]['table_ref']) && count($analyzed_sql[0]['table_ref']) == 1) {
+        if (isset($analyzed_sql)
+            && isset($analyzed_sql[0])
+            && isset($analyzed_sql[0]['querytype'])
+            && $analyzed_sql[0]['querytype'] == 'SELECT'
+            && isset($analyzed_sql[0]['table_ref'])
+            && count($analyzed_sql[0]['table_ref']) == 1
+        ) {
 
             // grab indexes data:
             $indexes = PMA_Index::getFromTable($table, $db);
@@ -516,7 +526,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
             if ($indexes) {
 
                 if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-                 || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+                    || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+                ) {
                     $span = $fields_cnt;
                     if ($is_display['edit_lnk'] != 'nn') {
                         $span++;
@@ -605,7 +616,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
         );
         echo PMA_generate_common_hidden_inputs($url_params);
         echo '<br />';
-        PMA_generate_slider_effect('displayoptions',__('Options'));
+        PMA_generate_slider_effect('displayoptions', __('Options'));
         echo '<fieldset>';
 
         echo '<div class="formelement">';
@@ -707,13 +718,15 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
     }
     echo '">' . "\n";
     if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-     || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+        || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+    ) {
         echo '<thead><tr>' . "\n";
     }
 
     // 1. Displays the full/partial text button (part 1)...
     if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-     || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+        || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+    ) {
         $colspan  = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn')
                   ? ' colspan="4"'
                   : '';
@@ -725,17 +738,19 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
 
     //     ... before the result table
     if (($is_display['edit_lnk'] == 'nn' && $is_display['del_lnk'] == 'nn')
-        && $is_display['text_btn'] == '1') {
+        && $is_display['text_btn'] == '1'
+    ) {
         $vertical_display['emptypre'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 4 : 0;
         if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-         || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+            || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+        ) {
             ?>
     <th colspan="<?php echo $fields_cnt; ?>"></th>
 </tr>
 <tr>
             <?php
-        } // end horizontal/horizontalflipped mode
-        else {
+            // end horizontal/horizontalflipped mode
+        } else {
             ?>
 <tr>
     <th colspan="<?php echo $num_rows + floor($num_rows/$_SESSION['tmp_user_values']['repeat_cells']) + 1; ?>"></th>
@@ -747,15 +762,17 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
     //     ... at the left column of the result table header if possible
     //     and required
     elseif (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
-            && $is_display['text_btn'] == '1') {
+        && $is_display['text_btn'] == '1'
+    ) {
         $vertical_display['emptypre'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 4 : 0;
         if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-         || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+            || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+        ) {
             ?>
                 <th <?php echo $colspan; ?>><?php echo $full_or_partial_text_link;?></th>
             <?php
-        } // end horizontal/horizontalflipped mode
-        else {
+            // end horizontal/horizontalflipped mode
+        } else {
             $vertical_display['textbtn'] = '    <th ' . $rowspan . ' valign="middle">' . "\n"
                                          . '        ' . "\n"
                                          . '    </th>' . "\n";
@@ -767,19 +784,21 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
              && ($is_display['edit_lnk'] != 'nn' || $is_display['del_lnk'] != 'nn')) {
         $vertical_display['emptypre'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 4 : 0;
         if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-         || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+            || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+        ) {
             ?>
     <td<?php echo $colspan; ?>></td>
             <?php
-        } // end horizontal/horizontalfipped mode
-        else {
+            // end horizontal/horizontalfipped mode
+        } else {
             $vertical_display['textbtn'] = '    <td' . $rowspan . '></td>' . "\n";
         } // end vertical mode
     }
 
     //     ... elseif display an empty column if the actions links are disabled to match the rest of the table
-    elseif ($GLOBALS['cfg']['RowActionLinks'] == 'none' && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-            || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) {
+    elseif ($GLOBALS['cfg']['RowActionLinks'] == 'none'
+        && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')
+    ) {
         echo '<th></th>';
     }
 
@@ -790,7 +809,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
     // 2.0.1 Prepare Display column comments if enabled ($GLOBALS['cfg']['ShowBrowseComments']).
     //       Do not show comments, if using horizontalflipped mode, because of space usage
     if ($GLOBALS['cfg']['ShowBrowseComments']
-     && $_SESSION['tmp_user_values']['disp_direction'] != 'horizontalflipped') {
+        && $_SESSION['tmp_user_values']['disp_direction'] != 'horizontalflipped'
+    ) {
         $comments_map = array();
         if (isset($analyzed_sql[0]) && is_array($analyzed_sql[0])) {
             foreach ($analyzed_sql[0]['table_ref'] as $tbl) {
@@ -802,15 +822,16 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
     }
 
     if ($GLOBALS['cfgRelation']['commwork'] && $GLOBALS['cfgRelation']['mimework'] && $GLOBALS['cfg']['BrowseMIME'] && ! $_SESSION['tmp_user_values']['hide_transformation']) {
-        require_once './libraries/transformations.lib.php';
+        include_once './libraries/transformations.lib.php';
         $GLOBALS['mime_map'] = PMA_getMIME($db, $table);
     }
 
     // See if we have to highlight any header fields of a WHERE query.
     // Uses SQL-Parser results.
     $highlight_columns = array();
-    if (isset($analyzed_sql) && isset($analyzed_sql[0]) &&
-        isset($analyzed_sql[0]['where_clause_identifiers'])) {
+    if (isset($analyzed_sql) && isset($analyzed_sql[0])
+        && isset($analyzed_sql[0]['where_clause_identifiers'])
+    ) {
 
         $wi = 0;
         if (isset($analyzed_sql[0]['where_clause_identifiers']) && is_array($analyzed_sql[0]['where_clause_identifiers'])) {
@@ -842,9 +863,10 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
         }
 
         // 2.0 Prepare comment-HTML-wrappers for each row, if defined/enabled.
-        if (isset($comments_map) &&
-                isset($comments_map[$fields_meta[$i]->table]) &&
-                isset($comments_map[$fields_meta[$i]->table][$fields_meta[$i]->name])) {
+        if (isset($comments_map)
+            && isset($comments_map[$fields_meta[$i]->table])
+            && isset($comments_map[$fields_meta[$i]->table][$fields_meta[$i]->name])
+        ) {
             $comments = '<span class="tblcomment">' . htmlspecialchars($comments_map[$fields_meta[$i]->table][$fields_meta[$i]->name]) . '</span>';
         } else {
             $comments = '';
@@ -892,7 +914,10 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
                 // Another query to test this:
                 // SELECT p.*, FROM_UNIXTIME(p.temps) FROM mytable AS p
                 // (and try clicking on each column's header twice)
-                if (! empty($sort_tbl) && strpos($sort_expression_nodirection, $sort_tbl) === false && strpos($sort_expression_nodirection, '(') === false) {
+                if (! empty($sort_tbl)
+                    && strpos($sort_expression_nodirection, $sort_tbl) === false
+                    && strpos($sort_expression_nodirection, '(') === false
+                ) {
                     $sort_expression_nodirection = $sort_tbl . $sort_expression_nodirection;
                 }
                 $is_in_sort = (str_replace('`', '', $sort_tbl) . $name_to_use_in_sort == str_replace('`', '', $sort_expression_nodirection) ? true : false);
@@ -961,7 +986,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
                 }
             }
             if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
-             && $GLOBALS['cfg']['HeaderFlipType'] == 'css') {
+                && $GLOBALS['cfg']['HeaderFlipType'] == 'css'
+            ) {
                 $order_link_params['style'] = 'direction: ltr; writing-mode: tb-rl;';
             }
             $order_link_params['title'] = __('Sort');
@@ -969,7 +995,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
             $order_link = PMA_linkOrButton($order_url, $order_link_content . $order_img, $order_link_params, false, true);
 
             if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-             || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+                || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+            ) {
                 echo '<th';
                 $th_class = array();
                 $th_class[] = 'draggable';
@@ -1003,7 +1030,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
         // 2.2 Results can't be sorted
         else {
             if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-             || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+                || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+            ) {
                 echo '<th';
                 $th_class = array();
                 $th_class[] = 'draggable';
@@ -1018,12 +1046,14 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
                     echo ' valign="bottom"';
                 }
                 if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
-                 && $GLOBALS['cfg']['HeaderFlipType'] == 'css') {
+                    && $GLOBALS['cfg']['HeaderFlipType'] == 'css'
+                ) {
                     echo ' style="direction: ltr; writing-mode: tb-rl;"';
                 }
                 echo '>';
                 if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
-                 && $GLOBALS['cfg']['HeaderFlipType'] == 'fake') {
+                    && $GLOBALS['cfg']['HeaderFlipType'] == 'fake'
+                ) {
                     echo PMA_flipstring(htmlspecialchars($fields_meta[$i]->name), '<br />');
                 } else {
                     echo htmlspecialchars($fields_meta[$i]->name);
@@ -1042,18 +1072,20 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
     // 3. Displays the needed checkboxes at the right
     //    column of the result table header if possible and required...
     if (($GLOBALS['cfg']['RowActionLinks'] == 'right' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
-         && ($is_display['edit_lnk'] != 'nn' || $is_display['del_lnk'] != 'nn')
-         && $is_display['text_btn'] == '1') {
+        && ($is_display['edit_lnk'] != 'nn' || $is_display['del_lnk'] != 'nn')
+        && $is_display['text_btn'] == '1'
+    ) {
         $vertical_display['emptyafter'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 4 : 1;
         if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-         || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+            || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+        ) {
             echo "\n";
             ?>
         <th <?php echo $colspan; ?>><?php echo $full_or_partial_text_link;?>
 </th>
             <?php
-        } // end horizontal/horizontalflipped mode
-        else {
+            // end horizontal/horizontalflipped mode
+        } else {
             $vertical_display['textbtn'] = '    <th ' . $rowspan . ' valign="middle">' . "\n"
                                          . '        ' . "\n"
                                          . '    </th>' . "\n";
@@ -1063,23 +1095,26 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
     //     ... elseif no button, displays empty columns if required
     // (unless coming from Browse mode print view)
     elseif (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
-             && ($is_display['edit_lnk'] == 'nn' && $is_display['del_lnk'] == 'nn')
-             && (!$GLOBALS['is_header_sent'])) {
+        && ($is_display['edit_lnk'] == 'nn' && $is_display['del_lnk'] == 'nn')
+        && (! $GLOBALS['is_header_sent'])
+    ) {
         $vertical_display['emptyafter'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 4 : 1;
         if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-         || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+            || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+        ) {
             echo "\n";
             ?>
 <td<?php echo $colspan; ?>></td>
             <?php
-        } // end horizontal/horizontalflipped mode
-        else {
+            // end horizontal/horizontalflipped mode
+        } else {
             $vertical_display['textbtn'] = '    <td' . $rowspan . '></td>' . "\n";
         } // end vertical mode
     }
 
     if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-     || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+        || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+    ) {
         ?>
 </tr>
 </thead>
@@ -1216,9 +1251,12 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
     // query without conditions to shorten URLs when needed, 200 is just
     // guess, it should depend on remaining URL length
 
-    if (isset($analyzed_sql) && isset($analyzed_sql[0]) &&
-        isset($analyzed_sql[0]['querytype']) && $analyzed_sql[0]['querytype'] == 'SELECT' &&
-        strlen($sql_query) > 200) {
+    if (isset($analyzed_sql)
+        && isset($analyzed_sql[0])
+        && isset($analyzed_sql[0]['querytype'])
+        && $analyzed_sql[0]['querytype'] == 'SELECT'
+        && strlen($sql_query) > 200
+    ) {
 
         $url_sql_query = 'SELECT ';
         if (isset($analyzed_sql[0]['queryflags']['distinct'])) {
@@ -1267,10 +1305,11 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
     $odd_row = true;
     while ($row = PMA_DBI_fetch_row($dt_result)) {
         // "vertical display" mode stuff
-        if ($row_no != 0 && $_SESSION['tmp_user_values']['repeat_cells'] != 0 && !($row_no % $_SESSION['tmp_user_values']['repeat_cells'])
-          && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-           || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'))
-        {
+        if ($row_no != 0 && $_SESSION['tmp_user_values']['repeat_cells'] != 0
+            && !($row_no % $_SESSION['tmp_user_values']['repeat_cells'])
+            && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
+            || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')
+        ) {
             echo '<tr>' . "\n";
             if ($vertical_display['emptypre'] > 0) {
                 echo '    <th colspan="' . $vertical_display['emptypre'] . '">' . "\n"
@@ -1294,7 +1333,8 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
         $odd_row = ! $odd_row;
 
         if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-         || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+            || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+        ) {
             // pointer code part
             echo '<tr class="' . $alternating_color_class . '">';
         }
@@ -1395,15 +1435,17 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
 
             // 1.3 Displays the links at left if required
             if (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
-                 && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-                 || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) {
+                && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
+                || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')
+            ) {
                 if (! isset($js_conf)) {
                     $js_conf = '';
                 }
                 echo PMA_generateCheckboxAndLinks('left', $del_url, $is_display, $row_no, $where_clause, $where_clause_html, $condition_array, $del_query, 'l', $edit_url, $copy_url, $edit_anchor_class, $edit_str, $copy_str, $del_str, $js_conf);
-            } else if (($GLOBALS['cfg']['RowActionLinks'] == 'none')
-                        && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-                        || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) {
+            } elseif (($GLOBALS['cfg']['RowActionLinks'] == 'none')
+                && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
+                || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')
+            ) {
                 if (! isset($js_conf)) {
                     $js_conf = '';
                 }
@@ -1469,7 +1511,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
                     if (file_exists('./libraries/transformations/' . $include_file)) {
                         $transformfunction_name = str_replace('.inc.php', '', $GLOBALS['mime_map'][$meta->name]['transformation']);
 
-                        require_once './libraries/transformations/' . $include_file;
+                        include_once './libraries/transformations/' . $include_file;
 
                         if (function_exists('PMA_transformation_' . $transformfunction_name)) {
                             $transform_function = 'PMA_transformation_' . $transformfunction_name;
@@ -1582,6 +1624,8 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
 
                     // Display in Well Known Text(WKT) format.
                     } elseif ('WKT' == $_SESSION['tmp_user_values']['geometry_display']) {
+                        $where_comparison = ' = ' . $row[$i];
+
                         // Convert to WKT format
                         $wktval = PMA_asWKT($row[$i]);
 
@@ -1594,12 +1638,14 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
 
                         $vertical_display['data'][$row_no][$i] = '<td ' . PMA_prepare_row_data(
                             $class, $condition_field, $analyzed_sql, $meta, $map, $wktval, $transform_function,
-                            $default_function, $nowrap, $where_comparison, $transform_options, $is_field_truncated
+                            $default_function, '', $where_comparison, $transform_options, $is_field_truncated
                         );
 
                     // Display in  Well Known Binary(WKB) format.
                     } else {
                         if ($_SESSION['tmp_user_values']['display_binary']) {
+                            $where_comparison = ' = ' . $row[$i];
+
                             if ($_SESSION['tmp_user_values']['display_binary_as_hex']
                                 && PMA_contains_nonprintable_ascii($row[$i])
                             ) {
@@ -1617,7 +1663,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
 
                             $vertical_display['data'][$row_no][$i] = '<td ' . PMA_prepare_row_data(
                                 $class, $condition_field, $analyzed_sql, $meta, $map, $wkbval, $transform_function,
-                                $default_function, $nowrap, $where_comparison, $transform_options, $is_field_truncated
+                                $default_function, '', $where_comparison, $transform_options, $is_field_truncated
                             );
                         } else {
                             $wkbval = PMA_handle_non_printable_contents(
@@ -1647,7 +1693,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
 
                     // displays special characters from binaries
                     $field_flags = PMA_DBI_field_flags($dt_result, $i);
-                    $is_html = false;
+                    $formatted = false;
                     if (isset($meta->_type) && $meta->_type === MYSQLI_TYPE_BIT) {
                         $row[$i]     = PMA_printable_bit_value($row[$i], $meta->length);
                         // some results of PROCEDURE ANALYSE() are reported as
@@ -1666,11 +1712,11 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
                             // we show the BINARY message and field's size
                             // (or maybe use a transformation)
                             $row[$i] = PMA_handle_non_printable_contents('BINARY', $row[$i], $transform_function, $transform_options, $default_function, $meta, $_url_params);
-                            $is_html = true;
+                            $formatted = true;
                         }
                     }
 
-                    if ($is_html) {
+                    if ($formatted) {
                         $vertical_display['data'][$row_no][$i]     = PMA_buildValueDisplay($class, $condition_field, $row[$i]);
                     } else {
                         // transform functions may enable no-wrapping:
@@ -1689,7 +1735,8 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
 
             // output stored cell
             if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-             || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+                || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+            ) {
                 echo $vertical_display['data'][$row_no][$i];
             }
 
@@ -1702,8 +1749,9 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
 
         // 3. Displays the modify/delete links on the right if required
         if (($GLOBALS['cfg']['RowActionLinks'] == 'right' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
-             && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-             || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) {
+            && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
+            || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')
+        ) {
             if (! isset($js_conf)) {
                 $js_conf = '';
             }
@@ -1711,7 +1759,8 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
         } // end if (3)
 
         if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
-         || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
+            || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
+        ) {
             ?>
 </tr>
             <?php
@@ -1786,8 +1835,10 @@ function PMA_displayVerticalTable()
     global $vertical_display;
 
     // Displays "multi row delete" link at top if required
-    if (($GLOBALS['cfg']['RowActionLinks'] != 'right')
-        && is_array($vertical_display['row_delete']) && (count($vertical_display['row_delete']) > 0 || !empty($vertical_display['textbtn']))) {
+    if ($GLOBALS['cfg']['RowActionLinks'] != 'right'
+        && is_array($vertical_display['row_delete'])
+        && (count($vertical_display['row_delete']) > 0 || !empty($vertical_display['textbtn']))
+    ) {
         echo '<tr>' . "\n";
         if ($GLOBALS['cfg']['RowActionLinks'] == 'none') {
             // if we are not showing the RowActionLinks, then we need to show the Multi-Row-Action checkboxes
@@ -1809,7 +1860,9 @@ function PMA_displayVerticalTable()
 
     // Displays "edit" link at top if required
     if (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
-         && is_array($vertical_display['edit']) && (count($vertical_display['edit']) > 0 || !empty($vertical_display['textbtn']))) {
+        && is_array($vertical_display['edit'])
+        && (count($vertical_display['edit']) > 0 || !empty($vertical_display['textbtn']))
+    ) {
         echo '<tr>' . "\n";
         if (! is_array($vertical_display['row_delete'])) {
             echo $vertical_display['textbtn'];
@@ -1822,7 +1875,9 @@ function PMA_displayVerticalTable()
 
     // Displays "copy" link at top if required
     if (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
-         && is_array($vertical_display['copy']) && (count($vertical_display['copy']) > 0 || !empty($vertical_display['textbtn']))) {
+        && is_array($vertical_display['copy'])
+        && (count($vertical_display['copy']) > 0 || !empty($vertical_display['textbtn']))
+    ) {
         echo '<tr>' . "\n";
         if (! is_array($vertical_display['row_delete'])) {
             echo $vertical_display['textbtn'];
@@ -1835,7 +1890,9 @@ function PMA_displayVerticalTable()
 
     // Displays "delete" link at top if required
     if (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
-         && is_array($vertical_display['delete']) && (count($vertical_display['delete']) > 0 || !empty($vertical_display['textbtn']))) {
+        && is_array($vertical_display['delete'])
+        && (count($vertical_display['delete']) > 0 || !empty($vertical_display['textbtn']))
+    ) {
         echo '<tr>' . "\n";
         if (! is_array($vertical_display['edit']) && ! is_array($vertical_display['row_delete'])) {
             echo $vertical_display['textbtn'];
@@ -1879,7 +1936,9 @@ function PMA_displayVerticalTable()
 
     // Displays "multi row delete" link at bottom if required
     if (($GLOBALS['cfg']['RowActionLinks'] == 'right' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
-         && is_array($vertical_display['row_delete']) && (count($vertical_display['row_delete']) > 0 || !empty($vertical_display['textbtn']))) {
+        && is_array($vertical_display['row_delete'])
+        && (count($vertical_display['row_delete']) > 0 || !empty($vertical_display['textbtn']))
+    ) {
         echo '<tr>' . "\n";
         echo $vertical_display['textbtn'];
         $cell_displayed = 0;
@@ -1898,7 +1957,9 @@ function PMA_displayVerticalTable()
 
     // Displays "edit" link at bottom if required
     if (($GLOBALS['cfg']['RowActionLinks'] == 'right' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
-         && is_array($vertical_display['edit']) && (count($vertical_display['edit']) > 0 || !empty($vertical_display['textbtn']))) {
+        && is_array($vertical_display['edit'])
+        && (count($vertical_display['edit']) > 0 || !empty($vertical_display['textbtn']))
+    ) {
         echo '<tr>' . "\n";
         if (! is_array($vertical_display['row_delete'])) {
             echo $vertical_display['textbtn'];
@@ -1911,7 +1972,9 @@ function PMA_displayVerticalTable()
 
     // Displays "copy" link at bottom if required
     if (($GLOBALS['cfg']['RowActionLinks'] == 'right' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
-         && is_array($vertical_display['copy']) && (count($vertical_display['copy']) > 0 || !empty($vertical_display['textbtn']))) {
+        && is_array($vertical_display['copy'])
+        && (count($vertical_display['copy']) > 0 || !empty($vertical_display['textbtn']))
+    ) {
         echo '<tr>' . "\n";
         if (! is_array($vertical_display['row_delete'])) {
             echo $vertical_display['textbtn'];
@@ -1924,7 +1987,9 @@ function PMA_displayVerticalTable()
 
     // Displays "delete" link at bottom if required
     if (($GLOBALS['cfg']['RowActionLinks'] == 'right' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
-         && is_array($vertical_display['delete']) && (count($vertical_display['delete']) > 0 || !empty($vertical_display['textbtn']))) {
+        && is_array($vertical_display['delete'])
+        && (count($vertical_display['delete']) > 0 || !empty($vertical_display['textbtn']))
+    ) {
         echo '<tr>' . "\n";
         if (! is_array($vertical_display['edit']) && ! is_array($vertical_display['row_delete'])) {
             echo $vertical_display['textbtn'];
@@ -1939,11 +2004,15 @@ function PMA_displayVerticalTable()
 } // end of the 'PMA_displayVerticalTable' function
 
 /**
+ * Checks the posted options for viewing query resutls
+ * and sets appropriate values in the session.
  *
  * @todo    make maximum remembered queries configurable
  * @todo    move/split into SQL class!?
  * @todo    currently this is called twice unnecessary
  * @todo    ignore LIMIT and ORDER in query!?
+ *
+ * @return nothing
  */
 function PMA_displayTable_checkConfigParams()
 {
@@ -1969,7 +2038,8 @@ function PMA_displayTable_checkConfigParams()
     // use PMA_isValid($_REQUEST['session_max_rows'], 'integer')
     if ((PMA_isValid($_REQUEST['session_max_rows'], 'numeric')
         && (int) $_REQUEST['session_max_rows'] == $_REQUEST['session_max_rows'])
-        || $_REQUEST['session_max_rows'] == 'all') {
+        || $_REQUEST['session_max_rows'] == 'all'
+    ) {
         $_SESSION['tmp_user_values']['query'][$sql_md5]['max_rows'] = $_REQUEST['session_max_rows'];
         unset($_REQUEST['session_max_rows']);
     } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_md5]['max_rows'])) {
@@ -2088,10 +2158,10 @@ function PMA_displayTable_checkConfigParams()
  * Displays a table of results returned by a SQL query.
  * This function is called by the "sql.php" script.
  *
- * @param integer the link id associated to the query which results have
- *                  to be displayed
- * @param array   the display mode
- * @param array   the analyzed query
+ * @param integer &$dt_result     the link id associated to the query which results have
+ *                                to be displayed
+ * @param array   &$the_disp_mode the display mode
+ * @param array   $analyzed_sql   the analyzed query
  *
  * @global  string   $db                the database name
  * @global  string   $table             the table name
@@ -2109,12 +2179,15 @@ function PMA_displayTable_checkConfigParams()
  *                                      mode
  * @global  array    $highlight_columns column names to highlight
  * @global  array    $cfgRelation       the relation settings
+ * @global  array    $showtable         table definitions
  *
  * @access  private
  *
  * @see     PMA_showMessage(), PMA_setDisplayMode(),
  *          PMA_displayTableNavigation(), PMA_displayTableHeaders(),
  *          PMA_displayTableBody(), PMA_displayResultsOperations()
+ *
+ * @return nothing
  */
 function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
 {
@@ -2134,10 +2207,10 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
     $is_innodb = (isset($showtable['Type']) && $showtable['Type'] == 'InnoDB');
 
     if ($is_innodb
-     && ! isset($analyzed_sql[0]['queryflags']['union'])
-     && ! isset($analyzed_sql[0]['table_ref'][1]['table_name'])
-     && (empty($analyzed_sql[0]['where_clause'])
-      || $analyzed_sql[0]['where_clause'] == '1 ')) {
+        && ! isset($analyzed_sql[0]['queryflags']['union'])
+        && ! isset($analyzed_sql[0]['table_ref'][1]['table_name'])
+        && (empty($analyzed_sql[0]['where_clause']) || $analyzed_sql[0]['where_clause'] == '1 ')
+    ) {
         // "j u s t   b r o w s i n g"
         $pre_count = '~';
         $after_count = PMA_showHint(PMA_sanitize(__('May be approximate. See [a at ./Documentation.html#faq3_11 at Documentation]FAQ 3.11[/a]')));
@@ -2214,7 +2287,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
             // check for non printable sorted row data
             $meta = $fields_meta[$sorted_column_index];
             if (stristr($meta->type, 'BLOB') || $meta->type == 'geometry') {
-                $column_for_first_row = PMA_handle_non_printable_contents($meta->type, $row[$sorted_column_index], $transform_function, $transform_options, $default_function, $meta, NULL);
+                $column_for_first_row = PMA_handle_non_printable_contents($meta->type, $row[$sorted_column_index], $transform_function, $transform_options, $default_function, $meta, null);
             } else {
                 $column_for_first_row = $row[$sorted_column_index];
             }
@@ -2225,7 +2298,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
             // check for non printable sorted row data
             $meta = $fields_meta[$sorted_column_index];
             if (stristr($meta->type, 'BLOB') || $meta->type == 'geometry') {
-                $column_for_last_row = PMA_handle_non_printable_contents($meta->type, $row[$sorted_column_index], $transform_function, $transform_options, $default_function, $meta, NULL);
+                $column_for_last_row = PMA_handle_non_printable_contents($meta->type, $row[$sorted_column_index], $transform_function, $transform_options, $default_function, $meta, null);
             } else {
                 $column_for_last_row = $row[$sorted_column_index];
             }
@@ -2253,7 +2326,8 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
                         : $pos_next - 1;
 
         if (PMA_Table::isView($db, $table)
-         && $total == $GLOBALS['cfg']['MaxExactCountViews']) {
+            && $total == $GLOBALS['cfg']['MaxExactCountViews']
+        ) {
             $message = PMA_Message::notice(__('This view has at least this number of rows. Please refer to %sdocumentation%s.'));
             $message->addParam('[a at ./Documentation.html#cfg_MaxExactCount at _blank]');
             $message->addParam('[/a]');
@@ -2297,7 +2371,8 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
     // 2.3 Displays the navigation bars
     if (! strlen($table)) {
         if (isset($analyzed_sql[0]['query_type'])
-           && $analyzed_sql[0]['query_type'] == 'SELECT') {
+            && $analyzed_sql[0]['query_type'] == 'SELECT'
+        ) {
             // table does not always contain a real table name,
             // for example in MySQL 5.0.x, the query SHOW STATUS
             // returns STATUS as a table name
@@ -2324,7 +2399,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
     $target=array();
     if (isset($analyzed_sql[0]['table_ref']) && is_array($analyzed_sql[0]['table_ref'])) {
         foreach ($analyzed_sql[0]['table_ref'] AS $table_ref_position => $table_ref) {
-           $target[] = $analyzed_sql[0]['table_ref'][$table_ref_position]['table_true_name'];
+            $target[] = $analyzed_sql[0]['table_ref'][$table_ref_position]['table_true_name'];
         }
     }
     $tabs    = '(\'' . join('\',\'', $target) . '\')';
@@ -2402,14 +2477,19 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
             .$uncheckall_link . "\n"
             .'<i>' . __('With selected:') . '</i>' . "\n";
 
-        PMA_buttonOrImage('submit_mult', 'mult_submit',
-            'submit_mult_change', __('Change'), 'b_edit.png', 'edit');
-        PMA_buttonOrImage('submit_mult', 'mult_submit',
-            'submit_mult_delete', $delete_text, 'b_drop.png', 'delete');
+        PMA_buttonOrImage(
+            'submit_mult', 'mult_submit', 'submit_mult_change',
+            __('Change'), 'b_edit.png', 'edit'
+        );
+        PMA_buttonOrImage(
+            'submit_mult', 'mult_submit', 'submit_mult_delete',
+            $delete_text, 'b_drop.png', 'delete'
+        );
         if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT') {
-            PMA_buttonOrImage('submit_mult', 'mult_submit',
-                'submit_mult_export', __('Export'),
-                'b_tblexport.png', 'export');
+            PMA_buttonOrImage(
+                'submit_mult', 'mult_submit', 'submit_mult_export',
+                __('Export'), 'b_tblexport.png', 'export'
+            );
         }
         echo "\n";
 
@@ -2445,8 +2525,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
 function default_function($buffer)
 {
     $buffer = htmlspecialchars($buffer);
-    $buffer = str_replace("\011", '    ',
-        str_replace('  ', '  ', $buffer));
+    $buffer = str_replace("\011", '    ', str_replace('  ', '  ', $buffer));
     $buffer = preg_replace("@((\015\012)|(\015)|(\012))@", '<br />', $buffer);
 
     return $buffer;
@@ -2455,8 +2534,8 @@ function default_function($buffer)
 /**
  * Displays operations that are available on results.
  *
- * @param array   the display mode
- * @param array   the analyzed query
+ * @param array $the_disp_mode the display mode
+ * @param array $analyzed_sql  the analyzed query
  *
  * @global  string   $db                the database name
  * @global  string   $table             the table name
@@ -2470,6 +2549,8 @@ function default_function($buffer)
  * @see     PMA_showMessage(), PMA_setDisplayMode(),
  *          PMA_displayTableNavigation(), PMA_displayTableHeaders(),
  *          PMA_displayTableBody(), PMA_displayResultsOperations()
+ *
+ * @return nothing
  */
 function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql)
 {
@@ -2498,14 +2579,16 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql)
             echo PMA_linkOrButton(
                 'sql.php' . $url_query,
                 PMA_getIcon('b_print.png', __('Print view'), true),
-                '', true, true, 'print_view') . "\n";
+                '', true, true, 'print_view'
+            ) . "\n";
 
             if ($_SESSION['tmp_user_values']['display_text']) {
                 $_url_params['display_text'] = 'F';
                 echo PMA_linkOrButton(
                     'sql.php' . PMA_generate_common_url($_url_params),
                     PMA_getIcon('b_print.png', __('Print view (with full texts)'), true),
-                    '', true, true, 'print_view') . "\n";
+                    '', true, true, 'print_view'
+                ) . "\n";
                 unset($_url_params['display_text']);
             }
         } // end displays "printable view"
@@ -2539,7 +2622,7 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql)
         if (empty($_url_params['table']) && !empty($_url_params['db'])) {
             $_url_params['table'] = PMA_DBI_fetch_value("SHOW TABLES");
             /* No result (probably no database selected) */
-            if ($_url_params['table'] === FALSE) {
+            if ($_url_params['table'] === false) {
                 unset($_url_params['table']);
             }
         }
@@ -2547,13 +2630,15 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql)
         echo PMA_linkOrButton(
             'tbl_export.php' . PMA_generate_common_url($_url_params),
             PMA_getIcon('b_tblexport.png', __('Export'), true),
-            '', true, true, '') . "\n";
+            '', true, true, ''
+        ) . "\n";
 
         // show chart
         echo PMA_linkOrButton(
             'tbl_chart.php' . PMA_generate_common_url($_url_params),
             PMA_getIcon('b_chart.png', __('Display chart'), true),
-            '', true, true, '') . "\n";
+            '', true, true, ''
+        ) . "\n";
 
         // show GIS chart
         $geometry_found = false;
@@ -2568,7 +2653,8 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql)
             echo PMA_linkOrButton(
                 'tbl_gis_visualization.php' . PMA_generate_common_url($_url_params),
                 PMA_getIcon('b_globe.gif', __('Visualize GIS data'), true),
-                '', true, true, '') . "\n";
+                '', true, true, ''
+            ) . "\n";
         }
     }
 
@@ -2588,7 +2674,8 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql)
         echo PMA_linkOrButton(
             'view_create.php' . $url_query,
             PMA_getIcon('b_views.png', __('Create view'), true),
-            '', true, true, '') . "\n";
+            '', true, true, ''
+        ) . "\n";
     }
     if ($header_shown) {
         echo '</fieldset><br />';
@@ -2605,6 +2692,8 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql)
  * @param string $transform_options  transformation parameters
  * @param string $default_function   default transformation function
  * @param object $meta               the meta-information about this field
+ * @param array  $url_params         parameters that should go to the download link
+ *
  * @return  mixed  string or float
  */
 function PMA_handle_non_printable_contents($category, $content, $transform_function, $transform_options, $default_function, $meta, $url_params = array())
@@ -2645,17 +2734,19 @@ function PMA_handle_non_printable_contents($category, $content, $transform_funct
  * Prepares the displayable content of a data cell in Browse mode,
  * taking into account foreign key description field and transformations
  *
- * @param string $class
- * @param string $condition_field
- * @param string $analyzed_sql
- * @param object $meta   the meta-information about this field
- * @param string $map
- * @param string $data
- * @param string $transform_function
- * @param string $default_function
- * @param string $nowrap
- * @param string $where_comparison
- * @param bool   $is_field_truncated
+ * @param string $class              css classes for the td element
+ * @param bool   $condition_field    whether the column is a part of the where clause
+ * @param string $analyzed_sql       the analyzed query
+ * @param object $meta               the meta-information about this field
+ * @param array  $map                the list of relations
+ * @param string $data               data
+ * @param string $transform_function transformation function
+ * @param string $default_function   default function
+ * @param string $nowrap             'nowrap' if the content should not be wrapped
+ * @param string $where_comparison   data for the where cluase
+ * @param array  $transform_options  array of options for transformation
+ * @param bool   $is_field_truncated whether the field is truncated
+ *
  * @return  string  formatted data
  */
 function PMA_prepare_row_data($class, $condition_field, $analyzed_sql, $meta, $map, $data, $transform_function, $default_function, $nowrap, $where_comparison, $transform_options, $is_field_truncated )
@@ -2747,13 +2838,15 @@ function PMA_prepare_row_data($class, $condition_field, $analyzed_sql, $meta, $m
 /**
  * Generates a checkbox for multi-row submits
  *
- * @param string $del_url
- * @param array  $is_display
- * @param string $row_no
- * @param string $where_clause_html
- * @param string $del_query
- * @param string $id_suffix
- * @param string $class
+ * @param string $del_url           delete url
+ * @param array  $is_display        array with explicit indexes for all the display elements
+ * @param string $row_no            the row number
+ * @param string $where_clause_html url encoded where cluase
+ * @param array  $condition_array   array of conditions in the where cluase
+ * @param string $del_query         delete query
+ * @param string $id_suffix         suffix for the id
+ * @param string $class             css classes for the td element
+ *
  * @return  string  the generated HTML
  */
 
@@ -2778,11 +2871,12 @@ function PMA_generateCheckboxForMulti($del_url, $is_display, $row_no, $where_cla
 /**
  * Generates an Edit link
  *
- * @param string $edit_url
- * @param string $class
- * @param string $edit_str
- * @param string $where_clause
- * @param string $where_clause_html
+ * @param string $edit_url          edit url
+ * @param string $class             css classes for td element
+ * @param string $edit_str          text for the edit link
+ * @param string $where_clause      where cluase
+ * @param string $where_clause_html url encoded where cluase
+ *
  * @return  string  the generated HTML
  */
 function PMA_generateEditLink($edit_url, $class, $edit_str, $where_clause, $where_clause_html)
@@ -2806,10 +2900,12 @@ function PMA_generateEditLink($edit_url, $class, $edit_str, $where_clause, $wher
 /**
  * Generates an Copy link
  *
- * @param string $copy_url
- * @param string $copy_str
- * @param string $where_clause
- * @param string $where_clause_html
+ * @param string $copy_url          copy url
+ * @param string $copy_str          text for the copy link
+ * @param string $where_clause      where clause
+ * @param string $where_clause_html url encoded where cluase
+ * @param string $class             css classes for the td element
+ *
  * @return  string  the generated HTML
  */
 function PMA_generateCopyLink($copy_url, $copy_str, $where_clause, $where_clause_html, $class)
@@ -2837,10 +2933,11 @@ function PMA_generateCopyLink($copy_url, $copy_str, $where_clause, $where_clause
 /**
  * Generates a Delete link
  *
- * @param string $del_url
- * @param string $del_str
- * @param string $js_conf
- * @param string $class
+ * @param string $del_url delete url
+ * @param string $del_str text for the delete link
+ * @param string $js_conf text for the JS confirmation
+ * @param string $class   css classes for the td element
+ *
  * @return  string  the generated HTML
  */
 function PMA_generateDeleteLink($del_url, $del_str, $js_conf, $class)
@@ -2862,20 +2959,23 @@ function PMA_generateDeleteLink($del_url, $del_str, $js_conf, $class)
  * Generates checkbox and links at some position (left or right)
  * (only called for horizontal mode)
  *
- * @param string $position
- * @param string $del_url
- * @param array  $is_display
- * @param string $row_no
- * @param string $where_clause
- * @param string $where_clause_html
- * @param string $del_query
- * @param string $id_suffix
- * @param string $edit_url
- * @param string $copy_url
- * @param string $class
- * @param string $edit_str
- * @param string $del_str
- * @param string $js_conf
+ * @param string $position          the position of the checkbox and links
+ * @param string $del_url           delete url
+ * @param array  $is_display        array with explicit indexes for all the display elements
+ * @param string $row_no            row number
+ * @param string $where_clause      where clause
+ * @param string $where_clause_html url encoded where cluase
+ * @param array  $condition_array   array of conditions in the where cluase
+ * @param string $del_query         delete query
+ * @param string $id_suffix         suffix for the id
+ * @param string $edit_url          edit url
+ * @param string $copy_url          copy url
+ * @param string $class             css classes for the td elements
+ * @param string $edit_str          text for the edit link
+ * @param string $copy_str          text for the copy link
+ * @param string $del_str           text for the delete link
+ * @param string $js_conf           text for the JS confirmation
+ *
  * @return  string  the generated HTML
  */
 function PMA_generateCheckboxAndLinks($position, $del_url, $is_display, $row_no, $where_clause, $where_clause_html, $condition_array, $del_query, $id_suffix, $edit_url, $copy_url, $class, $edit_str, $copy_str, $del_str, $js_conf)
@@ -2883,7 +2983,7 @@ function PMA_generateCheckboxAndLinks($position, $del_url, $is_display, $row_no,
     $ret = '';
 
     if ($position == 'left') {
-        $ret .= PMA_generateCheckboxForMulti($del_url, $is_display, $row_no, $where_clause_html, $condition_array, $del_query, $id_suffix='_left', '', '', '');
+        $ret .= PMA_generateCheckboxForMulti($del_url, $is_display, $row_no, $where_clause_html, $condition_array, $del_query, $id_suffix = '_left', '', '', '');
 
         $ret .= PMA_generateEditLink($edit_url, $class, $edit_str, $where_clause, $where_clause_html, '');
 
@@ -2898,9 +2998,9 @@ function PMA_generateCheckboxAndLinks($position, $del_url, $is_display, $row_no,
 
         $ret .= PMA_generateEditLink($edit_url, $class, $edit_str, $where_clause, $where_clause_html, '');
 
-        $ret .= PMA_generateCheckboxForMulti($del_url, $is_display, $row_no, $where_clause_html, $condition_array, $del_query, $id_suffix='_right', '', '', '');
+        $ret .= PMA_generateCheckboxForMulti($del_url, $is_display, $row_no, $where_clause_html, $condition_array, $del_query, $id_suffix = '_right', '', '', '');
     } else { // $position == 'none'
-        $ret .= PMA_generateCheckboxForMulti($del_url, $is_display, $row_no, $where_clause_html, $condition_array, $del_query, $id_suffix='_left', '', '', '');
+        $ret .= PMA_generateCheckboxForMulti($del_url, $is_display, $row_no, $where_clause_html, $condition_array, $del_query, $id_suffix = '_left', '', '', '');
     }
     return $ret;
 }
diff --git a/querywindow.php b/querywindow.php
index 76e2a3b..5641d1c 100644
--- a/querywindow.php
+++ b/querywindow.php
@@ -71,7 +71,7 @@ if ($no_js) {
     $tabs['import']['attr']   = 'onclick="javascript:PMA_querywindowCommit(\'files\');return false;"';
     $tabs['import']['active'] = (bool) ($querydisplay_tab == 'files');
     $tabs['history']['icon']   = 'ic_b_bookmark';
-    $tabs['history']['text']   = __('SQL history'); 
+    $tabs['history']['text']   = __('SQL history');
     $tabs['history']['fragment']   = '#';
     $tabs['history']['attr']   = 'onclick="javascript:PMA_querywindowCommit(\'history\');return false;"';
     $tabs['history']['active'] = (bool) ($querydisplay_tab == 'history');
@@ -84,19 +84,7 @@ if ($no_js) {
     }
 }
 
-if ($GLOBALS['cfg']['PropertiesIconic']) {
-    $titles['Change'] =
-         '<img class="icon ic_b_edit" src="themes/dot.gif" alt="' 
-        . __('Change') . '" title="' . __('Change')
-        . '" />';
-
-    if ('both' === $GLOBALS['cfg']['PropertiesIconic']) {
-        $titles['Change'] .= __('Change') . ' ';
-    }
-} else {
-    $titles['Change'] = __('Change') . ' ';
-}
-
+$titles['Change'] = PMA_getIcon('b_edit.png', __('Change'));
 $url_query = PMA_generate_common_url($db, $table);
 
 if (! empty($sql_query)) {


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list