Permalink
Browse files

Dump support is optional

  • Loading branch information...
vrana committed Jul 22, 2010
1 parent 1f1d6c3 commit a7cdc85497267e2023ae049a43d523ebce1d56d0
Showing with 4 additions and 2 deletions.
  1. +1 −1 adminer/drivers/sqlite.inc.php
  2. +2 −0 adminer/include/adminer.inc.php
  3. +1 −1 compile.php
@@ -557,7 +557,7 @@ function show_status() {
}
function support($feature) {
- return ereg('^(view|trigger|variables|status)$', $feature);
+ return ereg('^(view|trigger|variables|status|dump)$', $feature);
}
$jush = "sqlite";
@@ -515,7 +515,9 @@ function navigation($missing) {
<form action="" method="post">
<p class="logout">
<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>
+<?php } ?>
<input type="hidden" name="token" value="<?php echo $token; ?>">
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>">
</p>
View
@@ -207,7 +207,7 @@ function compile_file($match) {
}
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) {
$lang_ids = array(); // global variable simplifies usage in a callback function
$file = file_get_contents(dirname(__FILE__) . "/$project/index.php");

0 comments on commit a7cdc85

Please sign in to comment.