fix directory location

This commit is contained in:
Mario Vavti 2015-06-29 14:25:04 +02:00
parent 090dae46e5
commit 7ef4397634
2 changed files with 3 additions and 4 deletions

View File

@ -210,7 +210,7 @@ function directory_content(&$a) {
$location .= $rr['region']; $location .= $rr['region'];
} }
if(strlen($rr['country'])) { if(strlen($rr['country'])) {
if(strlen($details)) if(strlen($location))
$location .= ', '; $location .= ', ';
$location .= $rr['country']; $location .= $rr['country'];
} }
@ -286,7 +286,6 @@ function directory_content(&$a) {
'hash' => $rr['hash'], 'hash' => $rr['hash'],
'alttext' => $rr['name'] . ((local_channel() || remote_channel()) ? ' ' . $rr['address'] : ''), 'alttext' => $rr['name'] . ((local_channel() || remote_channel()) ? ' ' . $rr['address'] : ''),
'name' => $rr['name'], 'name' => $rr['name'],
'details' => $details,
'age' => $age, 'age' => $age,
'age_label' => t('Age:'), 'age_label' => t('Age:'),
'profile' => $profile, 'profile' => $profile,

View File

@ -41,9 +41,9 @@
</div> </div>
{{/if}} {{/if}}
{{if $entry.details}} {{if $entry.location}}
<div class="contact-info-element"> <div class="contact-info-element">
<span class="contact-info-label">{{$entry.location}}</span> {{$entry.details}} <span class="contact-info-label">{{$entry.location_label}}</span> {{$entry.location}}
</div> </div>
{{/if}} {{/if}}