diff --git a/ChangeLog b/ChangeLog index 72f08f0ce..cd3ddf27e 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ $Source$ 2005-12-05 Sebastian Mendel * libraries/common.lib.php: added PMA_array_merge_recursive() * libraries/Config.class.php: make use of PMA_array_merge_recursive() + * sql.php: hide edit/delete links for information_schema (bug #1373201) 2005-12-05 Michal Čihař * many files: Use same script tag, use CDATA for scripts (RFE #995065). diff --git a/sql.php b/sql.php index 3d7b7e0c8..7d0a5a813 100644 --- a/sql.php +++ b/sql.php @@ -329,17 +329,17 @@ else { && !preg_match('@[[:space:]]LIMIT[[:space:]0-9,-]+$@i', $sql_query)) { $sql_limit_to_append = " LIMIT $pos, ".$cfg['MaxRows'] . " "; - $full_sql_query = $analyzed_sql[0]['section_before_limit'] . "\n" . $sql_limit_to_append . $analyzed_sql[0]['section_after_limit']; + $full_sql_query = $analyzed_sql[0]['section_before_limit'] . "\n" . $sql_limit_to_append . $analyzed_sql[0]['section_after_limit']; // FIXME: pretty printing of this modified query if (isset($display_query)) { - // if the analysis of the original query revealed that we found + // if the analysis of the original query revealed that we found // a section_after_limit, we now have to analyze $display_query // to display it correctly if (!empty($analyzed_sql[0]['section_after_limit'])) { $analyzed_display_query = PMA_SQP_analyze(PMA_SQP_parse($display_query)); - $display_query = $analyzed_display_query[0]['section_before_limit'] . "\n" . $sql_limit_to_append . $analyzed_display_query[0]['section_after_limit']; + $display_query = $analyzed_display_query[0]['section_before_limit'] . "\n" . $sql_limit_to_append . $analyzed_display_query[0]['section_after_limit']; } } @@ -614,9 +614,9 @@ else { // The form generated by sql_query_form.lib.php // and db_details.php has many submit buttons // on the same form, and some confusion arises from the - // fact that $zero_rows is sent for every case. + // fact that $zero_rows is sent for every case. // The $zero_rows containing $strSuccess and sent with - // the form should not have priority over + // the form should not have priority over // errors like $strEmptyResultSet } else if (!empty($zero_rows) && !$is_select) { $message = $zero_rows; @@ -740,6 +740,11 @@ else { $dontlimitchars = 0; } + // hide edit and delete links for information_schema + if ( PMA_MYSQL_INT_VERSION >= 50002 && $db == 'information_schema' ) { + $disp_mode = 'nnnn110111'; + } + PMA_displayTable($result, $disp_mode, $analyzed_sql); PMA_DBI_free_result($result); @@ -863,13 +868,13 @@ else { . '&dontlimitchars=' . $dontlimitchars . '&sql_query=' . urlencode($sql_query) . '&id_bookmark=1'; - + if ($disp_mode[3] == '1') { echo ' ' . $strOr . ''; } else { echo '

'; } - ?> + ?>
@@ -880,14 +885,14 @@ else { ' : '') . $strBookmarkThis; -?> +?> - +
- +