mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[feature/avatars] Pass phpbb_user object to prepare_form_acp()
The phpbb_user object might be used for language variables. Pass it as a function argument to prepare_form_acp() instead of using globals. PHPBB3-10018
This commit is contained in:
@@ -122,10 +122,8 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function prepare_form_acp()
|
||||
public function prepare_form_acp($user)
|
||||
{
|
||||
global $user;
|
||||
|
||||
return array(
|
||||
'allow_avatar_remote_upload'=> array('lang' => 'ALLOW_REMOTE_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'validate' => 'int:0', 'type' => 'text:4:10', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
|
||||
|
Reference in New Issue
Block a user