If filtering fails, say due to account quota issues, disable for remaineder of login...
[squirrelmail.git] / plugins / translate / functions.php
index 6df6fb015d4a5ed2274fbecbfd17e92f979467a8..f7682e548509a99496e17dc60388e6eee659360d 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * SquirrelMail translate plugin functions
  *
- * @copyright © 2004-2007 The SquirrelMail Project Team
+ * @copyright 2004-2014 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -13,8 +13,7 @@
 /**
  * do not allow to call this file directly
  */
-if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) ||
-     (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) {
+if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) {
     header("Location: ../../src/login.php");
     die();
 }
@@ -457,7 +456,7 @@ function translate_new_form($action,$charset=null) {
     }
 
     if (! is_null($charset))
-        echo ' accept-charset="'.htmlspecialchars($charset).'"';
+        echo ' accept-charset="'.sm_encode_html_special_chars($charset).'"';
 
     echo ">\n";