From bd00ef839dbfd30be467fcf3e4e126c60568ff23 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sun, 27 Dec 2015 15:22:16 +0100 Subject: [PATCH] split() is deprecated and should be explode() We don't need the regexpness anyway. --- plugins/Autocomplete/actions/autocomplete.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/Autocomplete/actions/autocomplete.php b/plugins/Autocomplete/actions/autocomplete.php index 29921a5564..04acaefd38 100644 --- a/plugins/Autocomplete/actions/autocomplete.php +++ b/plugins/Autocomplete/actions/autocomplete.php @@ -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(), @@ -161,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(), -- 2.39.5