Dump support is optional
This commit is contained in:
parent
1f1d6c3430
commit
a7cdc85497
|
@ -557,7 +557,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function support($feature) {
|
function support($feature) {
|
||||||
return ereg('^(view|trigger|variables|status)$', $feature);
|
return ereg('^(view|trigger|variables|status|dump)$', $feature);
|
||||||
}
|
}
|
||||||
|
|
||||||
$jush = "sqlite";
|
$jush = "sqlite";
|
||||||
|
|
|
@ -515,7 +515,9 @@ document.getElementById('username').focus();
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<p class="logout">
|
<p class="logout">
|
||||||
<a href="<?php echo h(ME); ?>sql="><?php echo bold(lang('SQL command'), isset($_GET["sql"])); ?></a>
|
<a href="<?php echo h(ME); ?>sql="><?php echo bold(lang('SQL command'), isset($_GET["sql"])); ?></a>
|
||||||
|
<?php if (support("dump")) { ?>
|
||||||
<a href="<?php echo h(ME); ?>dump=<?php echo urlencode(isset($_GET["table"]) ? $_GET["table"] : $_GET["select"]); ?>"><?php echo bold(lang('Dump'), isset($_GET["dump"])); ?></a>
|
<a href="<?php echo h(ME); ?>dump=<?php echo urlencode(isset($_GET["table"]) ? $_GET["table"] : $_GET["select"]); ?>"><?php echo bold(lang('Dump'), isset($_GET["dump"])); ?></a>
|
||||||
|
<?php } ?>
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>">
|
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>">
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -207,7 +207,7 @@ foreach (glob(dirname(__FILE__) . "/adminer/drivers/" . ($driver ? $driver : "*"
|
||||||
}
|
}
|
||||||
|
|
||||||
include dirname(__FILE__) . "/adminer/include/pdo.inc.php";
|
include dirname(__FILE__) . "/adminer/include/pdo.inc.php";
|
||||||
$features = array("view", "event", "privileges", "user", "processlist", "variables", "trigger", "scheme", "sequence");
|
$features = array("view", "event", "privileges", "user", "processlist", "variables", "trigger", "scheme", "sequence", "dump");
|
||||||
foreach (array("adminer", "editor") as $project) {
|
foreach (array("adminer", "editor") as $project) {
|
||||||
$lang_ids = array(); // global variable simplifies usage in a callback function
|
$lang_ids = array(); // global variable simplifies usage in a callback function
|
||||||
$file = file_get_contents(dirname(__FILE__) . "/$project/index.php");
|
$file = file_get_contents(dirname(__FILE__) . "/$project/index.php");
|
||||||
|
|
Loading…
Reference in a new issue