X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fprimera_functions.php;h=9653804725c7f3974fe841c996fb734a50fad79d;hb=d4cff9c73632a8d93428a80dcf54b3a8daa80a24;hp=54c5929a051c2ef155d76962ffc8aedb468f4b1a;hpb=82ba828dcdb063ea3292fad79008469d6423d223;p=mailer.git diff --git a/inc/libs/primera_functions.php b/inc/libs/primera_functions.php index 54c5929a05..9653804725 100644 --- a/inc/libs/primera_functions.php +++ b/inc/libs/primera_functions.php @@ -55,6 +55,7 @@ * @version 1.0 - beta * @copyright (c) 2007 by Primusportal.de * @copyright (c) 2008 by Roland Haeder + * @copyright 2009, 2010 by Mailer Developer Team */ class PrimeraApi { /** @@ -108,7 +109,7 @@ class PrimeraApi { var $host = "http://www.primusportal.de"; var $path = "/transfer.interface.2.0.php"; - var $errno = 0; + var $errno = '0'; var $err = ''; var $seperator = ':'; @@ -236,7 +237,7 @@ class PrimeraApi { // is not false the API data is valid, else invalid function testPrimeraApi () { // Get new instance - $api = new PrimeraApi(postRequestElement('primera_api_name'), postRequestElement('primera_api_md5')); + $api = new PrimeraApi(postRequestParameter('primera_api_name'), postRequestParameter('primera_api_md5')); // Was that fine? return ($api->getPrimera() !== false); @@ -257,7 +258,7 @@ function executePrimeraWithdraw ($primusNick, $userMd5, $amount) { $api = new PrimeraApi($primusNick, $userMd5); // Prepare purpose - eval("\$purpose = \"".compileRawCode(sprintf(getMessage('PRIMERA_API_PURPOSE_WITHDRAW'), getSession('sponsorid')))."\";"); + eval('$purpose = "' . doFinalCompilation(getMaskedMessage('PRIMERA_API_PURPOSE_WITHDRAW', getSession('sponsorid')), true) . '";'); // Pay the Primera return $api->payPrimera($primusNick, $amount, $purpose); @@ -269,7 +270,7 @@ function executePrimeraPayout ($primusNick, $userMd5, $amount) { $api = new PrimeraApi(getConfig('primera_api_name'), getConfig('primera_api_md5')); // Prepare purpose - eval("\$purpose = \"".compileRawCode(sprintf(getMessage('PRIMERA_API_PURPOSE_PAYOUT'), getUserId()))."\";"); + eval('$purpose = "' . doFinalCompilation(getMaskedMessage('PRIMERA_API_PURPOSE_PAYOUT', getMemberId()), true) . '";'); // Pay the Primera return $api->payPrimera($primusNick, $amount, $purpose);