1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-13 10:04:07 +02:00

Hide import from server if no path

This commit is contained in:
ilessiivi
2018-09-21 19:03:38 +03:00
committed by Jakub Vrana
parent ae03bdd4c4
commit 150841e5d7
2 changed files with 8 additions and 4 deletions

View File

@@ -231,10 +231,13 @@ if (!isset($_GET["import"])) {
: lang('File uploads are disabled.')
);
echo "</div></fieldset>\n";
echo "<fieldset><legend>" . lang('From server') . "</legend><div>";
echo lang('Webserver file %s', "<code>" . h($adminer->importServerPath()) . "$gz</code>");
echo ' <input type="submit" name="webfile" value="' . lang('Run file') . '">';
echo "</div></fieldset>\n";
$importServerPath = $adminer->importServerPath();
if ($importServerPath) {
echo "<fieldset><legend>" . lang('From server') . "</legend><div>";
echo lang('Webserver file %s', "<code>" . h($importServerPath) . "$gz</code>");
echo ' <input type="submit" name="webfile" value="' . lang('Run file') . '">';
echo "</div></fieldset>\n";
}
echo "<p>";
}