centralise the "From"-header construction in functions/identities.php.
[squirrelmail.git] / plugins / bug_report / functions.php
index 4db6358efe3944930d6689bf29f9fdf43eae3164..ba2c2f352863b4cf6b1da3ea582dac676e898066 100644 (file)
@@ -2,15 +2,21 @@
 /**
  * functions for bug_report plugin
  *
- * @copyright © 2004-2006 The SquirrelMail Project Team
+ * @copyright © 2004-2007 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
  * @subpackage bug_report
  */
 
-/** @ignore */
-if (! defined('SM_PATH')) define('SM_PATH','../../');
+
+/**
+ * do not allow to call this file directly
+ */
+if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) {
+    header("Location: ../../src/login.php");
+    die();
+}
 
 /** Declare plugin configuration vars */
 global $bug_report_admin_email, $bug_report_allow_users;
@@ -73,5 +79,3 @@ function bug_report_check_user() {
 function bug_report_array_trim(&$value,$key) {
     $value=trim($value);
 }
-
-?>
\ No newline at end of file