From: Michael M Slusarz Date: Wed, 2 Jun 2010 16:57:41 +0000 (-0600) Subject: Display warning to admin user if test script is enabled. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7b741f07fb947609605a3cf52277efbacae90676;p=horde.git Display warning to admin user if test script is enabled. --- diff --git a/horde/lib/LoginTasks/Task/TestScriptActive.php b/horde/lib/LoginTasks/Task/TestScriptActive.php new file mode 100644 index 000000000..b7716fd25 --- /dev/null +++ b/horde/lib/LoginTasks/Task/TestScriptActive.php @@ -0,0 +1,42 @@ + + * @category Horde + * @license http://www.fsf.org/copyleft/lgpl.html LGPL + * @package Horde + */ +class Horde_LoginTasks_Task_TestScriptActive extends Horde_LoginTasks_Task +{ + /** + * The interval at which to run the task. + * + * @var integer + */ + public $interval = Horde_LoginTasks::EVERY; + + /** + * Display type. + * + * @var integer + */ + public $display = Horde_LoginTasks::DISPLAY_NONE; + + /** + * Perform all functions for this task. + */ + public function execute() + { + if ($GLOBALS['registry']->isAdmin() && + empty($GLOBALS['conf']['testdisable'])) { + $GLOBALS['notification']->push(_("The test script is currently enabled. For security reasons, disable test scripts when you are done testing (see horde/docs/INSTALL)."), 'horde.warning'); + } + } + +}