]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/sponsor_functions.php
Added update_year.sh (still not fully flexible) and updated all years with it.
[mailer.git] / inc / libs / sponsor_functions.php
index fc12052eea581f4fe8e0e8043e8ada74653a55a0..3de5472e7e07d6376be033ff00376408a0d100be 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -341,7 +341,7 @@ function addSponsorContent ($what) {
        $GLOBALS['sponsor_output'] = '';
 
        // Generate IFN (Include FileName)
-       $INC = sprintf("inc/modules/sponsor/%s.php", $what);
+       $INC = sprintf('inc/modules/sponsor/%s.php', $what);
        if (isIncludeReadable($INC)) {
                // Every sponsor action will output nothing directly. It will be written into $GLOBALS['sponsor_output']!
                loadIncludeOnce($INC);
@@ -635,7 +635,7 @@ function doExpressionSponsor ($data) {
                        // Sponsor data found
                        $functionName = "getFetchedSponsorData('id', " . $data['matches'][4][$data['key']] . ", '" . $data['callback'] . "')";
                }
-       } elseif ((!empty($data['callback'])) && (isSponsorDataValid())) {
+       } elseif ((!empty($data['callback'])) && (isValidSponsorData())) {
                // "Call-back" alias column for current logged in sponsor's data
                $functionName = "getSponsorData('" . $data['callback'] . "')";
        }
@@ -670,11 +670,11 @@ function fetchSponsorData ($sponsor_id, $column = 'id') {
                if (!isValidId($sponsor_id)) {
                        // Invalid, so abort here
                        reportBug(__FUNCTION__, __LINE__, 'Sponsor id ' . $sponsor_id . ' is invalid.');
-               } elseif (isSponsorDataValid()) {
+               } elseif (isValidSponsorData()) {
                        // Use cache, so it is fine
                        return TRUE;
                }
-       } elseif (isSponsorDataValid()) {
+       } elseif (isValidSponsorData()) {
                // Use cache, so it is fine
                return TRUE;
        }
@@ -726,7 +726,7 @@ function fetchSponsorData ($sponsor_id, $column = 'id') {
                } // END - if
 
                // Found, but valid?
-               $found = isSponsorDataValid();
+               $found = isValidSponsorData();
        } // END - if
 
        // Free memory
@@ -739,7 +739,7 @@ function fetchSponsorData ($sponsor_id, $column = 'id') {
 // Wrapper for fetchSponsorData() and getSponsorData() calls
 function getFetchedSponsorData ($keyColumn, $sponsor_id, $valueColumn) {
        // Zero ids are not valid
-       if ($sponsor_id == 0) {
+       if (!isValidId($sponsor_id)) {
                // Abort here
                reportBug(__FUNCTION__, __LINE__, 'Zero sponsor_id provided');
        } // END - if
@@ -766,7 +766,7 @@ function getFetchedSponsorData ($keyColumn, $sponsor_id, $valueColumn) {
 
 // Checks if the sponsor data is valid, this may indicate that the sponsor has logged
 // in, but you should use isMember() if you want to find that out.
-function isSponsorDataValid () {
+function isValidSponsorData () {
        // Sponsor id should not be zero so abort here
        if (!isCurrentSponsorIdSet()) return FALSE;