those operations do not make sense on information_schema
This commit is contained in:
@@ -8,6 +8,8 @@ $Source$
|
|||||||
2005-07-22 Marc Delisle <lem9@users.sourceforge.net>
|
2005-07-22 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* db_details_structure.php: table creation should not be possible
|
* db_details_structure.php: table creation should not be possible
|
||||||
in information_schema
|
in information_schema
|
||||||
|
* db_operations.php: those operations do not make sense on
|
||||||
|
information_schema
|
||||||
|
|
||||||
2005-07-21 Marc Delisle <lem9@users.sourceforge.net>
|
2005-07-21 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/auth/cookie.auth.lib.php: bug #1240880, XSS on the
|
* libraries/auth/cookie.auth.lib.php: bug #1240880, XSS on the
|
||||||
|
@@ -134,6 +134,13 @@ if (empty($is_info)) {
|
|||||||
if (PMA_MYSQL_INT_VERSION >= 40101) {
|
if (PMA_MYSQL_INT_VERSION >= 40101) {
|
||||||
$db_collation = PMA_getDbCollation($db);
|
$db_collation = PMA_getDbCollation($db);
|
||||||
}
|
}
|
||||||
|
if (PMA_MYSQL_INT_VERSION < 50002 || (PMA_MYSQL_INT_VERSION >= 50002 && $db != 'information_schema')) {
|
||||||
|
$is_information_schema = FALSE;
|
||||||
|
} else {
|
||||||
|
$is_information_schema = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$is_information_schema) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table border="0" cellpadding="2" cellspacing="0">
|
<table border="0" cellpadding="2" cellspacing="0">
|
||||||
@@ -148,38 +155,39 @@ if (PMA_MYSQL_INT_VERSION >= 40101) {
|
|||||||
. htmlspecialchars($GLOBALS['db']) . '</a>';
|
. htmlspecialchars($GLOBALS['db']) . '</a>';
|
||||||
// else use
|
// else use
|
||||||
// $strDBLink = htmlspecialchars($db);
|
// $strDBLink = htmlspecialchars($db);
|
||||||
echo ' ' . sprintf($strCreateNewTable, $strDBLink) . ': ' . "\n";
|
echo ' ' . sprintf($strCreateNewTable, $strDBLink) . ': ' . "\n";
|
||||||
echo ' </td></tr>';
|
echo ' </td></tr>';
|
||||||
echo ' <tr bgcolor="'.$cfg['BgcolorOne'].'"><td nowrap="nowrap">';
|
echo ' <tr bgcolor="'.$cfg['BgcolorOne'].'"><td nowrap="nowrap">';
|
||||||
echo ' ' . $strName . ': ' . "\n";
|
echo ' ' . $strName . ': ' . "\n";
|
||||||
echo ' </td>';
|
echo ' </td>';
|
||||||
echo ' <td nowrap="nowrap">';
|
echo ' <td nowrap="nowrap">';
|
||||||
echo ' ' . '<input type="text" name="table" maxlength="64" size="30" class="textfield" />';
|
echo ' ' . '<input type="text" name="table" maxlength="64" size="30" class="textfield" />';
|
||||||
echo ' </td><td> </td></tr>';
|
echo ' </td><td> </td></tr>';
|
||||||
echo ' <tr bgcolor="'.$cfg['BgcolorOne'].'"><td nowrap="nowrap">';
|
echo ' <tr bgcolor="'.$cfg['BgcolorOne'].'"><td nowrap="nowrap">';
|
||||||
echo ' ' . $strFields . ': ' . "\n";
|
echo ' ' . $strFields . ': ' . "\n";
|
||||||
echo ' </td>';
|
echo ' </td>';
|
||||||
echo ' <td nowrap="nowrap">';
|
echo ' <td nowrap="nowrap">';
|
||||||
echo ' ' . '<input type="text" name="num_fields" size="2" class="textfield" />' . "\n";
|
echo ' ' . '<input type="text" name="num_fields" size="2" class="textfield" />' . "\n";
|
||||||
echo ' </td>';
|
echo ' </td>';
|
||||||
echo ' <td align="right">';
|
echo ' <td align="right">';
|
||||||
echo ' ' . ' <input type="submit" value="' . $strGo . '" />' . "\n";
|
echo ' ' . ' <input type="submit" value="' . $strGo . '" />' . "\n";
|
||||||
echo ' </td> </tr>';
|
echo ' </td> </tr>' . "\n";
|
||||||
echo ' </form>';
|
echo ' </form>' . "\n";
|
||||||
|
echo '</table>' . "\n";
|
||||||
|
|
||||||
echo '<table border="0" cellpadding="2" cellspacing="0">';
|
echo '<table border="0" cellpadding="2" cellspacing="0">';
|
||||||
if ($cfgRelation['commwork']) {
|
if ($cfgRelation['commwork']) {
|
||||||
?>
|
?>
|
||||||
<!-- Alter/Enter db-comment -->
|
<!-- Alter/Enter db-comment -->
|
||||||
<tr><td colspan="3"><img src="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width="1" height="1" border="0" alt="" /></td></tr>
|
<tr><td colspan="3"><img src="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width="1" height="1" border="0" alt="" /></td></tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="tblHeaders"><?php
|
<td colspan="3" class="tblHeaders"><?php
|
||||||
if ($cfg['PropertiesIconic']) {
|
if ($cfg['PropertiesIconic']) {
|
||||||
echo '<img src="' . $pmaThemeImage . 'b_comment.png" border="0" width="16" height="16" hspace="2" align="middle" />';
|
echo '<img src="' . $pmaThemeImage . 'b_comment.png" border="0" width="16" height="16" hspace="2" align="middle" />';
|
||||||
}
|
}
|
||||||
echo $strDBComment;
|
echo $strDBComment;
|
||||||
$comment = PMA_getComments($db);
|
$comment = PMA_getComments($db);
|
||||||
?></td></tr>
|
?></td></tr>
|
||||||
<form method="post" action="db_operations.php">
|
<form method="post" action="db_operations.php">
|
||||||
<tr bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
|
<tr bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
|
||||||
@@ -191,7 +199,7 @@ if ($cfgRelation['commwork']) {
|
|||||||
</td></tr>
|
</td></tr>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!-- Rename database -->
|
<!-- Rename database -->
|
||||||
<tr><td colspan="3"><img src="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width="1" height="1" border="0" alt="" /></td></tr>
|
<tr><td colspan="3"><img src="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width="1" height="1" border="0" alt="" /></td></tr>
|
||||||
@@ -255,42 +263,46 @@ if ($cfgRelation['commwork']) {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (PMA_MYSQL_INT_VERSION >= 40101) {
|
if (PMA_MYSQL_INT_VERSION >= 40101) {
|
||||||
// MySQL supports setting default charsets / collations for databases since
|
// MySQL supports setting default charsets / collations for databases since
|
||||||
// version 4.1.1.
|
// version 4.1.1.
|
||||||
echo ' <!-- Change database charset -->' . "\n"
|
echo ' <!-- Change database charset -->' . "\n"
|
||||||
. ' <tr><td colspan="3"><img src="' . $GLOBALS['pmaThemeImage'] . 'spacer.png' . '" width="1" height="1" border="0" alt="" /></td></tr>' . "\n"
|
. ' <tr><td colspan="3"><img src="' . $GLOBALS['pmaThemeImage'] . 'spacer.png' . '" width="1" height="1" border="0" alt="" /></td></tr>' . "\n"
|
||||||
. ' <tr><td colspan="3" class="tblHeaders">';
|
. ' <tr><td colspan="3" class="tblHeaders">';
|
||||||
if ($cfg['PropertiesIconic']) {
|
if ($cfg['PropertiesIconic']) {
|
||||||
echo '<img src="' . $pmaThemeImage . 's_asci.png" border="0" width="16" height="16" hspace="2" align="middle" />';
|
echo '<img src="' . $pmaThemeImage . 's_asci.png" border="0" width="16" height="16" hspace="2" align="middle" />';
|
||||||
|
}
|
||||||
|
echo ' <label for="select_db_collation">' . $strCollation . '</label>: ' . "\n"
|
||||||
|
. ' </td></tr>' . "\n"
|
||||||
|
. ' <form method="post" action="./db_operations.php">' . "\n"
|
||||||
|
. ' <tr bgcolor="' . $cfg['BgcolorOne'] . '"><td colspan="2" nowrap="nowrap">'
|
||||||
|
. PMA_generate_common_hidden_inputs($db, $table, 3)
|
||||||
|
. PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', 'select_db_collation', $db_collation, FALSE, 3)
|
||||||
|
. ' </td><td align="right">'
|
||||||
|
. ' <input type="submit" name="submitcollation" value="' . $strGo . '" style="vertical-align: middle" />' . "\n"
|
||||||
|
. ' </td></tr>' . "\n"
|
||||||
|
. ' </form>' . "\n"
|
||||||
|
. ' ' . "\n\n";
|
||||||
}
|
}
|
||||||
echo ' <label for="select_db_collation">' . $strCollation . '</label>: ' . "\n"
|
|
||||||
. ' </td></tr>' . "\n"
|
|
||||||
. ' <form method="post" action="./db_operations.php">' . "\n"
|
|
||||||
. ' <tr bgcolor="' . $cfg['BgcolorOne'] . '"><td colspan="2" nowrap="nowrap">'
|
|
||||||
. PMA_generate_common_hidden_inputs($db, $table, 3)
|
|
||||||
. PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', 'select_db_collation', $db_collation, FALSE, 3)
|
|
||||||
. ' </td><td align="right">'
|
|
||||||
. ' <input type="submit" name="submitcollation" value="' . $strGo . '" style="vertical-align: middle" />' . "\n"
|
|
||||||
. ' </td></tr>' . "\n"
|
|
||||||
. ' </form>' . "\n"
|
|
||||||
. ' ' . "\n\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($num_tables > 0
|
if ($num_tables > 0
|
||||||
&& !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE) {
|
&& !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE) {
|
||||||
echo '<tr><td colspan="3"><img src="' . $GLOBALS['pmaThemeImage'] . 'spacer.png' . '" width="1" height="1" border="0" alt="" /></td></tr>'
|
echo '<tr><td colspan="3"><img src="' . $GLOBALS['pmaThemeImage'] . 'spacer.png' . '" width="1" height="1" border="0" alt="" /></td></tr>'
|
||||||
. '<tr><th colspan="3" class="tblHeadError"><div class="errorhead">' . $strError . '</div></th></tr>'
|
. '<tr><th colspan="3" class="tblHeadError"><div class="errorhead">' . $strError . '</div></th></tr>'
|
||||||
. '<tr><td colspan="3" class="tblError">'
|
. '<tr><td colspan="3" class="tblError">'
|
||||||
. sprintf(wordwrap($strRelationNotWorking,65,'<br />'), '<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $url_query . '">', '</a>')
|
. sprintf(wordwrap($strRelationNotWorking,65,'<br />'), '<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $url_query . '">', '</a>')
|
||||||
. '</td></tr>';
|
. '</td></tr>';
|
||||||
} // end if
|
} // end if
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
<?php
|
||||||
|
} // end if (!$is_information_schema)
|
||||||
|
// not sure about leaving the PDF dialog for information_schema
|
||||||
|
|
||||||
|
?>
|
||||||
<form method="post" action="pdf_schema.php">
|
<form method="post" action="pdf_schema.php">
|
||||||
<?php
|
<?php
|
||||||
// is this OK to check for 'class' support?
|
|
||||||
if ($num_tables > 0) {
|
if ($num_tables > 0) {
|
||||||
$takeaway = $url_query . '&table=' . urlencode($table);
|
$takeaway = $url_query . '&table=' . urlencode($table);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user