X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=doubler.php;h=e8a088bc8cefdef9885e7ab482571898e9d1dcf1;hp=214641567f67f94afa68f2ce3e51f95e1fe5a435;hb=148d3a3e1641e350a708cc71e194349a09a8285f;hpb=60494e212a67fe360bfbb481eb4928480a6f379b diff --git a/doubler.php b/doubler.php index 214641567f..e8a088bc8c 100644 --- a/doubler.php +++ b/doubler.php @@ -48,7 +48,7 @@ $CSS = "0"; require ("inc/config.php"); // Is the script installed? -if (defined('mxchange_installed') && (mxchange_installed)) +if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) { // Probe for referral ID if (!empty($_GET['refid'])) $GLOBALS['refid'] = bigintval($_GET['refid']); @@ -146,14 +146,14 @@ if (defined('mxchange_installed') && (mxchange_installed)) // Add points to "total payed" including charge $points = $_POST['points'] - $_POST['points'] * $_CONFIG['doubler_charge']; - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET doubler_points=doubler_points+%s WHERE config='0' LIMIT 1", + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET doubler_points=doubler_points+%s WHERE config=0 LIMIT 1", array($points), __FILE__, __LINE__); $_CONFIG['doubler_points'] += $points; // Destroy cache if (GET_EXT_VERSION("cache") >= "0.1.2") { - if ($CACHE->cache_file("config", true)) $CACHE->cache_destroy(); + if ($cacheInstance->cache_file("config", true)) $cacheInstance->cache_destroy(); } // Add second line for the referral but only when uid != refid @@ -167,7 +167,7 @@ if (defined('mxchange_installed') && (mxchange_installed)) } // Update usage counter - $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET doubler_counter=doubler_counter+1 WHERE config='0' LIMIT 1", __FILE__, __LINE__); + $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET doubler_counter=doubler_counter+1 WHERE config=0 LIMIT 1", __FILE__, __LINE__); $_CONFIG['doubler_counter']++; // Set constant