New get_plugin_version() function, and a couple places to use it.
[squirrelmail.git] / plugins / bug_report / functions.php
index b516d40e07ff1d59efe737801e2c58f9b39af154..e078dfb9999b54c53358b179b7054dd5ff81a84a 100644 (file)
@@ -2,15 +2,22 @@
 /**
  * functions for bug_report plugin
  *
- * @copyright © 2004-2005 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__) ||
+     (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_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 +80,3 @@ function bug_report_check_user() {
 function bug_report_array_trim(&$value,$key) {
     $value=trim($value);
 }
-
-?>
\ No newline at end of file