* -------------------------------------------------------------------- *
* Kurzbeschreibung : Spezielle Funktion fuer removeip-Erweiterung *
* -------------------------------------------------------------------- *
- * $Revision:: 856 $ *
- * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. March 2009) $ *
+ * $Revision:: $ *
+ * $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
- * $Author:: stelzi $ *
+ * $Author:: $ *
* Needs to be in all Files and every File needs "svn propset *
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
// Some security stuff...
if (!defined('__SECURITY')) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
}
// "Getter" for anonymous remote IP number
function GET_ANONYMOUS_REMOTE_ADDR ($remoteAddr) {
// Is config enabled?
- if (getConfig('removeip_anon_ip') == "Y") {
+ if (getConfig('removeip_anon_ip') == 'Y') {
// Switch way do we like?
switch (getConfig('anonymous_ip')) {
case "127.0.0.1": // mod_removeip style
break;
case "RANDOM": // Pseudo-random IP number
- $remoteAddr = mt_rand(1,254).".".mt_rand(0,254).".".mt_rand(0,254).".".mt_rand(1,254);
+ $remoteAddr = mt_rand(1,254).'.'.mt_rand(0,254).'.'.mt_rand(0,254).'.'.mt_rand(1,254);
break;
} // END - switch
} // END - if
// "Getter" for anonymous remote hostname
function GET_ANONYMOUS_REMOTE_HOST ($remoteHost) {
// Is config enabled?
- if (getConfig('removeip_anon_host') == "Y") {
+ if (getConfig('removeip_anon_host') == 'Y') {
// Set anon hostname
$remoteHost = "localhost.localnet";
} // END - if
// "Getter" for anonymous user agent
function GET_ANONYMOUS_USER_AGENT ($userAgent) {
// Is config enabled?
- if (getConfig('removeip_anon_ua') == "Y") {
+ if (getConfig('removeip_anon_ua') == 'Y') {
// Set anon user agent
- $userAgent = "-";
+ $userAgent = '-';
} // END - if
// Return it
// "Getter" for anonymous referer
function GET_ANONYMOUS_REFERER ($referer) {
// Is config enabled?
- if (getConfig('removeip_anon_ref') == "Y") {
+ if (getConfig('removeip_anon_ref') == 'Y') {
// Set anon user agent
- $referer = "-";
+ $referer = '-';
} // END - if
// Return it
$anonymity = 0;
// Is some data anonymized?
- 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++;
+ 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);
$content = $data;
// Extension removeip activated?
- if ((EXT_IS_ACTIVE("removeip")) && (getConfig('removeip_'.strtolower($data['access_level']).'_show') == "Y")) {
+ if ((EXT_IS_ACTIVE('removeip')) && (getConfig('removeip_'.strtolower($data['access_level']).'_show') == 'Y')) {
// Add anoymity/privacy infos
$content['content'] .= REMOVEIP_ADD_INFOS()."<br />\n";
} // END - if