X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fbug_report%2Ffunctions.php;h=e078dfb9999b54c53358b179b7054dd5ff81a84a;hp=b516d40e07ff1d59efe737801e2c58f9b39af154;hb=d95b10b37612d4ccb3712a90a3f9be85fd92910f;hpb=2329d86dc01015028456a4e224c30f3b807f749d diff --git a/plugins/bug_report/functions.php b/plugins/bug_report/functions.php index b516d40e..e078dfb9 100644 --- a/plugins/bug_report/functions.php +++ b/plugins/bug_report/functions.php @@ -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