require_once('include/crypto.php');
-function xrd_init(&$a) {
+function xrd_init(App $a) {
$uri = urldecode(notags(trim($_GET['uri'])));
$r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1",
dbesc($name)
);
- if(! dbm::is_result($r))
+ if (! dbm::is_result($r)) {
killme();
+ }
$salmon_key = salmon_key($r[0]['spubkey']);
$profile_url = App::get_baseurl().'/profile/'.$r[0]['nickname'];
- if ($acct)
+ if ($acct) {
$alias = $profile_url;
+ }
else {
$alias = 'acct:'.$r[0]['nickname'].'@'.$a->get_hostname();
- if ($a->get_path())
+ if ($a->get_path()) {
$alias .= '/'.$a->get_path();
+ }
}
$o = replace_macros($tpl, array(
'$salmen' => App::get_baseurl() . '/salmon/' . $r[0]['nickname'] . '/mention',
'$subscribe' => App::get_baseurl() . '/follow?url={uri}',
'$modexp' => 'data:application/magic-public-key,' . $salmon_key,
- '$bigkey' => salmon_key($r[0]['pubkey'])
+ '$bigkey' => salmon_key($r[0]['pubkey']),
));