X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fhovercard.php;h=01d9feb1e46fb4f1711e65e8d185e5b31293a5e1;hb=0454d0a670e051e8519e9a4220606f83d1408214;hp=9bf4774056f3c227bb43e35d26e4e269e9395846;hpb=224cfb274694a063ef205e7a0331f435cc0999c0;p=friendica.git diff --git a/mod/hovercard.php b/mod/hovercard.php index 9bf4774056..01d9feb1e4 100644 --- a/mod/hovercard.php +++ b/mod/hovercard.php @@ -9,6 +9,7 @@ */ use Friendica\App; use Friendica\Core\Config; +use Friendica\Core\System; use Friendica\Model\Contact; use Friendica\Model\GContact; use Friendica\Model\Profile; @@ -26,7 +27,7 @@ function hovercard_content() // Get out if the system doesn't have public access allowed if (intval(Config::get('system', 'block_public'))) { - http_status_exit(401); + System::httpExit(401); } // Return the raw content of the template. We use this to make templates usable for js functions. @@ -66,7 +67,7 @@ function hovercard_content() } // Move the contact data to the profile array so we can deliver it to - $profile = array( + $profile = [ 'name' => $contact['name'], 'nick' => $contact['nick'], 'addr' => defaults($contact, 'addr', $contact['url']), @@ -81,16 +82,16 @@ function hovercard_content() 'bd' => $contact['birthday'] <= '0001-01-01' ? '' : $contact['birthday'], 'account_type' => Contact::getAccountType($contact), 'actions' => $actions, - ); + ]; if ($datatype == 'html') { $tpl = get_markup_template('hovercard.tpl'); - $o = replace_macros($tpl, array( + $o = replace_macros($tpl, [ '$profile' => $profile, - )); + ]); return $o; } else { - json_return_and_die($profile); + System::jsonExit($profile); } }