New naming convention applied to many functions, see #118 for details
[mailer.git] / inc / modules / member / what-refback.php
index a9d8a4ab7c7b93ce6870a24b7cfefcd2de6816c6..3b2513acb4dcb6d7a9fe69f0c77a63ab0f94b96a 100644 (file)
@@ -42,7 +42,7 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        // User is not logged in
-       LOAD_URL('modules.php?module=index');
+       redirectToUrl('modules.php?module=index');
 } elseif ((!EXT_IS_ACTIVE('refback')) && (!IS_ADMIN())) {
        addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'refback'));
        return;
@@ -60,11 +60,11 @@ if (getConfig('refback_enabled') != 'Y') {
 ADD_DESCR('member', __FILE__);
 
 // Was the form submitted?
-if ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST(('id')))) {
+if ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST('id'))) {
        // Okay, has the user entered some values?
        if (REQUEST_ISSET_POST(('percents'))) {
                // Revert german commta for testing
-               $percents = REVERT_COMMA(REQUEST_POST('percents'));
+               $percents = convertCommaToDot(REQUEST_POST('percents'));
 
                // Validate percents
                if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == 0)) && ($percents <= getConfig('refback_max_perc'))) {
@@ -93,9 +93,9 @@ if ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST(('id')))) {
                $content = GET_USER_REF_ENTRY(REQUEST_POST('id'));
 
                // Translate comma
-               $content['refback'] = TRANSLATE_COMMA($content['refback']);
-               $content['min']     = TRANSLATE_COMMA(getConfig('refback_min_perc').".0");
-               $content['max']     = TRANSLATE_COMMA(getConfig('refback_max_perc').".0");
+               $content['refback'] = translateComma($content['refback']);
+               $content['min']     = translateComma(getConfig('refback_min_perc').".0");
+               $content['max']     = translateComma(getConfig('refback_max_perc').".0");
 
                // Load form for editing
                LOAD_TEMPLATE("member_refback_edit", false, $content);
@@ -127,9 +127,9 @@ if (SQL_NUMROWS($result) > 0) {
 
                        // Add/"translate" more content
                        $refRow['sw']      = $SW;
-                       $refRow['points']  = TRANSLATE_COMMA($refRow['points']);
-                       $refRow['refback'] = TRANSLATE_COMMA($refRow['refback']);
-                       $refRow['status']  = TRANSLATE_STATUS($refRow['status']);
+                       $refRow['points']  = translateComma($refRow['points']);
+                       $refRow['refback'] = translateComma($refRow['refback']);
+                       $refRow['status']  = translateUserStatus($refRow['status']);
                        if (empty($refRow['nickname'])) $refRow['nickname'] = '---';
 
                        // Load row template
@@ -145,8 +145,8 @@ if (SQL_NUMROWS($result) > 0) {
                } // END - foreach
 
                // Remember the content
-               $content['counter']  = TRANSLATE_COMMA($counter);
-               $content['percents'] = TRANSLATE_COMMA($content['percents']);
+               $content['counter']  = translateComma($counter);
+               $content['percents'] = translateComma($content['percents']);
                $content['rows']     = $rows;
 
                // Load level template