]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/avatarsettings.php
move check for bad IDs from activityobject to activity and make simpler
[quix0rs-gnu-social.git] / actions / avatarsettings.php
index cf4525552029f1fde641d6311235991cca3732a5..d4ea11cb7e9deb03b3857e4abff3ee4608d5cd76 100644 (file)
@@ -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');