Suhosin compatibility (thanks to Klemens Hackel)

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@559 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-03-02 13:38:00 +00:00
parent 2e03c63537
commit f1068f53fe
3 changed files with 17 additions and 8 deletions

View File

@@ -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 "<p class='error'>" . htmlspecialchars(lang('Maximum number of allowed fields exceeded. Please increase %s and %s.', 'suhosin.post.max_vars', 'suhosin.request.max_vars')) . "</p>\n";
}
?>
<form action="" method="post" id="form">
@@ -118,7 +123,7 @@ $collations = collations();
<table border="0" cellspacing="0" cellpadding="2">
<?php $column_comments = edit_fields($row["fields"], $collations); ?>
</table>
<?php echo type_change(count($row["fields"])); ?>
<?php echo type_change(count($row["fields"]), $suhosin); ?>
<p>
<?php echo lang('Auto Increment'); ?>: <input name="Auto_increment" size="4" value="<?php echo intval($row["Auto_increment"]); ?>" />
<?php echo lang('Comment'); ?>: <input name="Comment" value="<?php echo htmlspecialchars($row["Comment"]); ?>" maxlength="60" />