diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 91317776b2..ecc3d71072 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -63,6 +63,10 @@ class PMA_DisplayResults const ALL_ROWS = 'all'; const QUERY_TYPE_SELECT = 'SELECT'; + + /** + * Constructor for PMA_DisplayResults class + */ public function __construct() { @@ -88,10 +92,11 @@ class PMA_DisplayResults * * @param string &$the_disp_mode the synthetic value for display_mode (see a few * lines above for explanations) - * @param integer &$the_total the total number of rows returned by the SQL query - * without any programmatically appended LIMIT clause - * (just a copy of $unlim_num_rows if it exists, else - * computed inside this function) + * @param integer &$the_total the total number of rows returned by the SQL + * query without any programmatically appended + * LIMIT clause + * (just a copy of $unlim_num_rows if it exists, + * elsecomputed inside this function) * * @return array an array with explicit indexes for all the display * elements @@ -166,18 +171,23 @@ class PMA_DisplayResults */ $tmp = preg_match( '@^SHOW[[:space:]]+(VARIABLES|(FULL[[:space:]]+)?' - . 'PROCESSLIST|STATUS|TABLE|GRANTS|CREATE|LOGS|DATABASES|FIELDS)@i', + . 'PROCESSLIST|STATUS|TABLE|GRANTS|CREATE|LOGS|DATABASES|FIELDS' + . ')@i', $GLOBALS['sql_query'], $which ); if (isset($which[1]) && (strpos(' ' . strtoupper($which[1]), 'PROCESSLIST') > 0) ) { - $do_display['edit_lnk'] = self::NO_EDIT_OR_DELETE; // no edit link - $do_display['del_lnk'] = self::KILL_PROCESS; // "kill process" type edit link + // no edit link + $do_display['edit_lnk'] = self::NO_EDIT_OR_DELETE; + // "kill process" type edit link + $do_display['del_lnk'] = self::KILL_PROCESS; } else { // Default case -> no links - $do_display['edit_lnk'] = self::NO_EDIT_OR_DELETE; // no edit link - $do_display['del_lnk'] = self::NO_EDIT_OR_DELETE; // no delete link + // no edit link + $do_display['edit_lnk'] = self::NO_EDIT_OR_DELETE; + // no delete link + $do_display['del_lnk'] = self::NO_EDIT_OR_DELETE; } // 2.2.2 Other settings $do_display['sort_lnk'] = (string) '0'; @@ -202,7 +212,8 @@ class PMA_DisplayResults && (($fields_meta[$i]->table == '') || ($fields_meta[$i]->table != $prev_table)) ) { - $do_display['edit_lnk'] = self::NO_EDIT_OR_DELETE; // don't display links + // don't display links + $do_display['edit_lnk'] = self::NO_EDIT_OR_DELETE; $do_display['del_lnk'] = self::NO_EDIT_OR_DELETE; /** * @todo May be problematic with same field names @@ -224,8 +235,9 @@ class PMA_DisplayResults // 3. Gets the total number of rows if it is unknown if (isset($unlim_num_rows) && $unlim_num_rows != '') { $the_total = $unlim_num_rows; - } elseif ((($do_display['nav_bar'] == '1') || ($do_display['sort_lnk'] == '1')) - && (strlen($db) && !empty($table)) + } elseif ((($do_display['nav_bar'] == '1') + || ($do_display['sort_lnk'] == '1')) + && (strlen($db) && !empty($table)) ) { $the_total = PMA_Table::countRecords($db, $table); } @@ -302,8 +314,8 @@ class PMA_DisplayResults * @see _getMoveBackwardButtonsForTableNavigation(), * _getMoveForwardButtonsForTableNavigation() */ - private function _getTableNavigationButton($caption, $title, $pos, $html_sql_query, - $onsubmit = '', $input_for_real_end = '', $onclick = '' + private function _getTableNavigationButton($caption, $title, $pos, + $html_sql_query, $onsubmit = '', $input_for_real_end = '', $onclick = '' ) { global $db, $table, $goto; @@ -325,7 +337,8 @@ class PMA_DisplayResults return '