From 792b4f63e7a95dcb9017ceed03a5f27980c3286c Mon Sep 17 00:00:00 2001
From: friendica <info@friendica.com>
Date: Wed, 26 Dec 2012 13:20:18 -0800
Subject: [PATCH] remove dashes from variable names in profile_vcard.tpl

---
 boot.php                       | 7 ++++++-
 view/profile_vcard.tpl         | 4 ++--
 view/smarty3/profile_vcard.tpl | 4 ++--
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/boot.php b/boot.php
index 77be9ac261..1d43008896 100644
--- a/boot.php
+++ b/boot.php
@@ -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,
diff --git a/view/profile_vcard.tpl b/view/profile_vcard.tpl
index d1e6847951..6e137f28fa 100644
--- a/view/profile_vcard.tpl
+++ b/view/profile_vcard.tpl
@@ -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 }}
diff --git a/view/smarty3/profile_vcard.tpl b/view/smarty3/profile_vcard.tpl
index 86f25fe057..4e3b1f366e 100644
--- a/view/smarty3/profile_vcard.tpl
+++ b/view/smarty3/profile_vcard.tpl
@@ -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}}