add hooks for the account-management tools

This commit is contained in:
Evan Prodromou 2010-12-29 14:02:04 -08:00
parent 4a9a5076ff
commit 48edbb3023
2 changed files with 30 additions and 20 deletions

View File

@ -1040,3 +1040,8 @@ EndImportActivity: when we finish importing an activity
- $activity: The current activity
- $trusted: How "trusted" the process is
StartProfileSettingsActions: when we're showing account-management action list
- $action: Action being shown (use for output)
EndProfileSettingsActions: when we're showing account-management action list
- $action: Action being shown (use for output)

View File

@ -458,6 +458,8 @@ class ProfilesettingsAction extends AccountSettingsAction
$this->elementStart('div', array('id' => 'aside_primary',
'class' => 'aside'));
$this->elementStart('ul');
if (Event::handle('StartProfileSettingsActions', array($this))) {
if ($user->hasRight(Right::BACKUPACCOUNT)) {
$this->elementStart('li');
$this->element('a',
@ -479,6 +481,9 @@ class ProfilesettingsAction extends AccountSettingsAction
_('Restore account'));
$this->elementEnd('li');
}
Event::handle('EndProfileSettingsActions', array($this));
}
$this->elementEnd('ul');
$this->elementEnd('div');
}
}