From 936a7baf6967cd03d65a84acef3b9b4de8fcec6a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 29 Jul 2013 22:55:33 +0000 Subject: [PATCH] Added some wrappers to speed-up things --- inc/libs/wernis_functions.php | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index b7c369d21b..48f3677c9c 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -563,5 +563,53 @@ function getWernisWithdrawFeeFix () { return $GLOBALS[__FUNCTION__]; } +// Wrapper function for 'wernis_payout_fee_percent' +function getWernisPayoutFeePercent () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_payout_fee_percent'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_payout_fee_fix' +function getWernisPayoutFeeFix () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_payout_fee_fix'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_min_payout' +function getWernisMinPayout () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_min_payout'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_min_withdraw' +function getWernisMinWithdraw () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_min_withdraw'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // [EOF] ?> -- 2.30.2