X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fwrapper-functions.php;h=b42874ee8a035d540729ff09ce03c050585be84d;hb=07af932574589f4906be5ebf6733fdb95f30e9a2;hp=918ad0a93a039bb7686851c30d9cfb01d4951b89;hpb=2242e96edcd22361e94ed18d72f5667ab286f791;p=mailer.git diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 918ad0a93a..b42874ee8a 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -14,8 +14,6 @@ * $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 * @@ -807,7 +805,7 @@ function initUserData () { // User id should not be zero if (!isValidUserId(getCurrentUserId())) { // Should be always valid - debug_report_bug(__FUNCTION__, __LINE__, 'User id is zero.'); + debug_report_bug(__FUNCTION__, __LINE__, 'Current user id is invalid: ' . getCurrentUserId()); } // END - if // Init the user @@ -819,7 +817,7 @@ function getUserData ($column) { // User id should not be zero if (!isValidUserId(getCurrentUserId())) { // Should be always valid - debug_report_bug(__FUNCTION__, __LINE__, 'User id is zero.'); + debug_report_bug(__FUNCTION__, __LINE__, 'Current user id is invalid: ' . getCurrentUserId()); } // END - if // Return the value @@ -834,7 +832,7 @@ function getUserDataArray () { // Is the current userid valid? if (!isValidUserId($userid)) { // Should be always valid - debug_report_bug(__FUNCTION__, __LINE__, 'User id is invalid.'); + debug_report_bug(__FUNCTION__, __LINE__, 'Current user id is invalid: ' . $userid); } // END - if // Get the whole array if found @@ -1495,11 +1493,11 @@ function getTitle () { } // "Getter" for curr_svn_revision -function getCurrSvnRevision () { +function getCurrentRepositoryRevision () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it - $GLOBALS[__FUNCTION__] = getConfig('CURR_SVN_REVISION'); + $GLOBALS[__FUNCTION__] = getConfig('CURRENT_REPOSITORY_REVISION'); } // END - if // Return cache @@ -1944,5 +1942,23 @@ function isRawOutputMode () { return (getScriptOutputMode() == -1); } +// Wrapper to generate a user email link +function generateWrappedUserEmailLink ($email) { + // Just call the inner function + return generateEmailLink($email, 'user_data'); +} + +// Wrapper to check if user points are locked +function ifUserPointsLocked ($userid) { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__][$userid])) { + // Determine it + $GLOBALS[__FUNCTION__][$userid] = ((getFetchedUserData('userid', $userid, 'ref_payout') > 0) && (!isDirectPaymentEnabled())); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__][$userid]; +} + // [EOF] ?>