hide edit/delete links for information_schema (bug #1373201)
This commit is contained in:
@@ -8,6 +8,7 @@ $Source$
|
||||
2005-12-05 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||
* 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ř <michal@cihar.com>
|
||||
* many files: Use same script tag, use CDATA for scripts (RFE #995065).
|
||||
|
25
sql.php
25
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 ' <i>' . $strOr . '</i>';
|
||||
} else {
|
||||
echo '<br /><br />';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<form action="sql.php" method="post" onsubmit="return emptyFormElements(this, 'fields[label]');">
|
||||
<?php echo PMA_generate_common_hidden_inputs(); ?>
|
||||
<input type="hidden" name="goto" value="<?php echo $goto; ?>" />
|
||||
@@ -880,14 +885,14 @@ else {
|
||||
<legend><?php
|
||||
echo ($cfg['PropertiesIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 'b_bookmark.png" width="16" height="16" alt="' . $strBookmarkThis . '" />' : '')
|
||||
. $strBookmarkThis;
|
||||
?>
|
||||
?>
|
||||
</legend>
|
||||
|
||||
|
||||
<div class="formelement">
|
||||
<label for="fields_label_"><?php echo $strBookmarkLabel; ?>:</label>
|
||||
<input type="text" id="fields_label_" name="fields[label]" value="" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="formelement">
|
||||
<input type="checkbox" name="bkm_all_users" id="bkm_all_users" value="true" />
|
||||
<label for="bkm_all_users"><?php echo $strBookmarkAllUsers; ?></label>
|
||||
|
Reference in New Issue
Block a user