Complete rewrite of and , wrapper functions added, see bug #101
[mailer.git] / inc / modules / member / what-refback.php
index e3c56d86d66bb8c298321eb37fd0a921b0175169..f78aba8b9bd31d3a6ce50f326f963474ecc15203 100644 (file)
@@ -55,16 +55,16 @@ if (getConfig('refback_enabled') != "Y") {
 ADD_DESCR("member", __FILE__);
 
 // Was the form submitted?
-if ((isset($_POST['edit'])) && (isset($_POST['id']))) {
+if ((REQUEST_ISSET_POST(('edit'))) && (REQUEST_ISSET_POST(('id')))) {
        // Okay, has the user entered some values?
-       if (isset($_POST['percents'])) {
+       if (REQUEST_ISSET_POST(('percents'))) {
                // Revert german commta for testing
-               $percents = REVERT_COMMA($_POST['percents']);
+               $percents = REVERT_COMMA(REQUEST_POST('percents'));
 
                // Validate percents
                if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == 0)) && ($percents <= getConfig('refback_max_perc'))) {
                        // Change ref-back for this direct id
-                       $status = REFBACK_CHANGE_MEMBER_PERCENTS($_POST['id'], $_POST['percents']);
+                       $status = REFBACK_CHANGE_MEMBER_PERCENTS(REQUEST_POST('id'), REQUEST_POST('percents'));
 
                        // Check status
                        if (isset($status['ok'])) {
@@ -85,7 +85,7 @@ if ((isset($_POST['edit'])) && (isset($_POST['id']))) {
                // Insert line
        } else {
                // Read data from refback table
-               $content = GET_USER_REF_ENTRY($_POST['id']);
+               $content = GET_USER_REF_ENTRY(REQUEST_POST('id'));
 
                // Translate comma
                $content['refback'] = TRANSLATE_COMMA($content['refback']);