]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/profilecompletion.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / actions / profilecompletion.php
index 9f3f2c9accbf968d94d4d10f4c3f91463a74318b..5880752fcf933faa069ad60a3b9761c4ef450a4e 100644 (file)
@@ -68,7 +68,7 @@ class ProfilecompletionAction extends Action
      *
      * @return boolean success flag
      */
-    function prepare($args)
+    function prepare(array $args=array())
     {
         parent::prepare($args);
 
@@ -80,7 +80,6 @@ class ProfilecompletionAction extends Action
             // TRANS: Client error displayed when the session token does not match or is not given.
             $this->clientError(_('There was a problem with your session token.'.
                                  ' Try again, please.'));
-            return false;
         }
 
         // Only for logged-in users
@@ -90,7 +89,6 @@ class ProfilecompletionAction extends Action
         if (empty($this->user)) {
             // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
             $this->clientError(_('Not logged in.'));
-            return false;
         }
 
         $id = $this->arg('peopletag_id');
@@ -99,7 +97,6 @@ class ProfilecompletionAction extends Action
         if (empty($this->peopletag)) {
             // TRANS: Client error displayed trying to reference a non-existing list.
             $this->clientError(_('No such list.'));
-            return false;
         }
 
         $field = $this->arg('field');
@@ -107,7 +104,6 @@ class ProfilecompletionAction extends Action
             // TRANS: Client error displayed when trying to add an unindentified field to profile.
             // TRANS: %s is a field name.
             $this->clientError(sprintf(_('Unidentified field %s.'), htmlspecialchars($field)), 404);
-            return false;
         }
         $this->field = $field;
 
@@ -124,7 +120,7 @@ class ProfilecompletionAction extends Action
      * @return void
      */
 
-    function handle($args)
+    function handle(array $args=array())
     {
         $this->msg = null;
 
@@ -151,7 +147,7 @@ class ProfilecompletionAction extends Action
             }
         }
         $this->elementEnd('body');
-        $this->elementEnd('html');
+        $this->endHTML();
     }
 
     function getResults()
@@ -179,7 +175,7 @@ class ProfilecompletionAction extends Action
             else {
                 $cnt = $profile->find();
             }
-            Event::handle('EndProfileCompletionSearch', $this, $profile, $search_engine);
+            Event::handle('EndProfileCompletionSearch', array($this, &$profile, $search_engine));
         }
 
         while ($profile->fetch()) {