]> git.mxchange.org Git - mailer.git/commitdiff
Introduced makeNullToZero()
authorRoland Häder <roland@mxchange.org>
Tue, 12 Jul 2011 21:21:36 +0000 (21:21 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 12 Jul 2011 21:21:36 +0000 (21:21 +0000)
inc/functions.php
inc/language/de.php
templates/de/html/member/member_points_row.tpl

index 93c08ad2e5b4c1389dc79d130bc4ca2431b4cd21..eac1fc7359735549886fab3d95cfea5e1f263bcb 100644 (file)
@@ -2151,7 +2151,7 @@ function handleFieldWithBraces ($field) {
        return $field;
 }
 
-// Converts a userid so it can be used in SQL queries
+// Converts a zero or NULL to word 'NULL'
 function makeZeroToNull ($number) {
        // Is it a valid username?
        if ((!is_null($number)) && ($number > 0)) {
@@ -2166,6 +2166,18 @@ function makeZeroToNull ($number) {
        return $number;
 }
 
+// Converts NULL into number zero
+function makeNullToZero ($number) {
+       // Is this a NULL?
+       if ((is_null($number)) || (empty($number))) {
+               // Simply set it
+               $number = '0';
+       } // END - if
+
+       // Return it
+       return $number;
+}
+
 // Capitalizes a string with underscores, e.g.: some_foo_string will become SomeFooString
 // Note: This function is cached
 function capitalizeUnderscoreString ($str) {
index d82729f717129bf5f0babc5fe5df3f583a1aaa26..34d638cffbb442f75da757620d369d98b694d6b3 100644 (file)
@@ -213,7 +213,7 @@ addMessages(array(
        'ADMIN_EDIT_REFERAL_DEPTHS' => "Referal-Ebenen editieren / l&ouml;schen / hinzuf&uuml;gen",
        'ADMIN_ADD_NEW_REFERAL_DEPTH_TITLE' => "Neue Referal-Ebene hinzuf&uuml;gen",
        'ADMIN_ADD_DEPTH' => "Referal-Ebene hinzuf&uuml;gen",
-       'ADMIN_ENTER_REFERAL_LEVEL' => "Referal-Ebene",
+       'ADMIN_ENTER_REFERAL_LEVEL' => "Referal-Ebene eingeben",
        'ADMIN_ENTER_REFERAL_PERCENTS' => "Prozentuale Verg&uuml;tung",
        'ADMIN_EDIT_DELETE_REFERAL_DEPTH_TITLE' => "Referal-Ebenen editieren / l&ouml;schen",
        'REFERAL_LEVEL' => "Referal-Ebene",
index 80c23bcc66a9a6e511dfd6d242cb874d7de6033b..096294e8b84f26f789705495a8da1a1340c849e6 100644 (file)
@@ -1,5 +1,5 @@
 <tr>
-       <td class="member_data">$content[level]. {--REFERAL_LEVEL--} ({%pipe,translateComma=$content[percents]%}&#37;)</td>
+       <td class="member_data">{%pipe,makeNullToZero=$content[level]%}. {--REFERAL_LEVEL--} ({%pipe,translateComma=$content[percents]%}&#37;)</td>
        <td class="member_data">{%pipe,translateComma=$content[points]%} {?POINTS?}</td>
        <td class="member_data">{%pipe,translateComma=$content[order_points]%} {?POINTS?}</td>
        <td class="member_data" align="center">{%pipe,translateComma=$content[counter]%}</td>