* $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 *
$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);
// 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'] . "')";
}
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;
}
} // END - if
// Found, but valid?
- $found = isSponsorDataValid();
+ $found = isValidSponsorData();
} // END - if
// Free memory
// 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
// 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;