From: jakubvrana Date: Mon, 2 Mar 2009 13:38:00 +0000 (+0000) Subject: Suhosin compatibility (thanks to Klemens Hackel) X-Git-Tag: v3.0.0~961 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=f1068f53fe650bf4acf3e5a1d01d2c6ff9134e80;p=adminer.git Suhosin compatibility (thanks to Klemens Hackel) git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@559 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/create.inc.php b/create.inc.php index 0aac00f1..5acf780b 100644 --- a/create.inc.php +++ b/create.inc.php @@ -106,6 +106,11 @@ if ($_POST) { $row = array("fields" => array(array("field" => "")), "partition_names" => array()); } $collations = collations(); + +$suhosin = floor(extension_loaded("suhosin") ? (min(ini_get("suhosin.request.max_vars"), ini_get("suhosin.post.max_vars")) - 13) / 8 : 0); +if ($suhosin && count($row["fields"]) > $suhosin) { + echo "

" . htmlspecialchars(lang('Maximum number of allowed fields exceeded. Please increase %s and %s.', 'suhosin.post.max_vars', 'suhosin.request.max_vars')) . "

\n"; +} ?>
@@ -118,7 +123,7 @@ $collations = collations();
- +

: " /> : " maxlength="60" /> diff --git a/editing.inc.php b/editing.inc.php index 12d7e199..58bec4ae 100644 --- a/editing.inc.php +++ b/editing.inc.php @@ -90,7 +90,7 @@ function edit_type($key, $field, $collations) { ?> " size="3" /> - + - +// ]]> 'Struktura tabulky', 'Select table' => 'Vypsat tabulku', 'Stop on error' => 'Zastavit při chybě', + 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Byl překročen maximální povolený počet polí. Zvyšte prosím %s a %s.', + '(anywhere)' => '(kdekoliv)', );