X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fprofile_functions.php;h=05c2cbc3c6abd88e3072a1f678b2bc82c3154e66;hb=d1922ab361b5e104b7c14b28c76d1c47651635ef;hp=2eddb8110e0b78905063ad0bc89ef523578f008a;hpb=c8d76610eb94093d4eed4fcd8a6cb72e74c8f6d8;p=mailer.git diff --git a/inc/libs/profile_functions.php b/inc/libs/profile_functions.php index 2eddb8110e..05c2cbc3c6 100644 --- a/inc/libs/profile_functions.php +++ b/inc/libs/profile_functions.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * 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 - 2016 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 * @@ -40,13 +40,13 @@ if (!defined('__SECURITY')) { die(); } // END - if -// ---------------------------------------------------------------------------- +//----------------------------------------------------------------------------- // Wrapper functions -// ---------------------------------------------------------------------------- +//----------------------------------------------------------------------------- // Getter for profile_update function getProfileUpdate () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('profile_update'); @@ -58,7 +58,7 @@ function getProfileUpdate () { // Getter for resend_profile_update function getResendProfileUpdate () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('resend_profile_update'); @@ -68,12 +68,24 @@ function getResendProfileUpdate () { return $GLOBALS[__FUNCTION__]; } -// Determines wether sending profile update notification is enabled +// Getter for send_profile_update +function getSendProfileUpdate () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('send_profile_update'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Determines whether sending profile update notification is enabled function isSendProfileUpdateEnabled() { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it - $GLOBALS[__FUNCTION__] = (getConfig('send_prof_update') == 'Y'); + $GLOBALS[__FUNCTION__] = ((isExtensionInstalledAndNewer('profile', '0.1.0')) && (getSendProfileUpdate() == 'Y')); } // END - if // Return cache