From: Michael J. Rubinsky Date: Mon, 17 May 2010 18:34:53 +0000 (-0400) Subject: fix application initialization X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d128a3be6be65b84fe0dc2aa07987bfd30e74ef5;p=horde.git fix application initialization --- diff --git a/mnemo/index.php b/mnemo/index.php index e4ae07407..96893e9af 100644 --- a/mnemo/index.php +++ b/mnemo/index.php @@ -11,14 +11,7 @@ * @since Mnemo 1.0 * @package Mnemo */ - -@define('MNEMO_BASE', dirname(__FILE__)); -$mnemo_configured = (is_readable(MNEMO_BASE . '/config/conf.php') && - is_readable(MNEMO_BASE . '/config/prefs.php')); - -if (!$mnemo_configured) { - require MNEMO_BASE . '/../lib/Test.php'; - Horde_Test::configFilesMissing('Mnemo', MNEMO_BASE, array('conf.php', 'prefs.php')); -} +require_once dirname(__FILE__) . '/lib/Application.php'; +Horde_Registry::appInit('mnemo'); require MNEMO_BASE . '/list.php'; diff --git a/mnemo/lib/Application.php b/mnemo/lib/Application.php index da9e126c1..bad856579 100644 --- a/mnemo/lib/Application.php +++ b/mnemo/lib/Application.php @@ -49,12 +49,6 @@ class Mnemo_Application extends Horde_Registry_Application */ protected function _init() { - // Set the timezone variable. - Horde_Nls::setTimeZone(); - - // Create a share instance. - $GLOBALS['mnemo_shares'] = Horde_Share::singleton($GLOBALS['registry']->getApp()); - Mnemo::initialize(); } diff --git a/mnemo/lib/Mnemo.php b/mnemo/lib/Mnemo.php index d81d82b9e..94bbc6808 100644 --- a/mnemo/lib/Mnemo.php +++ b/mnemo/lib/Mnemo.php @@ -402,6 +402,8 @@ class Mnemo { */ public static function initialize() { + $GLOBALS['mnemo_shares'] = Horde_Share::singleton($GLOBALS['injector']->getInstance('Horde_Registry')->getApp()); + // Update the preference for which notepads to display. If the // user doesn't have any selected notepads for view then fall // back to some available notepad.