X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcommon.php;h=1e65137ac693c74dcc125b1e9af213a70bcb2ac3;hb=2aad62190fd2c0d85e636d01b7e6607a2510906b;hp=a4320f9eb9cf4f944b9ffdb69ba5698be2a2fb4c;hpb=b7784671219126412683a74080ce064fa826f82b;p=friendica.git diff --git a/mod/common.php b/mod/common.php index a4320f9eb9..1e65137ac6 100644 --- a/mod/common.php +++ b/mod/common.php @@ -16,7 +16,7 @@ function common_content(&$a) { if(! $uid) return; - if($cmd === 'loc' && $cid) { + if($cmd === 'loc' && $cid) { $c = q("select name, url, photo from contact where id = %d and uid = %d limit 1", intval($cid), intval($uid) @@ -26,22 +26,24 @@ function common_content(&$a) { $c = q("select name, url, photo from contact where self = 1 and uid = %d limit 1", intval($uid) ); - } + } $vcard_widget .= replace_macros(get_markup_template("vcard-widget.tpl"),array( - '$name' => $c[0]['name'], - '$photo' => $c[0]['photo'], - 'url' => z_root() . '/contacts/' . $cid - )); + '$name' => htmlentities($c[0]['name']), + '$photo' => $c[0]['photo'], + 'url' => z_root() . '/contacts/' . $cid + )); - if(! x($a->page,'aside')) - $a->page['aside'] = ''; - $a->page['aside'] .= $vcard_widget; + if(! x($a->page,'aside')) + $a->page['aside'] = ''; + $a->page['aside'] .= $vcard_widget; if(! count($c)) return; - $o .= '

' . t('Common Friends') . '

'; + $o .= replace_macros(get_markup_template("section_title.tpl"),array( + '$title' => t('Common Friends') + )); if(! $cid) { @@ -95,10 +97,10 @@ function common_content(&$a) { $tpl = get_markup_template('common_friends.tpl'); foreach($r as $rr) { - + $o .= replace_macros($tpl,array( '$url' => $rr['url'], - '$name' => $rr['name'], + '$name' => htmlentities($rr['name']), '$photo' => $rr['photo'], '$tags' => '' ));