aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-10-08 15:30:06 -0700
committerzotlabs <mike@macgirvin.com>2016-10-08 15:30:06 -0700
commit134b9fc466ff529274cd81c95365919d506dfe1c (patch)
tree613fb0fe6f8a9deaafce9c651787aa1d0f2607dc
parent10863a5949cc59771424cb809af5c9f279f78a58 (diff)
downloadvolse-hubzilla-134b9fc466ff529274cd81c95365919d506dfe1c.tar.gz
volse-hubzilla-134b9fc466ff529274cd81c95365919d506dfe1c.tar.bz2
volse-hubzilla-134b9fc466ff529274cd81c95365919d506dfe1c.zip
don't show diaspora protocol info in the hcard if the diaspora protocol is not installed. This really needs to be moved to the plugin but this was a quick fix.
-rw-r--r--include/channel.php35
-rwxr-xr-xview/tpl/profile_vcard.tpl1
2 files changed, 22 insertions, 14 deletions
diff --git a/include/channel.php b/include/channel.php
index c86cea6f1..189748d09 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1066,19 +1066,26 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $zcard = fa
? trim(substr($profile['channel_name'],0,strpos($profile['channel_name'],' '))) : $profile['channel_name']);
$lastname = (($firstname === $profile['channel_name']) ? '' : trim(substr($profile['channel_name'],strlen($firstname))));
- $diaspora = array(
- 'podloc' => z_root(),
- 'guid' => $profile['channel_guid'] . str_replace('.','',App::get_hostname()),
- 'pubkey' => pemtorsa($profile['channel_pubkey']),
- 'searchable' => (($block) ? 'false' : 'true'),
- 'nickname' => $profile['channel_address'],
- 'fullname' => $profile['channel_name'],
- 'firstname' => $firstname,
- 'lastname' => $lastname,
- 'photo300' => z_root() . '/photo/profile/300/' . $profile['uid'] . '.jpg',
- 'photo100' => z_root() . '/photo/profile/100/' . $profile['uid'] . '.jpg',
- 'photo50' => z_root() . '/photo/profile/50/' . $profile['uid'] . '.jpg',
- );
+ // @fixme move this to the diaspora plugin itself
+
+ if(plugin_is_installed('diaspora')) {
+ $diaspora = array(
+ 'podloc' => z_root(),
+ 'guid' => $profile['channel_guid'] . str_replace('.','',App::get_hostname()),
+ 'pubkey' => pemtorsa($profile['channel_pubkey']),
+ 'searchable' => (($block) ? 'false' : 'true'),
+ 'nickname' => $profile['channel_address'],
+ 'fullname' => $profile['channel_name'],
+ 'firstname' => $firstname,
+ 'lastname' => $lastname,
+ 'photo300' => z_root() . '/photo/profile/300/' . $profile['uid'] . '.jpg',
+ 'photo100' => z_root() . '/photo/profile/100/' . $profile['uid'] . '.jpg',
+ 'photo50' => z_root() . '/photo/profile/50/' . $profile['uid'] . '.jpg',
+ );
+ }
+ else
+ $diaspora = '';
+
$contact_block = contact_block();
@@ -1124,7 +1131,7 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $zcard = fa
'$editmenu' => profile_edit_menu($profile['uid'])
));
- $arr = array('profile' => &$profile, 'entry' => &$o);
+ $arr = array('profile' => $profile, 'entry' => $o);
call_hooks('profile_sidebar', $arr);
diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl
index 5e9d192a1..9bd534fd8 100755
--- a/view/tpl/profile_vcard.tpl
+++ b/view/tpl/profile_vcard.tpl
@@ -52,6 +52,7 @@
{{if $diaspora}}
{{include file="diaspora_vcard.tpl"}}
{{/if}}
+
</div>
<div id="clear"></div>