X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Favatarsettings.php;h=52dc2e42496aa1b8c27ef47bc232b76a6dcf279d;hb=f11c1c77cab7d7310ec0d2c17bc6f35c491f2871;hp=cf4525552029f1fde641d6311235991cca3732a5;hpb=9d3829df9d29581c1d0281e57fda8ba4452ce2c2;p=quix0rs-gnu-social.git diff --git a/actions/avatarsettings.php b/actions/avatarsettings.php index cf45255520..52dc2e4249 100644 --- a/actions/avatarsettings.php +++ b/actions/avatarsettings.php @@ -103,7 +103,7 @@ class AvatarsettingsAction extends AccountSettingsAction if (!$profile) { common_log_db_error($user, 'SELECT', __FILE__); - $this->serverError(_('User without matching profile')); + $this->serverError(_('User without matching profile.')); return; } @@ -182,7 +182,7 @@ class AvatarsettingsAction extends AccountSettingsAction if (!$profile) { common_log_db_error($user, 'SELECT', __FILE__); - $this->serverError(_('User without matching profile')); + $this->serverError(_('User without matching profile.')); return; } @@ -301,6 +301,10 @@ class AvatarsettingsAction extends AccountSettingsAction $this->showForm($e->getMessage()); return; } + if ($imagefile === null) { + $this->showForm(_('No file uploaded.')); + return; + } $cur = common_current_user(); @@ -416,8 +420,8 @@ class AvatarsettingsAction extends AccountSettingsAction parent::showScripts(); if ($this->mode == 'crop') { - $this->script('js/jcrop/jquery.Jcrop.min.js'); - $this->script('js/jcrop/jquery.Jcrop.go.js'); + $this->script('jcrop/jquery.Jcrop.min.js'); + $this->script('jcrop/jquery.Jcrop.go.js'); } $this->autofocus('avatarfile');