aboutsummaryrefslogtreecommitdiffstats
path: root/mod/viewcontacts.php
diff options
context:
space:
mode:
authorChris Case <kahotep@bunda.dreamhost.com>2011-05-21 21:40:16 -0700
committerChris Case <kahotep@bunda.dreamhost.com>2011-05-21 21:40:16 -0700
commit4cff911939b263993eb41682ca558c975e2db01f (patch)
tree78f58e08d04413827744689d0f5df7660bee6caa /mod/viewcontacts.php
parent2cf696d0b5d647e1741d2f94ee379aa19b25ae1b (diff)
parentf3f063c0dd7fd8b706987b856d79c7b58924acbb (diff)
downloadvolse-hubzilla-4cff911939b263993eb41682ca558c975e2db01f.tar.gz
volse-hubzilla-4cff911939b263993eb41682ca558c975e2db01f.tar.bz2
volse-hubzilla-4cff911939b263993eb41682ca558c975e2db01f.zip
merged multipart email changes
Diffstat (limited to 'mod/viewcontacts.php')
-rw-r--r--mod/viewcontacts.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php
index 90ff85b9d..732607b18 100644
--- a/mod/viewcontacts.php
+++ b/mod/viewcontacts.php
@@ -2,13 +2,21 @@
function viewcontacts_init(&$a) {
- profile_load($a,$a->argv[1]);
+ if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
+ return;
+ }
+ profile_load($a,$a->argv[1]);
}
function viewcontacts_content(&$a) {
+ if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
+ notice( t('Public access denied.') . EOL);
+ return;
+ }
+
if(((! count($a->profile)) || ($a->profile['hide-friends']))) {
notice( t('Permission denied.') . EOL);
return;
@@ -33,7 +41,7 @@ function viewcontacts_content(&$a) {
return $o;
}
- $tpl = load_view_file("view/viewcontact_template.tpl");
+ $tpl = get_markup_template("viewcontact_template.tpl");
foreach($r as $rr) {
if($rr['self'])
@@ -41,9 +49,10 @@ function viewcontacts_content(&$a) {
$o .= replace_macros($tpl, array(
'$id' => $rr['id'],
- '$alt_text' => t('Visit ') . $rr['name'] . t('\'s profile'),
+ '$alt_text' => t('Visit $username\'s profile'),
'$thumb' => $rr['thumb'],
'$name' => substr($rr['name'],0,20),
+ '$username' => $rr['name'],
'$url' => $rr['url']
));
}