}
$collations = collations();
-$suhosin = floor(extension_loaded("suhosin") ? (min(ini_get("suhosin.request.max_vars"), ini_get("suhosin.post.max_vars")) - 13) / 10 : 0); // 10 - number of fields per row, 13 - number of other fields
-if ($suhosin && count($row["fields"]) > $suhosin) {
- echo "<p class='error'>" . h(lang('Maximum number of allowed fields exceeded. Please increase %s and %s.', 'suhosin.post.max_vars', 'suhosin.request.max_vars')) . "\n";
-}
-
$engines = engines();
// case of engine may differ
foreach ($engines as $engine) {
}
}
}
-edit_fields($row["fields"], $collations, "TABLE", $suhosin, $foreign_keys, $comments);
+edit_fields($row["fields"], $collations, "TABLE", $foreign_keys, $comments);
?>
</table>
<p>
<p>
<input type="submit" value="<?php echo lang('Save'); ?>">
<?php if ($_GET["create"] != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?>
-<input type="hidden" name="token" value="<?php echo $token; ?>">
<?php
if (support("partitioning")) {
$partition_table = ereg('RANGE|LIST', $row["partition_by"]);
<?php
}
?>
+<input type="hidden" name="token" value="<?php echo $token; ?>">
</form>
if ($auth && $_POST["token"]) {
$_POST["token"] = $token; // reset token after explicit login
}
-$error = ($_POST ///< @var string
- ? ($_POST["token"] == $token ? "" : lang('Invalid CSRF token. Send the form again.'))
- : ($_SERVER["REQUEST_METHOD"] != "POST" ? "" : lang('Too big POST data. Reduce the data or increase the %s configuration directive.', '"post_max_size"')) // posted form with no data means that post_max_size exceeded because Adminer always sends token at least
-);
+
+$error = ''; ///< @var string
+if ($_POST) {
+ if ($_POST["token"] != $token) {
+ $ini = "max_input_vars";
+ $max_vars = ini_get($ini);
+ if (extension_loaded("suhosin")) {
+ foreach (array("suhosin.request.max_vars", "suhosin.post.max_vars") as $key) {
+ $val = ini_get($key);
+ if ($val && (!$max_vars || $val < $max_vars)) {
+ $ini = $key;
+ $max_vars = $val;
+ }
+ }
+ }
+ $error = (!$_POST["token"] && $max_vars
+ ? lang('Maximum number of allowed fields exceeded. Please increase %s.', "'$ini'")
+ : lang('Invalid CSRF token. Send the form again.')
+ );
+ }
+} elseif ($_SERVER["REQUEST_METHOD"] == "POST") {
+ // posted form with no data means that post_max_size exceeded because Adminer always sends token at least
+ $error = lang('Too big POST data. Reduce the data or increase the %s configuration directive.', "'post_max_size'");
+}
* @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">
?>
<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"]); ?>
<?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') . "'> "
: "");
'%d item(s) have been affected.' => 'عدد العناصر المعدلة هو %d.',
'whole result' => 'نتيجة كاملة',
'Clone' => 'نسخ',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'لقد تجاوزت العدد الأقصى للحقول. يرجى الرفع من %s و %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'لقد تجاوزت العدد الأقصى للحقول. يرجى الرفع من %s.',
'Partition by' => 'مقسم بواسطة',
'Partitions' => 'التقسيمات',
'Partition name' => 'إسم التقسيم',
'%d item(s) have been affected.' => '%d টি বিষয়বস্তু প্রভাবিত হয়েছে',
'whole result' => 'সম্পূর্ণ ফলাফল',
'Clone' => 'ক্লোন',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'অনুমোদিত ফিল্ড এর সর্বাধিক সংখ্যা অতিক্রম করে গেছে। অনুগ্রহপূর্বক %s এবং %s বৃদ্ধি করুন।',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'অনুমোদিত ফিল্ড এর সর্বাধিক সংখ্যা অতিক্রম করে গেছে। অনুগ্রহপূর্বক %s বৃদ্ধি করুন।',
'Partition by' => 'পার্টিশন যার মাধ্যমে',
'Partitions' => 'পার্টিশন',
'Partition name' => 'পার্টিশনের নাম',
'Show structure' => 'Mostra l\'estructura',
'Select data' => 'Selecciona dades',
'Stop on error' => 'Atura en trobar un error',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'S\'ha assolit el nombre màxim de camps. Incrementa %s i %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'S\'ha assolit el nombre màxim de camps. Incrementa %s.',
'anywhere' => 'a qualsevol lloc',
'%.3f s' => '%.3f s',
'$1-$3-$5' => '$5/$3/$1',
'Move up' => 'Přesunout nahoru',
'Move down' => 'Přesunout dolů',
'Remove' => 'Odebrat',
- '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.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Byl překročen maximální povolený počet polí. Zvyšte prosím %s.',
'Partition by' => 'Rozdělit podle',
'Partitions' => 'Oddíly',
'%d item(s) have been affected.' => '%d Artikel betroffen.',
'whole result' => 'Gesamtergebnis',
'Clone' => 'Klonen',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Die maximal erlaubte Anzahl der Felder ist überschritten. Bitte %s und %s erhöhen.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Die maximal erlaubte Anzahl der Felder ist überschritten. Bitte %s erhöhen.',
'Partition by' => 'Partitionieren um',
'Partitions' => 'Partitionen',
'Partition name' => 'Name der Partition',
'%d item(s) have been affected.' => array('%d ítem afectado.', '%d itemes afectados.'),
'whole result' => 'resultado completo',
'Clone' => 'Clonar',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Cantida máxima de campos permitidos excedidos. Por favor aumente %s y %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Cantida máxima de campos permitidos excedidos. Por favor aumente %s.',
'Partition by' => 'Particionar por',
'Partitions' => 'Particiones',
'Partition name' => 'Nombre de Partición',
'%d item(s) have been affected.' => 'Mõjutatud kirjeid: %d.',
'whole result' => 'Täielikud tulemused',
'Clone' => 'Kloon',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Maksimaalne väljade arv ületatud. Palun suurendage %s ja %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maksimaalne väljade arv ületatud. Palun suurendage %s.',
'Partition by' => 'Partitsiooni',
'Partitions' => 'Partitsioonid',
'Partition name' => 'Partitsiooni nimi',
'Move up' => 'انتقال به بالا',
'Move down' => 'انتقال به پایین',
'Remove' => 'حذف',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'حداکثر مجاز فیلدهای مجاز اشباع شد. لطفا %s و %s را کاهش دهید',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'حداکثر مجاز فیلدهای مجاز اشباع شد. لطفا %s را کاهش دهید',
'Partition by' => 'بخشبندی توسط',
'Partitions' => 'بخشبندیها',
'%d item(s) have been affected.' => array('%d élément a été modifié.', '%d éléments ont été modifiés.'),
'whole result' => 'résultat entier',
'Clone' => 'Cloner',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Le nombre maximum de champs est dépassé. Veuillez augmenter %s et %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Le nombre maximum de champs est dépassé. Veuillez augmenter %s.',
'Partition by' => 'Partitionner par',
'Partitions' => 'Partitions',
'Partition name' => 'Nom de la partition',
'Show structure' => 'Struktúra',
'Select data' => 'Tartalom',
'Stop on error' => 'Hiba esetén megáll',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'A maximális mezőszámot elérted. Növeld meg ezeket: %s, %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'A maximális mezőszámot elérted. Növeld meg ezeket: %s.',
'anywhere' => 'bárhol',
'%.3f s' => '%.3f másodperc',
'$1-$3-$5' => '$6.$4.$1',
'Move up' => 'Naik',
'Move down' => 'Turun',
'Remove' => 'Hapus',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Jumlah ruas maksimum yang diizinkan dilewati. Harap naikkan %s dan %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Jumlah ruas maksimum yang diizinkan dilewati. Harap naikkan %s.',
'Partition by' => 'Partisi menurut',
'Partitions' => 'Partisi',
'%d item(s) have been affected.' => array('Il risultato consiste in %d elemento.', 'Il risultato consiste in %d elementi.'),
'whole result' => 'intero risultato',
'Clone' => 'Clona',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Troppi campi. Per favore aumentare %s e %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Troppi campi. Per favore aumentare %s.',
'Partition by' => 'Partiziona per',
'Partitions' => 'Partizioni',
'Partition name' => 'Nome partizione',
'whole result' => '全結果',
'Tables have been dropped.' => 'テーブルを削除しました',
'Clone' => 'クローン',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => '定義可能な最大フィールド数を越えました。%s と %s を増やしてください。',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => '定義可能な最大フィールド数を越えました。%s を増やしてください。',
'Partition by' => 'パーティション',
'Partitions' => 'パーティション',
'Partition name' => 'パーティション名',
'Move up' => 'Perkelti į viršų',
'Move down' => 'Perkelti žemyn',
'Remove' => 'Pašalinti',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Viršytas maksimalus leidžiamų stulpelių kiekis. Padidinkite %s ir %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Viršytas maksimalus leidžiamų stulpelių kiekis. Padidinkite %s.',
'Partition by' => 'Skirstyti pagal',
'Partitions' => 'Skirsniai',
'%d item(s) have been affected.' => array('%d item aangepast.', '%d items aangepast.'),
'whole result' => 'volledig resultaat',
'Clone' => 'Dupliceer',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Maximum aantal velden bereikt. Verhoog %s en %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maximum aantal velden bereikt. Verhoog %s.',
'Partition by' => 'Partitioneren op',
'Partitions' => 'Partities',
'Partition name' => 'Partitie naam',
'Move up' => 'Przesuń w górę',
'Move down' => 'Przesuń w dół',
'Remove' => 'Usuń',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Przekroczono maksymalną liczbę pól. Zwiększ %s i %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Przekroczono maksymalną liczbę pól. Zwiększ %s.',
'Partition by' => 'Partycjonowanie',
'Partitions' => 'Partycje',
'%d item(s) have been affected.' => array('%d item afetado.', '%d itens afetados.'),
'whole result' => 'resultado completo',
'Clone' => 'Clonar',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Quantidade máxima de campos permitidos excedidos. Por favor aumente %s e %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Quantidade máxima de campos permitidos excedidos. Por favor aumente %s.',
'Partition by' => 'Particionar por',
'Partitions' => 'Partições',
'Partition name' => 'Nome da Partição',
'%d row(s) have been imported.' => array('%d rînd importat.', '%d rînduri importate.'),
'Import' => 'Importă',
'Stop on error' => 'Opreștete la eroare',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Numărul maxim de înscrieri disponibile a fost atins. Majorați %s și %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Numărul maxim de înscrieri disponibile a fost atins. Majorați %s.',
'anywhere' => 'oriunde',
'%.3f s' => '%.3f s',
'$1-$3-$5' => '$5.$3.$1',
'%d row(s) have been imported.' => array('Импортирована %d строка.', 'Импортировано %d строки.', 'Импортировано %d строк.'),
'Import' => 'Импорт',
'Stop on error' => 'Остановить при ошибке',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Достигнуто максимальное значение количества доступных полей. Увеличьте %s и %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Достигнуто максимальное значение количества доступных полей. Увеличьте %s.',
'anywhere' => 'в любом месте',
'%.3f s' => '%.3f s',
'$1-$3-$5' => '$5.$3.$1',
'%d row(s) have been imported.' => array('Bol importovaný %d záznam.', 'Boli importované %d záznamy.', 'Bolo importovaných %d záznamov.'),
'Import' => 'Import',
'Stop on error' => 'Zastaviť pri chybe',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Bol prekročený maximálny počet povolených polí. Zvýšte prosím %s a %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Bol prekročený maximálny počet povolených polí. Zvýšte prosím %s.',
'anywhere' => 'kdekoľvek',
'%.3f s' => '%.3f s',
'$1-$3-$5' => '$6.$4.$1',
'Move up' => 'Premakni gor',
'Move down' => 'Premakni dol',
'Remove' => 'Odstrani',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Največje število dovoljenih polje je preseženo. Prosimo, povečajte %s in %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Največje število dovoljenih polje je preseženo. Prosimo, povečajte %s.',
'Partition by' => 'Porazdeli po',
'Partitions' => 'Porazdelitve',
'Move up' => 'Помери на горе',
'Move down' => 'Помери на доле',
'Remove' => 'Уклони',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Премашен је максимални број дозвољених поља. Молим увећајте %s и %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Премашен је максимални број дозвољених поља. Молим увећајте %s.',
'Partition by' => 'Подели по',
'Partitions' => 'Поделе',
'%d item(s) have been affected.' => array('%d உருப்படி மாற்றமடைந்தது.', '%d உருப்படிகள் மாற்றமடைந்தன.'),
'whole result' => 'முழுமையான முடிவு',
'Clone' => 'நகலி (Clone)',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'அனுமதிக்கப்பட்ட அதிகபட்ச கோப்புகளின் எண்ணிக்கை மீறப்பட்டது. தயவு செய்து %s மற்றும் %s யை அதிகரிக்கவும்.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'அனுமதிக்கப்பட்ட அதிகபட்ச கோப்புகளின் எண்ணிக்கை மீறப்பட்டது. தயவு செய்து %s மற்றும் %s யை அதிகரிக்கவும்.',
'Partition by' => 'பிரித்தது',
'Partitions' => 'பிரிவுகள்',
'Partition name' => 'பிரிவின் பெயர்',
'Move up' => 'Yukarı taşı',
'Move down' => 'Aşağı taşı',
'Remove' => 'Sil',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'İzin verilen en fazla alan sayısı aşıldı. Lütfen %s ve %s değerlerini artırın.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'İzin verilen en fazla alan sayısı aşıldı. Lütfen %s değerlerini artırın.',
'Partition by' => 'Bununla bölümle',
'Partitions' => 'Bölümler',
'Move up' => 'Пересунути вгору',
'Move down' => 'Пересунути вниз',
'Remove' => 'Видалити',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Досягнута максимальна кількість доступних полів. Будь ласка, збільшіть %s і %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Досягнута максимальна кількість доступних полів. Будь ласка, збільшіть %s.',
'Partition by' => 'Розділити по',
'Partitions' => 'Розділи',
'Move up' => 'xx',
'Move down' => 'xx',
'Remove' => 'xx',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'xx',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'xx',
'Partition by' => 'xx',
'Partitions' => 'xx',
'whole result' => '所有結果',
'Tables have been dropped.' => '已丟棄表。',
'Clone' => '複製',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => '超過最多允許的字段數量。請增加%s和%s 。',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => '超過最多允許的字段數量。請增加%s。',
'Partition by' => '分區類型',
'Partitions' => '分區',
'Partition name' => '分區名',
'whole result' => '所有结果',
'Tables have been dropped.' => '已丢弃表。',
'Clone' => '克隆',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => '超过最多允许的字段数量。请增加 %s 和 %s 。',
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => '超过最多允许的字段数量。请增加 %s。',
'Partition by' => '分区类型',
'Partitions' => '分区',
'Partition name' => '分区名',
?>
<p>
<input type="submit" value="<?php echo lang('Execute'); ?>" title="Ctrl+Enter">
-<input type="hidden" name="token" value="<?php echo $token; ?>">
<?php
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";
echo "</div></fieldset>\n";
}
?>
-
+<input type="hidden" name="token" value="<?php echo $token; ?>">
</form>
/** Add table row for next field
* @param HTMLInputElement
* @param boolean
-* @param boolean
* @return boolean
*/
-function editingAddRow(button, allowed, focus) {
- if (allowed && rowCount >= allowed) {
- return false;
- }
+function editingAddRow(button, focus) {
var match = /(\d+)(\.\d+)?/.exec(button.name);
var x = match[0] + (match[2] ? added.substr(match[2].length) : added) + '1';
var row = parentTag(button, 'tr');
Recover original view, trigger, routine if creating fails
Allow loading more data with inline edit (bug #3605531)
Stay on the same page after deleting rows (bug #3605845)
+Handle max_input_vars
Disable autocapitalize in identifiers
Adminer 3.6.3 (released 2013-01-23):