class Index extends BaseSettings
{
- public static function post(array $parameters = [])
+ protected function post(array $request = [], array $post = [])
{
if (!Session::isAuthenticated()) {
return;
$filename = '';
- if (!Photo::store($Image, local_user(), 0, $resource_id, $filename, DI::l10n()->t('Profile Photos'), 0)) {
+ if (!Photo::store($Image, local_user(), 0, $resource_id, $filename, DI::l10n()->t(Photo::PROFILE_PHOTOS), 0, Photo::USER_AVATAR)) {
notice(DI::l10n()->t('Image upload failed.'));
}
if ($width > 640 || $height > 640) {
$Image->scaleDown(640);
- if (!Photo::store($Image, local_user(), 0, $resource_id, $filename, DI::l10n()->t('Profile Photos'), 1)) {
+ if (!Photo::store($Image, local_user(), 0, $resource_id, $filename, DI::l10n()->t(Photo::PROFILE_PHOTOS), 1, Photo::USER_AVATAR)) {
notice(DI::l10n()->t('Image size reduction [%s] failed.', '640'));
}
}
DI::baseUrl()->redirect('settings/profile/photo/crop/' . $resource_id);
}
- public static function content(array $parameters = [])
+ protected function content(array $request = []): string
{
if (!Session::isAuthenticated()) {
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
DI::l10n()->t('or'),
($newuser) ?
'<a href="' . DI::baseUrl() . '">' . DI::l10n()->t('skip this step') . '</a>'
- : '<a href="' . DI::baseUrl() . '/photos/' . DI::app()->getUserNickname() . '">'
+ : '<a href="' . DI::baseUrl() . '/photos/' . DI::app()->getLoggedInUserNickname() . '">'
. DI::l10n()->t('select a photo from your photo albums') . '</a>'
),
]);