From: Roland Häder Date: Sat, 11 Oct 2008 15:16:33 +0000 (+0000) Subject: Some fixes for refid X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fa023dc278004309851a3fd107344216a520db64;p=mailer.git Some fixes for refid --- diff --git a/doubler.php b/doubler.php index db9ebf7a39..26dd0545c6 100644 --- a/doubler.php +++ b/doubler.php @@ -57,7 +57,7 @@ if (!EXT_IS_ACTIVE("doubler")) { // Is the script installed? if (isBooleanConstantAndTrue('mxchange_installed')) { // Probe for referal ID - if (!empty($_GET['refid'])) $GLOBALS['refid'] = bigintval($_GET['refid']); + if (!empty($_GET['refid'])) $GLOBALS['refid'] = SQL_ESCAPE($_GET['refid']); // Probe for nickname extension and if a nickname was supplied by URL $probe_nickname = ((EXT_IS_ACTIVE("nickname")) && (("".round($GLOBALS['refid'])."") != $GLOBALS['refid'])); @@ -214,12 +214,9 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { if (!empty($uid)) { // Transfer userid/nickname to constant define('__REFID', $uid); - } elseif (!empty($GLOBALS['refid'])) { + } else { // Transfer userid/nickname to constant define('__REFID', $GLOBALS['refid']); - } else { - // Transfer default refid to constant - define('__REFID', $_CONFIG['def_refid']); } // Percent values etc. diff --git a/inc/databases.php b/inc/databases.php index e502b6c81f..30883a76bb 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -113,7 +113,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "488"); +define('CURR_SVN_REVISION', "490"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/language/order_de.php b/inc/language/order_de.php index be9999d3a6..158b146cd9 100644 --- a/inc/language/order_de.php +++ b/inc/language/order_de.php @@ -76,7 +76,7 @@ define('MEMBER_AUTOSEND_ACTIVE', "Der Auto-Versand ist in unserem {!MT_WORD!} de define('ADMIN_CFG_REPAY_POINTS_REPAY', "Dem Mitglied gutschreiben"); define('ADMIN_CFG_REPAY_POINTS_JACKPOT', "In den Jackpot legen"); define('ADMIN_CFG_REPAY_POINTS_SHRED', "Nicht gutschreiben (verfällt dann)"); -define('ADMIN_REPAY_ON_DELETE_MODE', "Wie sollen {!POINTS!} von gelöschten Mails verbucht werden?"); +define('ADMIN_REPAY_ON_DELETE_MODE', "Wie sollen {!POINTS!} von gelöschten Mails verbucht werden?"); // ?> diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index 873ca6750b..c21e1275c5 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -74,6 +74,9 @@ if ($GLOBALS['refid'] > 0) { // Test if the refid is valid $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__); + + // Userid found? + //* DEBUG: */ die("refid={$GLOBALS['refid']}/numRows=".SQL_NUMROWS($result).""); if (SQL_NUMROWS($result) == 0) { // Not found so we set your refid! $_POST['refid'] = $_CONFIG['def_refid']; @@ -88,28 +91,24 @@ if (isset($_POST['ok'])) { // First we only check the submitted data then we continue... :) // // Did he agree to our Terms Of Usage? - if ($_POST['agree'] != "Y") - { + if ($_POST['agree'] != "Y") { $_POST['agree'] = "!"; $FAILED = true; } // Did he enter a valid email address? (we really don't care about // that, he has to click on a confirmation link :P ) - if ((empty($_POST['addy'])) || (!VALIDATE_EMAIL($_POST['addy']))) - { + if ((empty($_POST['addy'])) || (!VALIDATE_EMAIL($_POST['addy']))) { $_POST['addy'] = "!"; $FAILED = true; } // And what about surname and family's name? - if (empty($_POST['surname'])) - { + if (empty($_POST['surname'])) { $_POST['surname'] = "!"; $FAILED = true; } - if (empty($_POST['family_name'])) - { + if (empty($_POST['family_name'])) { $_POST['family_name'] = "!"; $FAILED = true; }