JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
s/e-mail/email/ (the way of the future man)
[wfpl.git] / format.php
index 13d79ce..e34f4b3 100644 (file)
@@ -21,7 +21,7 @@
 function format_caption($str) {
        $str = str_replace('_', ' ', $str);
        $str = ucwords($str);
-       return str_replace('Email', 'E-mail', $str);
+       return $str;
 }
 
 # This function makes sure that $str is in the list of options, and returns "" otherwise
@@ -72,8 +72,8 @@ function _format_positive_decimal($str) {
 
 function format_positive_decimal($str) {
        $str = _format_positive_decimal($str);
-       if($str === '0.0') {
-               $str = '0';
+       if(substr($str, -2) === '.0') {
+               $str = substr($str, 0, -2);
        }
        return $str;
 }