hook for new group through a form, same as editing

This commit is contained in:
Evan Prodromou 2011-02-03 16:19:41 -05:00
parent 8bf57019c1
commit 2cdba23df4

View File

@ -120,6 +120,7 @@ class NewgroupAction extends Action
function trySave() function trySave()
{ {
if (Event::handle('StartGroupSaveForm', array($this))) {
try { try {
$nickname = Nickname::normalize($this->trimmed('nickname')); $nickname = Nickname::normalize($this->trimmed('nickname'));
} catch (NicknameException $e) { } catch (NicknameException $e) {
@ -216,8 +217,13 @@ class NewgroupAction extends Action
'userid' => $cur->id, 'userid' => $cur->id,
'local' => true)); 'local' => true));
$this->group = $group;
Event::handle('EndGroupSaveForm', array($this));
common_redirect($group->homeUrl(), 303); common_redirect($group->homeUrl(), 303);
} }
}
function nicknameExists($nickname) function nicknameExists($nickname)
{ {