MDL-41819 try to work around max_input_vars restriction
This commit is contained in:
@@ -73,6 +73,11 @@ abstract class base_moodleform extends moodleform {
|
||||
*/
|
||||
function __construct(base_ui_stage $uistage, $action=null, $customdata=null, $method='post', $target='', $attributes=null, $editable=true) {
|
||||
$this->uistage = $uistage;
|
||||
$attributes = (array)$attributes;
|
||||
if (!isset($attributes['enctype'])) {
|
||||
$attributes['enctype'] = 'application/x-www-form-urlencoded'; // Enforce compatibility with our max_input_vars hack.
|
||||
}
|
||||
|
||||
parent::__construct($action, $customdata, $method, $target, $attributes, $editable);
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -697,6 +697,7 @@ class restore_ui_stage_process extends restore_ui_stage {
|
||||
$html .= html_writer::start_tag('form', array(
|
||||
'action' => $url->out_omit_querystring(),
|
||||
'class' => 'backup-restore',
|
||||
'enctype' => 'application/x-www-form-urlencoded', // Enforce compatibility with our max_input_vars hack.
|
||||
'method' => 'post'));
|
||||
foreach ($url->params() as $name => $value) {
|
||||
$html .= html_writer::empty_tag('input', array(
|
||||
|
||||
Reference in New Issue
Block a user