diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-07-23 18:19:30 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-07-23 18:19:30 (GMT) |
commit | 8276afc4563afbca78eed42474b945a64c121e2e (patch) | |
tree | b15f1d3250c5de8e4dafcd386d0491f5d33e9ca4 | |
parent | df520904de94d6f18e03eca0eabb206a254832cd (diff) |
Take into account releasenotes for trusted addons in release notifications
-rw-r--r-- | site/app/controllers/developers_controller.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/site/app/controllers/developers_controller.php b/site/app/controllers/developers_controller.php index 939a66e..192a608 100644 --- a/site/app/controllers/developers_controller.php +++ b/site/app/controllers/developers_controller.php @@ -345,6 +345,8 @@ class DevelopersController extends AppController return $this->Error->getJSONforError(sprintf(___('devcp_update_addon_guid_error'), $data['Addon']['guid'], $addon['Addon']['guid'])); } } + + $send_notification = false; if ($type == 'update') { // Make sure version doesn't exist already @@ -388,9 +390,8 @@ class DevelopersController extends AppController $this->Version->addCompatibleApp($version_id, $appversion['application_id'], $appversion['min'], $appversion['max']); } } - - // notify subscribed editors of update (if any) - $this->Editors->updateNotify($addon['Addon']['id'], $version_id, true); + + $send_notification = true; } elseif ($type == 'file') { $version_id = $this->data['Version']['id']; @@ -415,6 +416,10 @@ class DevelopersController extends AppController list($localizedFields, $unlocalizedFields) = $this->Version->splitLocalizedFields($this->data['Version']); $this->Version->saveTranslations($version_id, $this->params['form']['data']['Version'], $localizedFields); + if ($send_notification) + // notify subscribed editors of update (if any) + $this->Editors->updateNotify($addon['Addon']['id'], $version_id, true); + // Add Files $data['File']['db']['version_id'] = $version_id; $platforms = $data['File']['db']['platform_id']; |