]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/avatarsettings.php
Add Start/EndFavorNoticeForm and Start/EndDisFavorNoticeForm hooks
[quix0rs-gnu-social.git] / actions / avatarsettings.php
index cf4525552029f1fde641d6311235991cca3732a5..52dc2e42496aa1b8c27ef47bc232b76a6dcf279d 100644 (file)
@@ -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');