X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fwrapper-functions.php;h=ce8ad1099950f6b4eed1ddf32f921f1c9eac0dce;hb=6a5589c1a7793b19dbce958053d6fea41eaee533;hp=e0244d0af44eff72fd5a853b9fe60d872058e29d;hpb=9fb328e0aa7cd605f2f89e85640815da300a9eb2;p=mailer.git diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index e0244d0af4..ce8ad10999 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -214,12 +214,12 @@ function isDirectory ($FQFN) { } // "Getter" for the real remote IP number -function detectRealIpAddress () { +function detectRealIpAddress ($alwaysReal = FALSE) { // Get remote ip from environment $remoteAddr = determineRealRemoteAddress(); // Is removeip installed? - if (isExtensionActive('removeip')) { + if ((isExtensionActive('removeip')) && ($alwaysReal === FALSE)) { // Then anonymize it $remoteAddr = getAnonymousRemoteAddress($remoteAddr); } // END - if @@ -229,12 +229,12 @@ function detectRealIpAddress () { } // "Getter" for remote IP number -function detectRemoteAddr () { +function detectRemoteAddr ($alwaysReal = FALSE) { // Get remote ip from environment $remoteAddr = determineRealRemoteAddress(TRUE); // Is removeip installed? - if (isExtensionActive('removeip')) { + if ((isExtensionActive('removeip')) && ($alwaysReal === FALSE)) { // Then anonymize it $remoteAddr = getAnonymousRemoteAddress($remoteAddr); } // END - if @@ -244,12 +244,12 @@ function detectRemoteAddr () { } // "Getter" for remote hostname -function detectRemoteHostname () { +function detectRemoteHostname ($alwaysReal = FALSE) { // Get remote ip from environment $remoteHost = getenv('REMOTE_HOST'); // Is removeip installed? - if (isExtensionActive('removeip')) { + if ((isExtensionActive('removeip')) && ($alwaysReal === FALSE)) { // Then anonymize it $remoteHost = getAnonymousRemoteHost($remoteHost); } // END - if @@ -274,12 +274,12 @@ function detectUserAgent ($alwaysReal = FALSE) { } // "Getter" for referer -function detectReferer () { +function detectReferer ($alwaysReal = FALSE) { // Get remote ip from environment $referer = getenv('HTTP_REFERER'); // Is removeip installed? - if (isExtensionActive('removeip')) { + if ((isExtensionActive('removeip')) && ($alwaysReal === TRUE)) { // Then anonymize it $referer = getAnonymousReferer($referer); } // END - if