]> git.joonet.de Git - adminer.git/commitdiff
Dump support is optional
authorJakub Vrana <jakub@vrana.cz>
Thu, 22 Jul 2010 10:36:45 +0000 (12:36 +0200)
committerJakub Vrana <jakub@vrana.cz>
Thu, 22 Jul 2010 10:36:45 +0000 (12:36 +0200)
adminer/drivers/sqlite.inc.php
adminer/include/adminer.inc.php
compile.php

index d5af551960de6c480106b8752af3ccd0dbd4f33c..99d4ce55f8dede7117cb24b7781b0894815f602d 100644 (file)
@@ -557,7 +557,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
        }
        
        function support($feature) {
-               return ereg('^(view|trigger|variables|status)$', $feature);
+               return ereg('^(view|trigger|variables|status|dump)$', $feature);
        }
        
        $jush = "sqlite";
index df98c962ca628aff3b492196cdaa7c1c355e7d1e..4c2f327adb00aa09ad9fef34585f15572f87d9b4 100644 (file)
@@ -515,7 +515,9 @@ document.getElementById('username').focus();
 <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>
index ad5b6804b64da69d3a90436b6361a383bf4e4811..d888495364986cb0e2cbc4f4478298f83b047ee9 100644 (file)
@@ -207,7 +207,7 @@ foreach (glob(dirname(__FILE__) . "/adminer/drivers/" . ($driver ? $driver : "*"
 }
 
 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");