forked from GNUsocial/gnu-social
Fix ticket #3013: MAX_FILE_SIZE hidden fields were incorrectly placed
In order to apply to PHP's POST processing, the MAX_FILE_SIZE field must appear *before* the file upload field. They were incorrectly placed after, where they had no effect on POST processing.
This commit is contained in:
@@ -358,12 +358,12 @@ class MobileProfilePlugin extends WAP20Plugin
|
||||
|
||||
if (common_config('attachments', 'uploads')) {
|
||||
if ($this->mobileFeatures['inputfiletype']) {
|
||||
$form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota'));
|
||||
$form->out->element('label', array('for' => 'notice_data-attach'), _m('Attach'));
|
||||
$form->out->element('input', array('id' => 'notice_data-attach',
|
||||
'type' => 'file',
|
||||
'name' => 'attach',
|
||||
'title' => _m('Attach a file')));
|
||||
$form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota'));
|
||||
}
|
||||
}
|
||||
if ($form->action) {
|
||||
|
Reference in New Issue
Block a user