diff options
author | activities-devel@sugarlabs.org <activities-devel@sugarlabs.org> | 2009-03-04 17:30:48 (GMT) |
---|---|---|
committer | David Farning <dfarning@gmail.com> | 2009-03-07 13:31:00 (GMT) |
commit | bb8b48118e5e076d55650e1143c00118979d7520 (patch) | |
tree | aac44bd9f8c7d8c9bf2c72aa1853c60c03def64b | |
parent | 89bbd617419462f26fccfa26528a6c955eca27d8 (diff) |
Improve error reporting when uploading a file
-rw-r--r-- | site/app/controllers/developers_controller.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/site/app/controllers/developers_controller.php b/site/app/controllers/developers_controller.php index a2a837e..b46bcd1 100644 --- a/site/app/controllers/developers_controller.php +++ b/site/app/controllers/developers_controller.php @@ -529,6 +529,14 @@ class DevelopersController extends AppController return $this->Error->getJSONforError(_('devcp_error_activity_info_not_found')); } + if (!isset($ini_file['name'])) { + return $this->Error->getJSONforError(_('devcp_error_activity_info_missing_name')); + } + + if (!isset($ini_file['activity_version'])) { + return $this->Error->getJSONforError(_('devcp_error_activity_info_missing_activity_version')); + } + $addon['Addon']['name'] = $ini_file['name']; $addon['Addon']['summary'] = $ini_file['name']; $addon['Version']['version'] = $ini_file['activity_version']; |