]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Autocomplete/actions/autocomplete.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / plugins / Autocomplete / actions / autocomplete.php
index d5370fe0e1e66eeaf383de3cf62fdaec58342c9b..c3e0433a891e1410acc98e1a9fc073fa2d5248ce 100644 (file)
@@ -29,9 +29,7 @@
  * @link      http://status.net/
  */
 
-if (!defined('GNUSOCIAL') && !defined('STATUSNET')) {
-    exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 /**
  * List users for autocompletion
@@ -142,7 +140,7 @@ class AutocompleteAction extends Action
         foreach($this->profiles as $profile){
             $avatarUrl = $profile->avatarUrl(AVATAR_MINI_SIZE);
             $acct = $profile->getAcctUri();
-            $identifier = split(':', $profile->getAcctUri(), 2)[1];
+            $identifier = explode(':', $profile->getAcctUri(), 2)[1];
             $results[] = array(
                 'value' => '@'.$identifier,
                 'nickname' => $profile->getNickname(),
@@ -153,6 +151,7 @@ class AutocompleteAction extends Action
             );
         }
         foreach($this->groups as $group){
+            $profile = $group->getProfile();
             // sigh.... encapsulate this upstream!
             if ($group->mini_logo) {
                 $avatarUrl = $group->mini_logo;
@@ -160,7 +159,7 @@ class AutocompleteAction extends Action
                 $avatarUrl = User_group::defaultLogo(AVATAR_MINI_SIZE);
             }
             $acct = $profile->getAcctUri();
-            $identifier = split(':', $profile->getAcctUri(), 2)[1];
+            $identifier = explode(':', $profile->getAcctUri(), 2)[1];
             $results[] = array(
                 'value' => '!'.$group->getNickname(),
                 'nickname' => $group->getNickname(),
@@ -179,7 +178,7 @@ class AutocompleteAction extends Action
      *
      * @return boolean is read only action?
      */
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         return true;
     }