]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/removeip_functions.php
Complete refacture for previously discovered inconsistency
[mailer.git] / inc / libs / removeip_functions.php
index 8e908dad35e10905448736d5a1d616e25da283bc..112bef3ab03430e1c06a3727da295103802b0b58 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 10/01/2008 *
- * ===============                              Last change: 10/01/2008 *
+ * Mailer v0.2.1-FINAL                                Start: 10/01/2008 *
+ * ===================                          Last change: 10/01/2008 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : removeip_functions.php                           *
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -104,7 +105,7 @@ function getAnonymousReferer ($referer) {
 // Adds informations about anonymity/privacy to the menu
 function addAnonymityLevel () {
        // "Base-privacy" is by default low (we add more later)
-       $anonymity = 0;
+       $anonymity = '0';
 
        // Is some data anonymized?
        if (getConfig('removeip_anon_ip')   == 'Y') $anonymity++;
@@ -118,19 +119,19 @@ function addAnonymityLevel () {
        // Set constant name suffix depending on that level
        $suffix = 'unsupported_' . $level;
        switch ($level) {
-               case 0:
+               case '0':
                        $suffix = 'none';
                        break;
 
-               case 1:
+               case '1':
                        $suffix = 'low';
                        break;
 
-               case 2:
+               case '2':
                        $suffix = 'medium';
                        break;
 
-               case 3: // High level
+               case '3': // High level
                        $suffix = 'high';
                        break;
        } // END - while
@@ -139,7 +140,7 @@ function addAnonymityLevel () {
        $constantName = sprintf("REMOVEIP_LEVEL_%s", strtoupper($suffix));
 
        // Default message
-       $message = sprintf(getMessage('REMOVEIP_UNKNOWN_LEVEL'), $suffix);
+       $message = getMaskedMessage('REMOVEIP_UNKNOWN_LEVEL', $suffix);
 
        // Is that constant there?
        if (isMessageIdValid($constantName)) {