]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/profilesettings.php
Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
[quix0rs-gnu-social.git] / actions / profilesettings.php
index 4890a575b107b5e4c9c0ff95a0f19dadaffb9998..303bb0ad9bbd76be81fa193fb1adec3de72df680 100644 (file)
@@ -458,11 +458,36 @@ class ProfilesettingsAction extends AccountSettingsAction
 
         $this->elementStart('div', array('id' => 'aside_primary',
                                          'class' => 'aside'));
-        if ($user->hasRight(Right::BACKUPACCOUNT)) {
-            $this->element('a',
-                           array('href' => common_local_url('backupaccount')),
-                           _('Backup account'));
+
+        $this->elementStart('div', array('id' => 'account_actions',
+                                         'class' => 'section'));
+        $this->elementStart('ul');
+        if (Event::handle('StartProfileSettingsActions', array($this))) {
+            if ($user->hasRight(Right::BACKUPACCOUNT)) {
+                $this->elementStart('li');
+                $this->element('a',
+                               array('href' => common_local_url('backupaccount')),
+                               _('Backup account'));
+                $this->elementEnd('li');
+            }
+            if ($user->hasRight(Right::DELETEACCOUNT)) {
+                $this->elementStart('li');
+                $this->element('a',
+                               array('href' => common_local_url('deleteaccount')),
+                               _('Delete account'));
+                $this->elementEnd('li');
+            }
+            if ($user->hasRight(Right::RESTOREACCOUNT)) {
+                $this->elementStart('li');
+                $this->element('a',
+                               array('href' => common_local_url('restoreaccount')),
+                               _('Restore account'));
+                $this->elementEnd('li');
+            }
+            Event::handle('EndProfileSettingsActions', array($this));
         }
+        $this->elementEnd('ul');
+        $this->elementEnd('div');
         $this->elementEnd('div');
     }
 }