]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/beg_functions.php
Do not rebuild cache if it is already rebuild
[mailer.git] / inc / libs / beg_functions.php
index f1f333ae439dba0c4904fcef52629b3c4dd45cbb..120333bf97b708e21424fa031f9b0ebe9c11ad94 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * 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 *
@@ -55,8 +55,8 @@ function addPointsBeg ($userid, $points) {
                $added = (!SQL_HASZEROAFFECTED());
        } else {
                // Add points to account
-               initReferalSystem();
-               $added = addPointsThroughReferalSystem('beg', $userid, $points);
+               initReferralSystem();
+               $added = addPointsThroughReferralSystem('beg', $userid, $points);
        }
 
        // Subtract begged points from member account if the admin has selected one
@@ -69,6 +69,25 @@ function addPointsBeg ($userid, $points) {
        return $added;
 }
 
+//-----------------------------------------------------------------------------
+//                            Template functions
+//-----------------------------------------------------------------------------
+
+// Outputs points which a member can get
+function doTemplateOutputBegPoints ($templateName, $clear = false) {
+       // Default is not the same
+       $return = '{--BEG_POINTS_MIN_MAX--}';
+
+       // Is min/max points the same?
+       if (getBegPoints() == getBegPointsMax()) {
+               // Is the same, output different message
+               $return = '{--BEG_POINTS_FIXED--}';
+       } // END - if
+
+       // Return message
+       return $return;
+}
+
 //-----------------------------------------------------------------------------
 //                       Wrapper functions for ext-beg
 //-----------------------------------------------------------------------------
@@ -85,7 +104,7 @@ function getBegNewMemberNotify () {
        return $GLOBALS[__FUNCTION__];
 }
 
-// Checks wether beg_new_member_notify is enabled
+// Checks whether beg_new_member_notify is enabled
 function isBegNewMemberNotifyEnabled () {
        // Do we have cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
@@ -229,7 +248,7 @@ function getBegIncludeOwn () {
        return $GLOBALS[__FUNCTION__];
 }
 
-// Checks wether beg_include_own is "Y"
+// Checks whether beg_include_own is "Y"
 function isBegIncludeOwnEnabled () {
        // Do we have cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
@@ -253,7 +272,7 @@ function getBegActive () {
        return $GLOBALS[__FUNCTION__];
 }
 
-// Checks wether beg_active is "Y"
+// Checks whether beg_active is "Y"
 function isBegActiveEnabled () {
        // Do we have cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
@@ -277,7 +296,7 @@ function getBegRallye () {
        return $GLOBALS[__FUNCTION__];
 }
 
-// Checks wether beg_rallye is "Y"
+// Checks whether beg_rallye is "Y"
 function isBegRallyeEnabled () {
        // Do we have cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
@@ -301,7 +320,7 @@ function getBegRallyeEnableNotify () {
        return $GLOBALS[__FUNCTION__];
 }
 
-// Checks wether beg_rallye_enable_notify is "Y"
+// Checks whether beg_rallye_enable_notify is "Y"
 function isBegRallyeEnableNotifyEnabled () {
        // Do we have cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
@@ -325,7 +344,7 @@ function getBegRallyeDisableNotify () {
        return $GLOBALS[__FUNCTION__];
 }
 
-// Checks wether beg_rallye_disable_notify is "Y"
+// Checks whether beg_rallye_disable_notify is "Y"
 function isBegRallyeDisableNotifyEnabled () {
        // Do we have cache?
        if (!isset($GLOBALS[__FUNCTION__])) {