1
0
Fork 0

remove dashes from variable names in profile_vcard.tpl

This commit is contained in:
friendica 2012-12-26 13:20:18 -08:00
parent f519b90737
commit 792b4f63e7
3 changed files with 10 additions and 5 deletions

View file

@ -1345,12 +1345,17 @@ if(! function_exists('profile_sidebar')) {
$tpl = get_markup_template('profile_vcard.tpl');
$p = array();
foreach($profile as $k => $v) {
$k = str_replace('-','_',$k);
$p[$k] = $v;
}
if($a->theme['template_engine'] === 'internal')
$location = template_escape($location);
$o .= replace_macros($tpl, array(
'$profile' => $profile,
'$profile' => $p,
'$connect' => $connect,
'$wallmessage' => $wallmessage,
'$location' => $location,

View file

@ -16,9 +16,9 @@
<span class="city-state-zip">
<span class="locality">$profile.locality</span>{{ if $profile.locality }}, {{ endif }}
<span class="region">$profile.region</span>
<span class="postal-code">$profile.postal-code</span>
<span class="postal-code">$profile.postal_code</span>
</span>
{{ if $profile.country-name }}<span class="country-name">$profile.country-name</span>{{ endif }}
{{ if $profile.country_name }}<span class="country-name">$profile.country_name</span>{{ endif }}
</dd>
</dl>
{{ endif }}

View file

@ -16,9 +16,9 @@
<span class="city-state-zip">
<span class="locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}}
<span class="region">{{$profile.region}}</span>
<span class="postal-code">{{$profile.postal-code}}</span>
<span class="postal-code">{{$profile.postal_code}}</span>
</span>
{{if $profile.country-name}}<span class="country-name">{{$profile.country-name}}</span>{{/if}}
{{if $profile.country_name}}<span class="country-name">{{$profile.country_name}}</span>{{/if}}
</dd>
</dl>
{{/if}}