Removed inline JavaScript calls to confirmLink for truncate and drop
table actions
This commit is contained in:
@@ -309,13 +309,12 @@ foreach ($tables as $keyname => $each_table) {
|
|||||||
|
|
||||||
if (! $db_is_information_schema) {
|
if (! $db_is_information_schema) {
|
||||||
if (! empty($each_table['TABLE_ROWS'])) {
|
if (! empty($each_table['TABLE_ROWS'])) {
|
||||||
$empty_table = '<a href="sql.php?' . $tbl_url_query
|
$empty_table = '<a class="truncate_table_anchor" href="sql.php?' . $tbl_url_query
|
||||||
. '&sql_query=';
|
. '&sql_query=';
|
||||||
$empty_table .= urlencode('TRUNCATE ' . PMA_backquote($each_table['TABLE_NAME']))
|
$empty_table .= urlencode('TRUNCATE ' . PMA_backquote($each_table['TABLE_NAME']))
|
||||||
. '&zero_rows='
|
. '&zero_rows='
|
||||||
. urlencode(sprintf(__('Table %s has been emptied'), htmlspecialchars($each_table['TABLE_NAME'])))
|
. urlencode(sprintf(__('Table %s has been emptied'), htmlspecialchars($each_table['TABLE_NAME'])))
|
||||||
. '" onclick="return confirmLink(this, \'TRUNCATE ';
|
.'">' . $titles['Empty'] . '</a>';
|
||||||
$empty_table .= PMA_jsFormat($each_table['TABLE_NAME']) . '\')">' . $titles['Empty'] . '</a>';
|
|
||||||
} else {
|
} else {
|
||||||
$empty_table = $titles['NoEmpty'];
|
$empty_table = $titles['NoEmpty'];
|
||||||
}
|
}
|
||||||
@@ -399,11 +398,10 @@ foreach ($tables as $keyname => $each_table) {
|
|||||||
<?php echo $titles['Insert']; ?></a></td>
|
<?php echo $titles['Insert']; ?></a></td>
|
||||||
<td align="center"><?php echo $empty_table; ?></td>
|
<td align="center"><?php echo $empty_table; ?></td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="sql.php?<?php echo $tbl_url_query;
|
<a class="drop_table_anchor" href="sql.php?<?php echo $tbl_url_query;
|
||||||
?>&reload=1&purge=1&sql_query=<?php
|
?>&reload=1&purge=1&sql_query=<?php
|
||||||
echo urlencode($drop_query); ?>&zero_rows=<?php
|
echo urlencode($drop_query); ?>&zero_rows=<?php
|
||||||
echo urlencode($drop_message); ?>"
|
echo urlencode($drop_message); ?>" >
|
||||||
onclick="return confirmLink(this, '<?php echo PMA_jsFormat($drop_query, false); ?>')">
|
|
||||||
<?php echo $titles['Drop']; ?></a></td>
|
<?php echo $titles['Drop']; ?></a></td>
|
||||||
<?php } // end if (! $db_is_information_schema)
|
<?php } // end if (! $db_is_information_schema)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user