]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-mydata.php
Used EL code {%template,LoadTemplate=foo%} instead of loadTemplate('foo', TRUE);
[mailer.git] / inc / modules / member / what-mydata.php
index d2644c773c77c9953652a036fcdfb538d1822671..6f61788d35d3bc97d76a4c478942edcb2237639c 100644 (file)
@@ -79,12 +79,10 @@ switch ($mode) {
                        $content['change'] = loadTemplate('member_mydata_button', TRUE);
                }
 
-               $content['birth_day']   = padLeftZero($content['birth_day']);
-               $content['birth_month'] = padLeftZero($content['birth_month']);
-
+               // @TODO Move this to a function (for better EL code)
                switch (getLanguage()) {
-                       case 'de': $content['dob'] = $content['birth_day']   . '.' . $content['birth_month'] . '.' . $content['birth_year']; break;
-                       default  : $content['dob'] = $content['birth_month'] . '-' . $content['birth_day']   . '-' . $content['birth_year']; break;
+                       case 'de': $content['dob'] = '{%pipe,padLeftZero=' . $content['birth_day']   . '%}.{%pipe,padLeftZero=' . $content['birth_month'] . '%}.' . $content['birth_year']; break;
+                       default  : $content['dob'] = '{%pipe,padLeftZero=' . $content['birth_month'] . '%}-{%pipe,padLeftZero=' . $content['birth_day']   . '%}-' . $content['birth_year']; break;
                } // END - switch
 
                if (isExtensionActive('country')) {