diff options
author | friendica <info@friendica.com> | 2013-01-23 16:06:01 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-23 16:06:01 -0800 |
commit | f63997f61877bf03b9c85cbfaa00b8300c8cb770 (patch) | |
tree | a6757907fbf13668e7e7d92cd66c241bd882c964 /include | |
parent | 0b18dd15c5377da121f0fb781c0530ca0d328eb9 (diff) | |
download | volse-hubzilla-f63997f61877bf03b9c85cbfaa00b8300c8cb770.tar.gz volse-hubzilla-f63997f61877bf03b9c85cbfaa00b8300c8cb770.tar.bz2 volse-hubzilla-f63997f61877bf03b9c85cbfaa00b8300c8cb770.zip |
plug potential hole in magic auth, add link to chanview to view in dedicated window
Diffstat (limited to 'include')
-rw-r--r-- | include/Contact.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/Contact.php b/include/Contact.php index 14332c417..a2303803c 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -1,7 +1,7 @@ <?php -function vcard_from_xchan($xchan) { +function vcard_from_xchan($xchan, $observer = null, $mode = '') { $connect = false; if(local_user()) { @@ -12,12 +12,20 @@ function vcard_from_xchan($xchan) { if(! $r) $connect = t('Connect'); } - + + $url = (($observer) + ? z_root() . '/magic?f=&dest=' . $xchan['xchan_url'] . '&addr=' . $xchan['xchan_addr'] + : $xchan['xchan_url'] + ); + return replace_macros(get_markup_template('xchan_vcard.tpl'),array( '$name' => $xchan['xchan_name'], '$photo' => $xchan['xchan_photo_l'], '$follow' => $xchan['xchan_addr'], - '$connect' => $connect + '$connect' => $connect, + '$newwin' => (($mode === 'chanview') ? t('New window') : ''), + '$newtit' => t('Open the selected location in a different window or browser tab'), + '$url' => $url, )); } |