]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/profile_functions.php
Updated copyright notice as there are changes in this year
[mailer.git] / inc / libs / profile_functions.php
index 9a62fb61f434f2bc0e1d7d103a44fdc519e99023..2dddd9fa592ad1b40c19979ceea3d16f0d06e10d 100644 (file)
  * $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 - 2013 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 *
@@ -42,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');
@@ -60,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');
@@ -70,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