X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fprofile_functions.php;h=2dddd9fa592ad1b40c19979ceea3d16f0d06e10d;hp=7a3664c68e6a627f0d1c72f76d5f79d2a5ba8088;hb=cd7d344ea7007cfa20413acd3e03e50f0ab86d86;hpb=63f159414369b5ea19a8ca75d8cd8033c45d8341 diff --git a/inc/libs/profile_functions.php b/inc/libs/profile_functions.php index 7a3664c68e..2dddd9fa59 100644 --- a/inc/libs/profile_functions.php +++ b/inc/libs/profile_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { // 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__]; } +// 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