]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/invite.php
Changed @id to @class for notices ul
[quix0rs-gnu-social.git] / actions / invite.php
index feef94d0f26d20c4edde4234369351fbe307bfc9..95d96bcde002305832ee768a8c1b63075fa3223f 100644 (file)
 
 if (!defined('LACONICA')) { exit(1); }
 
-class InviteAction extends Action {
+class InviteAction extends Action
+{
 
-    function is_readonly() {
+    function isReadOnly()
+    {
         return false;
     }
 
-    function handle($args) {
+    function handle($args)
+    {
         parent::handle($args);
         if (!common_logged_in()) {
-            $this->client_error(sprintf(_('You must be logged in to invite other users to use %s'),
+            $this->clientError(sprintf(_('You must be logged in to invite other users to use %s'),
                                         common_config('site', 'name')));
             return;
         } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
@@ -38,7 +41,8 @@ class InviteAction extends Action {
         }
     }
 
-    function send_invitations() {
+    function send_invitations()
+    {
 
         # CSRF protection
         $token = $this->trimmed('token');
@@ -85,71 +89,74 @@ class InviteAction extends Action {
 
         common_show_header(_('Invitation(s) sent'));
         if ($already) {
-            common_element('p', null, _('You are already subscribed to these users:'));
-            common_element_start('ul');
+            $this->element('p', null, _('You are already subscribed to these users:'));
+            $this->elementStart('ul');
             foreach ($already as $other) {
-                common_element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email));
+                $this->element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email));
             }
-            common_element_end('ul');
+            $this->elementEnd('ul');
         }
         if ($subbed) {
-            common_element('p', null, _('These people are already users and you were automatically subscribed to them:'));
-            common_element_start('ul');
+            $this->element('p', null, _('These people are already users and you were automatically subscribed to them:'));
+            $this->elementStart('ul');
             foreach ($subbed as $other) {
-                common_element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email));
+                $this->element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email));
             }
-            common_element_end('ul');
+            $this->elementEnd('ul');
         }
         if ($sent) {
-            common_element('p', null, _('Invitation(s) sent to the following people:'));
-            common_element_start('ul');
+            $this->element('p', null, _('Invitation(s) sent to the following people:'));
+            $this->elementStart('ul');
             foreach ($sent as $other) {
-                common_element('li', null, $other);
+                $this->element('li', null, $other);
             }
-            common_element_end('ul');
-            common_element('p', null, _('You will be notified when your invitees accept the invitation and register on the site. Thanks for growing the community!'));
+            $this->elementEnd('ul');
+            $this->element('p', null, _('You will be notified when your invitees accept the invitation and register on the site. Thanks for growing the community!'));
         }
         common_show_footer();
     }
 
-    function show_top($error=null) {
+    function show_top($error=null)
+    {
         if ($error) {
-            common_element('p', 'error', $error);
+            $this->element('p', 'error', $error);
         } else {
-            common_element_start('div', 'instructions');
-            common_element('p', null,
+            $this->elementStart('div', 'instructions');
+            $this->element('p', null,
                            _('Use this form to invite your friends and colleagues to use this service.'));
-            common_element_end('div');
+            $this->elementEnd('div');
         }
     }
 
-    function show_form($error=null) {
+    function show_form($error=null)
+    {
 
         global $config;
 
         common_show_header(_('Invite new users'), null, $error, array($this, 'show_top'));
 
-        common_element_start('form', array('method' => 'post',
+        $this->elementStart('form', array('method' => 'post',
                                            'id' => 'invite',
                                            'action' => common_local_url('invite')));
-        common_hidden('token', common_session_token());
+        $this->hidden('token', common_session_token());
 
-        common_textarea('addresses', _('Email addresses'),
+        $this->textarea('addresses', _('Email addresses'),
                         $this->trimmed('addresses'),
                         _('Addresses of friends to invite (one per line)'));
 
-        common_textarea('personal', _('Personal message'),
+        $this->textarea('personal', _('Personal message'),
                         $this->trimmed('personal'),
                         _('Optionally add a personal message to the invitation.'));
 
-        common_submit('send', _('Send'));
+        $this->submit('send', _('Send'));
 
-        common_element_end('form');
+        $this->elementEnd('form');
 
         common_show_footer();
     }
 
-    function send_invitation($email, $user, $personal) {
+    function send_invitation($email, $user, $personal)
+    {
 
         $profile = $user->getProfile();
         $bestname = $profile->getBestName();