1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[feature/avatars] UCP Avatar Interface

This stubs out the avatar form fields and how form processing will
occur. Form processing is not yet implemented, but shouldn't be too
hard. After this I will refactor/duplicate some of the logic for the
ACP.

PHPBB3-10018
This commit is contained in:
Cullen Walsh
2011-04-17 21:58:51 -07:00
committed by Cullen Walsh
parent 24379f1297
commit 7abded081d
11 changed files with 265 additions and 94 deletions

View File

@@ -47,4 +47,31 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
);
}
}
/**
* @TODO
**/
public function handle_form($template, &$error = array(), $submitted = false)
{
if ($submitted) {
$error[] = 'TODO';
return '';
}
else
{
$can_upload = (file_exists($this->phpbb_root_path . $this->config['avatar_path']) && phpbb_is_writable($this->phpbb_root_path . $this->config['avatar_path']) && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
if ($can_upload)
{
$template->assign_vars(array(
'S_UPLOAD_AVATAR_URL' => ($this->config['allow_avatar_remote_upload']) ? true : false,
));
return true;
}
else
{
return false;
}
}
}
}