X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fother_functions.php;h=1bf81d868bbf7daa1f90363f03a70c9f18296e62;hb=fb41c3ccea45514b948ee7c482a25670e345be9d;hp=ae30baba48187eb69b0910a9a37f734237b05339;hpb=cf3765c38cf0a76f396aca291f71858936e92956;p=mailer.git diff --git a/inc/libs/other_functions.php b/inc/libs/other_functions.php index ae30baba48..1bf81d868b 100644 --- a/inc/libs/other_functions.php +++ b/inc/libs/other_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 * @@ -52,23 +50,114 @@ function displayDebugSqls () { $content['timing'] = translateComma($content['timing'] * 1000); // Load row template - $OUT .= loadTemplate('admin_other_sqls_row', true, $content); + $OUT .= loadTemplate('admin_other_sqls_row', TRUE, $content); // Count one up $i++; } // END - foreach // Load main template - $GLOBALS['page_footer'] .= loadTemplate('admin_other_sqls', true, $OUT); + $GLOBALS['__page_footer'] .= loadTemplate('admin_other_sqls', TRUE, $OUT); } -// Filter for debugging SQLs -function FILTER_DISPLAY_DEBUG_SQL () { - // Shall we display SQL queries? - if ((isAdmin()) && (isExtensionInstalledAndNewer('other', '0.2.2')) && (getConfig('display_debug_sqls') == 'Y') && (!isGetRequestParameterSet('frame')) && ($GLOBALS['header_sent'] == 2)) { - // Then display it here - displayDebugSqls(); +//----------------------------------------------------------------------------- +// Wrapper functions for configuration entries +//----------------------------------------------------------------------------- + +// Getter for 'reject_url' config entry +function getRejectUrl () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('reject_url'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for max_send +function getMaxSend () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('max_send'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for 'check_double_email' +function getCheckDoubleEmail () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = getConfig('check_double_email'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + +// Checks whether 'check_double_email' is 'Y' +function isCheckDoubleEmailEnabled () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = (getCheckDoubleEmail() == 'Y'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for activate_xchange +function getActivateXchange () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('activate_xchange'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for admin_notify +function getAdminNotify () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('admin_notify'); } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for display_debug_sqls +function getDisplayDebugSqls () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('display_debug_sqls'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for min_age +function getMinAge () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('min_age'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; } // [EOF]