X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Ftransfer_functions.php;h=8a0e490d5d423e56e9d4d64cffcd452f77d181dc;hp=ee6946ae326a4743ced92e34eacd1ea78d6d7711;hb=e3934352dffa6eb9da59a137ae1a9414e5b4d80b;hpb=29385a0483bbcbbe940a32a49d488b1d5add15c5 diff --git a/inc/libs/transfer_functions.php b/inc/libs/transfer_functions.php index ee6946ae32..8a0e490d5d 100644 --- a/inc/libs/transfer_functions.php +++ b/inc/libs/transfer_functions.php @@ -14,12 +14,10 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -45,7 +43,7 @@ if (!defined('__SECURITY')) { // Purge expired transfer entries function autoPurgeTransfers ($max, $age) { // First get total in-going lines - $result = SQL_QUERY("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_transfers_in` ORDER BY `id` ASC", __FUNCTION__, __LINE__); + $result = SQL_QUERY('SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_transfers_in` ORDER BY `id` ASC', __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) > $max) { // Update overdue transfers $remove = SQL_NUMROWS($result) - $max; @@ -56,7 +54,7 @@ function autoPurgeTransfers ($max, $age) { } // END - if // Second get total out-going lines - $result = SQL_QUERY("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_transfers_out` ORDER BY `id` ASC", __FUNCTION__, __LINE__); + $result = SQL_QUERY('SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_transfers_out` ORDER BY `id` ASC', __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) > $max) { // Update overdue transfers $remove = SQL_NUMROWS($result) - $max; @@ -82,5 +80,21 @@ function autoPurgeTransfers ($max, $age) { } // END - if } +//----------------------------------------------------------------------------- +// Wrapper functions +//----------------------------------------------------------------------------- + +// Wrapper function for transfer_code +function getTransferCode () { + // Is cache set? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('transfer_code'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // [EOF] ?>