X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fremoveip_functions.php;h=88182524047aaf59918ee2152c4b3e8038eb5d37;hb=fb7120ffa230b62b54895bcf95952e1cf30f8594;hp=8965fbdd71ed8121d5d3ce3a731b333262414072;hpb=dbeb4ef1dc2e59d0c6bfab9d9666cdfa515f58e7;p=mailer.git diff --git a/inc/libs/removeip_functions.php b/inc/libs/removeip_functions.php index 8965fbdd71..8818252404 100644 --- a/inc/libs/removeip_functions.php +++ b/inc/libs/removeip_functions.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Spezielle Funktion fuer removeip-Erweiterung * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $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 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -39,15 +44,13 @@ if (!defined('__SECURITY')) { // "Getter" for anonymous remote IP number function GET_ANONYMOUS_REMOTE_ADDR ($remoteAddr) { - global $_CONFIG; - // Is config enabled? - if ($_CONFIG['removeip_anon_ip'] == "Y") { + if (getConfig('removeip_anon_ip') == "Y") { // Switch way do we like? - switch ($_CONFIG['anonymous_ip']) { + switch (getConfig('anonymous_ip')) { case "127.0.0.1": // mod_removeip style case "0.0.0.0": // Some people may prefer this... - $remoteAddr = $_CONFIG['anonymous_ip']; + $remoteAddr = getConfig('anonymous_ip'); break; case "RANDOM": // Pseudo-random IP number @@ -61,10 +64,8 @@ function GET_ANONYMOUS_REMOTE_ADDR ($remoteAddr) { } // "Getter" for anonymous remote hostname function GET_ANONYMOUS_REMOTE_HOST ($remoteHost) { - global $_CONFIG; - // Is config enabled? - if ($_CONFIG['removeip_anon_host'] == "Y") { + if (getConfig('removeip_anon_host') == "Y") { // Set anon hostname $remoteHost = "localhost.localnet"; } // END - if @@ -74,10 +75,8 @@ function GET_ANONYMOUS_REMOTE_HOST ($remoteHost) { } // "Getter" for anonymous user agent function GET_ANONYMOUS_USER_AGENT ($userAgent) { - global $_CONFIG; - // Is config enabled? - if ($_CONFIG['removeip_anon_ua'] == "Y") { + if (getConfig('removeip_anon_ua') == "Y") { // Set anon user agent $userAgent = "-"; } // END - if @@ -87,10 +86,8 @@ function GET_ANONYMOUS_USER_AGENT ($userAgent) { } // "Getter" for anonymous referer function GET_ANONYMOUS_REFERER ($referer) { - global $_CONFIG; - // Is config enabled? - if ($_CONFIG['removeip_anon_ref'] == "Y") { + if (getConfig('removeip_anon_ref') == "Y") { // Set anon user agent $referer = "-"; } // END - if @@ -100,16 +97,14 @@ function GET_ANONYMOUS_REFERER ($referer) { } // Adds informations about anonymity/privacy to the menu function REMOVEIP_ADD_INFOS () { - global $_CONFIG; - // "Base-privacy" is by default low (we add more later) $anonymity = 0; // Is some data anonymized? - if ($_CONFIG['removeip_anon_ip'] == "Y") $anonymity++; - if ($_CONFIG['removeip_anon_host'] == "Y") $anonymity++; - if ($_CONFIG['removeip_anon_ua'] == "Y") $anonymity++; - if ($_CONFIG['removeip_anon_ref'] == "Y") $anonymity++; + if (getConfig('removeip_anon_ip') == "Y") $anonymity++; + if (getConfig('removeip_anon_host') == "Y") $anonymity++; + if (getConfig('removeip_anon_ua') == "Y") $anonymity++; + if (getConfig('removeip_anon_ref') == "Y") $anonymity++; // Calculate anonymity level $level = round($anonymity / 4 * 3); @@ -150,5 +145,20 @@ function REMOVEIP_ADD_INFOS () { return LOAD_TEMPLATE("removeip_level", true, $message); } +// Filter for adding anonymity notice to the output stream +function FILTER_ADD_ANONYMITY_NOTICE ($data) { + // Init content + $content = $data; + + // Extension removeip activated? + if ((EXT_IS_ACTIVE("removeip")) && (getConfig('removeip_'.strtolower($data['access_level']).'_show') == "Y")) { + // Add anoymity/privacy infos + $content['content'] .= REMOVEIP_ADD_INFOS()."
\n"; + } // END - if + + // Return it + return $content; +} + // ?>