]> git.joonet.de Git - adminer.git/commitdiff
Show only errors with Webserver file
authorJakub Vrana <jakub@vrana.cz>
Tue, 14 Jun 2011 09:37:02 +0000 (11:37 +0200)
committerJakub Vrana <jakub@vrana.cz>
Wed, 15 Jun 2011 15:16:13 +0000 (17:16 +0200)
adminer/include/functions.inc.php
adminer/sql.inc.php

index 1a3edbd86a0c258771f11389eb78f6ebffa4fa57..ac62e624ba8ce19c19ded44e9e93017ec054b60f 100644 (file)
@@ -859,10 +859,11 @@ function is_url($string) {
 * @param string
 * @param string
 * @param bool
+* @param string
 * @return null
 */
-function print_fieldset($id, $legend, $visible = false) {
-       echo "<fieldset><legend><a href='#fieldset-$id' onclick=\"return !toggle('fieldset-$id');\">$legend</a></legend><div id='fieldset-$id'" . ($visible ? "" : " class='hidden'") . ">\n";
+function print_fieldset($id, $legend, $visible = false, $onclick = "") {
+       echo "<fieldset><legend><a href='#fieldset-$id' onclick=\"$onclick" . "return !toggle('fieldset-$id');\">$legend</a></legend><div id='fieldset-$id'" . ($visible ? "" : " class='hidden'") . ">\n";
 }
 
 /** Return class='active' if $bold is true
index 40762058385a1c92133d4eaa252bf19ba4046cb6..09ca7b0c5c157172b091f8322a7e41067a72a471 100644 (file)
@@ -161,7 +161,7 @@ if (!$error && $_POST) {
 }
 ?>
 
-<form action="" method="post" enctype="multipart/form-data">
+<form action="" method="post" enctype="multipart/form-data" id="form">
 <p><?php
 $q = $_GET["sql"]; // overwrite $q from if ($_POST) to save memory
 if ($_POST) {
@@ -186,7 +186,7 @@ echo "<p>" . (ini_bool("file_uploads")
 echo checkbox("error_stops", 1, $_POST["error_stops"], lang('Stop on error')) . "\n";
 echo checkbox("only_errors", 1, $_POST["only_errors"], lang('Show only errors')) . "\n";
 
-print_fieldset("webfile", lang('From server'), $_POST["webfile"]);
+print_fieldset("webfile", lang('From server'), $_POST["webfile"], "document.getElementById('form')['only_errors'].checked = true; ");
 $compress = array();
 foreach (array("gz" => "zlib", "bz2" => "bz2") as $key => $val) {
        if (extension_loaded($val)) {