X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Flibs%2Ftransfer_functions.php;h=14888c79008056d3fae4d64b01909f5086fe2720;hb=8fad776382e63b3f73f8dbe289f229d79cfc2c22;hp=ee6946ae326a4743ced92e34eacd1ea78d6d7711;hpb=29385a0483bbcbbe940a32a49d488b1d5add15c5;p=mailer.git diff --git a/inc/libs/transfer_functions.php b/inc/libs/transfer_functions.php index ee6946ae32..14888c7900 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 - 2012 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; @@ -78,9 +76,25 @@ function autoPurgeTransfers ($max, $age) { // Only send email to admin(s) when we have removed entries if ($removed > 0) { - sendAdminNotification('{--TRANSFER_ADMIN_AUTOPURGE--}', 'admin_transfer_ap', $removed); + sendAdminNotification('{--ADMIN_TRANSFER_AUTOPURGE_SUBJECT--}', 'admin_transfer_ap', $removed); } // 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] ?>