This wasn't the fix...
[mailer.git] / birthday_confirm.php
index 68738e58d9e540a1d07dc21cdc328b6a2f7c36d4..c228c94a1379db3b2e856fcc28758a19a141829f 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 10/03/2004 *
- * ===============                              Last change: 10/03/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 10/03/2004 *
+ * ===================                          Last change: 10/03/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : birthday_confirm.php                             *
@@ -56,10 +56,10 @@ setContentType('text/html');
 redirectOnUninstalledExtension('birthday');
 
 // Script is installed so let's check for his confirmation link...
-$userid = bigintval(getRequestElement('userid'));
+$userid = bigintval(getRequestParameter('userid'));
 
 // Only allow numbers here...
-$chk = bigintval(getRequestElement('check'), false);
+$chk = bigintval(getRequestParameter('check'), false);
 
 // Check if link is not clicked so far
 $result = SQL_QUERY_ESC("SELECT b.points, d.gender, d.surname, d.family, d.status, d.ref_payout
@@ -73,7 +73,7 @@ WHERE
        b.userid=%s AND b.chk_value='%s'
 LIMIT 1",
        array($userid, $chk), __FILE__, __LINE__);
-//* DEBUG: */ outputHtml("userid=".$userid.",chk=".$chk." (".strlen($chk).'/'.strlen(getRequestElement('check')).'/'.SQL_NUMROWS($result).")<br />");
+//* DEBUG: */ outputHtml("userid=".$userid.",chk=".$chk." (".strlen($chk).'/'.strlen(getRequestParameter('check')).'/'.SQL_NUMROWS($result).")<br />");
 
 // Prepare content
 $content = array();
@@ -92,7 +92,7 @@ if (SQL_NUMROWS($result) == 1) {
                // Add points to account
                // @TODO Try to rewrite the following unset()
                unset($GLOBALS['ref_level']);
-               addPointsThroughReferalSystem('birthday_confirm', $userid, $data['points'], false, '0', $locked, strtolower(getConfig('birthday_mode')));
+               addPointsThroughReferalSystem('birthday_confirm', $userid, $data['points'], false, 0, $locked, strtolower(getConfig('birthday_mode')));
 
                // Remove entry from table
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_birthday` WHERE `userid`=%s AND `chk_value`='%s' LIMIT 1",
@@ -106,7 +106,7 @@ if (SQL_NUMROWS($result) == 1) {
                $content['message'] = loadTemplate('birthday_msg', true, $data);
        } else {
                // Unconfirmed / locked accounts cannot get points
-               $content['message'] = sprintf(getMessage('BIRTHDAY_CANNOT_STATUS'), translateUserStatus($data['status']));
+               $content['message'] = getMaskedMessage('BIRTHDAY_CANNOT_STATUS', translateUserStatus($data['status']));
        }
 } else {
        // Cannot load data!