mirror of
https://github.com/vrana/adminer.git
synced 2025-08-11 00:54:08 +02:00
Handle max_input_vars and generalize Suhosin compatibility
This commit is contained in:
@@ -214,12 +214,11 @@ function type_class($type) {
|
||||
* @param array
|
||||
* @param array
|
||||
* @param string TABLE or PROCEDURE
|
||||
* @param int number of fields allowed by Suhosin
|
||||
* @param array returned by referencable_primary()
|
||||
* @param bool display comments column
|
||||
* @return null
|
||||
*/
|
||||
function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $foreign_keys = array(), $comments = false) {
|
||||
function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = array(), $comments = false) {
|
||||
global $connection, $inout;
|
||||
?>
|
||||
<thead><tr class="wrap">
|
||||
@@ -245,7 +244,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $forei
|
||||
?>
|
||||
<tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
|
||||
<?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?>
|
||||
<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" onchange="<?php echo ($field["field"] != "" || count($fields) > 1 ? "" : "editingAddRow(this, $allowed); "); ?>editingNameChange(this);" maxlength="64" autocapitalize="off"><?php } ?><input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>">
|
||||
<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" onchange="<?php echo ($field["field"] != "" || count($fields) > 1 ? "" : "editingAddRow(this); "); ?>editingNameChange(this);" maxlength="64" autocapitalize="off"><?php } ?><input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>">
|
||||
<?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
|
||||
<?php if ($type == "TABLE") { ?>
|
||||
<td><?php echo checkbox("fields[$i][null]", 1, $field["null"]); ?>
|
||||
@@ -256,7 +255,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $forei
|
||||
<?php
|
||||
echo "<td>";
|
||||
echo (support("move_col") ?
|
||||
"<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, $allowed, 1);'> "
|
||||
"<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, 1);'> "
|
||||
. "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'> "
|
||||
. "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'> "
|
||||
: "");
|
||||
|
Reference in New Issue
Block a user