From 06a4b0dc5e12bf8ecec18958d5a08c7c405d5aa5 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 1 Dec 2015 18:21:05 +0100 Subject: [PATCH] Header removed in the contact area --- mod/allfriends.php | 2 +- mod/common.php | 6 ++++-- mod/contacts.php | 10 +++++----- mod/crepair.php | 2 +- view/templates/contact_edit.tpl | 2 +- view/templates/section_title.tpl | 2 +- view/templates/viewcontact_template.tpl | 2 +- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/mod/allfriends.php b/mod/allfriends.php index 3e825c0060..49879c7a03 100644 --- a/mod/allfriends.php +++ b/mod/allfriends.php @@ -84,7 +84,7 @@ function allfriends_content(&$a) { $tpl = get_markup_template('viewcontact_template.tpl'); $o .= replace_macros($tpl,array( - '$title' => sprintf( t('Friends of %s'), htmlentities($c[0]['name'])), + //'$title' => sprintf( t('Friends of %s'), htmlentities($c[0]['name'])), '$tab_str' => $tab_str, '$contacts' => $entries, )); diff --git a/mod/common.php b/mod/common.php index 66efaf62e0..7c12dd39bb 100644 --- a/mod/common.php +++ b/mod/common.php @@ -129,13 +129,15 @@ function common_content(&$a) { $entries[] = $entry; } - if($cmd === 'loc' && $cid && $uid == local_user()) + if($cmd === 'loc' && $cid && $uid == local_user()) { $tab_str = contacts_tab($a, $cid, 4); + } else + $title = t('Common Friends'); $tpl = get_markup_template('viewcontact_template.tpl'); $o .= replace_macros($tpl,array( - '$title' => t('Common Friends'), + '$title' => $title, '$tab_str' => $tab_str, '$contacts' => $entries, )); diff --git a/mod/contacts.php b/mod/contacts.php index 8e1fb6f67b..35ce753676 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -579,7 +579,7 @@ function contacts_content(&$a) { $o .= replace_macros($tpl, array( //'$header' => t('Contact Editor'), - '$header' => htmlentities($header), + //'$header' => htmlentities($header), '$tab_str' => $tab_str, '$submit' => t('Submit'), '$lbl_vis1' => t('Profile Visibility'), @@ -928,10 +928,10 @@ function contact_posts($a, $contact_id) { $header .= " (".network_to_name($contact['network'], $contact['url']).")"; - $tpl = get_markup_template("section_title.tpl"); - $o = replace_macros($tpl,array( - '$title' => htmlentities($header) - )); + //$tpl = get_markup_template("section_title.tpl"); + //$o = replace_macros($tpl,array( + // '$title' => htmlentities($header) + //)); $o .= $tab_str; diff --git a/mod/crepair.php b/mod/crepair.php index d927e36363..99a039b379 100644 --- a/mod/crepair.php +++ b/mod/crepair.php @@ -171,7 +171,7 @@ function crepair_content(&$a) { $tpl = get_markup_template('crepair.tpl'); $o .= replace_macros($tpl, array( //'$title' => t('Repair Contact Settings'), - '$title' => htmlentities($header), + //'$title' => htmlentities($header), '$tab_str' => $tab_str, '$warning' => $warning, '$info' => $info, diff --git a/view/templates/contact_edit.tpl b/view/templates/contact_edit.tpl index 0733c9e187..15863b6a27 100644 --- a/view/templates/contact_edit.tpl +++ b/view/templates/contact_edit.tpl @@ -1,4 +1,4 @@ -

{{$header}}

+{{if $header}}

{{$header}}

{{/if}}
diff --git a/view/templates/section_title.tpl b/view/templates/section_title.tpl index 8614fb883b..f17dcf7ad4 100644 --- a/view/templates/section_title.tpl +++ b/view/templates/section_title.tpl @@ -1,4 +1,4 @@
-

{{$title}}

+ {{if $title}}

{{$title}}

{{/if}}
diff --git a/view/templates/viewcontact_template.tpl b/view/templates/viewcontact_template.tpl index c4e2e643e6..3ea277a42b 100644 --- a/view/templates/viewcontact_template.tpl +++ b/view/templates/viewcontact_template.tpl @@ -8,7 +8,7 @@ {{include file="contact_template.tpl"}} {{/foreach}}
- +
{{$paginate}} -- 2.39.5