diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 0c2b031fe3..dbffbdff55 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -77,82 +77,82 @@ class PMA_DisplayResults private $_property_array = array( /** string Database name */ - '_db' => null, + 'db' => null, /** string Table name */ - '_table' => null, + 'table' => null, /** string the URL to go back in case of errors */ - '_goto' => null, + 'goto' => null, /** string the SQL query */ - '_sql_query' => null, + 'sql_query' => null, /** * integer the total number of rows returned by the SQL query without any * appended "LIMIT" clause programmatically */ - '_unlim_num_rows' => null, + 'unlim_num_rows' => null, /** array meta information about fields */ - '_fields_meta' => null, + 'fields_meta' => null, /** boolean */ - '_is_count' => null, + 'is_count' => null, /** integer */ - '_is_export' => null, + 'is_export' => null, /** boolean */ - '_is_func' => null, + 'is_func' => null, /** integer */ - '_is_analyse' => null, + 'is_analyse' => null, /** integer the total number of rows returned by the SQL query */ - '_num_rows' => null, + 'num_rows' => null, /** integer the total number of fields returned by the SQL query */ - '_fields_cnt' => null, + 'fields_cnt' => null, /** double time taken for execute the SQL query */ - '_querytime' => null, + 'querytime' => null, /** string path for theme images directory */ - '_pma_theme_image' => null, + 'pma_theme_image' => null, /** string */ - '_text_dir' => null, + 'text_dir' => null, /** boolean */ - '_is_maint' => null, + 'is_maint' => null, /** boolean */ - '_is_explain' => null, + 'is_explain' => null, /** boolean */ - '_is_show' => null, + 'is_show' => null, /** array table definitions */ - '_showtable' => null, + 'showtable' => null, /** string */ - '_printview' => null, + 'printview' => null, /** string URL query */ - '_url_query' => null, + 'url_query' => null, /** array column names to highlight */ - '_highlight_columns' => null, + 'highlight_columns' => null, /** array informations used with vertical display mode */ - '_vertical_display' => null, + 'vertical_display' => null, /** array mime types information of fields */ - '_mime_map' => null, + 'mime_map' => null, /** boolean */ - '_resultSetContainsUniqueKey' => null + 'resultSetContainsUniqueKey' => null ); /** @@ -220,10 +220,10 @@ class PMA_DisplayResults ) ); - $this->__set('_db', $db); - $this->__set('_table', $table); - $this->__set('_goto', $goto); - $this->__set('_sql_query', $sql_query); + $this->__set('db', $db); + $this->__set('table', $table); + $this->__set('goto', $goto); + $this->__set('sql_query', $sql_query); } @@ -262,24 +262,24 @@ class PMA_DisplayResults $resultSetContainsUniqueKey ) { - $this->__set('_unlim_num_rows', $unlim_num_rows); - $this->__set('_fields_meta', $fields_meta); - $this->__set('_is_count', $is_count); - $this->__set('_is_export', $is_export); - $this->__set('_is_func', $is_func); - $this->__set('_is_analyse', $is_analyse); - $this->__set('_num_rows', $num_rows); - $this->__set('_fields_cnt', $fields_cnt); - $this->__set('_querytime', $querytime); - $this->__set('_pma_theme_image', $pmaThemeImage); - $this->__set('_text_dir', $text_dir); - $this->__set('_is_maint', $is_maint); - $this->__set('_is_explain', $is_explain); - $this->__set('_is_show', $is_show); - $this->__set('_showtable', $showtable); - $this->__set('_printview', $printview); - $this->__set('_url_query', $url_query); - $this->__set('_resultSetContainsUniqueKey', $resultSetContainsUniqueKey); + $this->__set('unlim_num_rows', $unlim_num_rows); + $this->__set('fields_meta', $fields_meta); + $this->__set('is_count', $is_count); + $this->__set('is_export', $is_export); + $this->__set('is_func', $is_func); + $this->__set('is_analyse', $is_analyse); + $this->__set('num_rows', $num_rows); + $this->__set('fields_cnt', $fields_cnt); + $this->__set('querytime', $querytime); + $this->__set('pma_theme_image', $pmaThemeImage); + $this->__set('text_dir', $text_dir); + $this->__set('is_maint', $is_maint); + $this->__set('is_explain', $is_explain); + $this->__set('is_show', $is_show); + $this->__set('showtable', $showtable); + $this->__set('printview', $printview); + $this->__set('url_query', $url_query); + $this->__set('resultSetContainsUniqueKey', $resultSetContainsUniqueKey); } // end of the 'setProperties()' function @@ -321,11 +321,11 @@ class PMA_DisplayResults // Following variables are needed for use in isset/empty or // use with array indexes or safe use in foreach - $db = $this->__get('_db'); - $table = $this->__get('_table'); - $unlim_num_rows = $this->__get('_unlim_num_rows'); - $fields_meta = $this->__get('_fields_meta'); - $printview = $this->__get('_printview'); + $db = $this->__get('db'); + $table = $this->__get('table'); + $unlim_num_rows = $this->__get('unlim_num_rows'); + $fields_meta = $this->__get('fields_meta'); + $printview = $this->__get('printview'); // 1. Initializes the $do_display array $do_display = array(); @@ -353,8 +353,8 @@ class PMA_DisplayResults $do_display['text_btn'] = (string) '0'; $do_display['pview_lnk'] = (string) '0'; - } elseif ($this->__get('_is_count') || $this->__get('_is_analyse') - || $this->__get('_is_maint') || $this->__get('_is_explain') + } elseif ($this->__get('is_count') || $this->__get('is_analyse') + || $this->__get('is_maint') || $this->__get('is_explain') ) { // 2.1 Statement is a "SELECT COUNT", a // "CHECK/ANALYZE/REPAIR/OPTIMIZE", an "EXPLAIN" one or @@ -366,14 +366,14 @@ class PMA_DisplayResults $do_display['ins_row'] = (string) '0'; $do_display['bkm_form'] = (string) '1'; - if ($this->__get('_is_maint')) { + if ($this->__get('is_maint')) { $do_display['text_btn'] = (string) '1'; } else { $do_display['text_btn'] = (string) '0'; } $do_display['pview_lnk'] = (string) '1'; - } elseif ($this->__get('_is_show')) { + } elseif ($this->__get('is_show')) { // 2.2 Statement is a "SHOW..." /** * 2.2.1 @@ -383,7 +383,7 @@ class PMA_DisplayResults '@^SHOW[[:space:]]+(VARIABLES|(FULL[[:space:]]+)?' . 'PROCESSLIST|STATUS|TABLE|GRANTS|CREATE|LOGS|DATABASES|FIELDS' . ')@i', - $this->__get('_sql_query'), $which + $this->__get('sql_query'), $which ); if (isset($which[1]) && (strpos(' ' . strtoupper($which[1]), 'PROCESSLIST') > 0) @@ -414,7 +414,7 @@ class PMA_DisplayResults $prev_table = $fields_meta[0]->table; $do_display['text_btn'] = (string) '1'; - for ($i = 0; $i < $this->__get('_fields_cnt'); $i++) { + for ($i = 0; $i < $this->__get('fields_cnt'); $i++) { $is_link = ($do_display['edit_lnk'] != self::NO_EDIT_OR_DELETE) || ($do_display['del_lnk'] != self::NO_EDIT_OR_DELETE) @@ -503,8 +503,8 @@ class PMA_DisplayResults $analyzed_sql[0]['select_expr'] = 0; } - return ! ($this->__get('_is_count') || $this->__get('_is_export') - || $this->__get('_is_func') || $this->__get('_is_analyse')) + return ! ($this->__get('is_count') || $this->__get('is_export') + || $this->__get('is_func') || $this->__get('is_analyse')) && (count($analyzed_sql[0]['select_expr']) == 0) && isset($analyzed_sql[0]['queryflags']['select_from']) && (count($analyzed_sql[0]['table_ref']) == 1); @@ -551,12 +551,12 @@ class PMA_DisplayResults return '