From: Michael M Slusarz Date: Tue, 11 Aug 2009 20:55:52 +0000 (-0600) Subject: Move changeLanguage() into Horde_Registry_Application X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c1be054ee43069f4c4eb542d5e1d51dd21835a1b;p=horde.git Move changeLanguage() into Horde_Registry_Application --- diff --git a/imp/lib/Api.php b/imp/lib/Api.php index d78651afb..cfc2911b9 100644 --- a/imp/lib/Api.php +++ b/imp/lib/Api.php @@ -46,26 +46,6 @@ class IMP_Api extends Horde_Registry_Api } /** - * Performs tasks necessary when the language is changed during the - * session. - */ - public function changeLanguage() - { - require_once dirname(__FILE__) . '/Application.php'; - try { - new IMP_Application(array('init' => array('authentication' => 'throw'))); - } catch (Horde_Exception $e) { - return; - } - - $imp_folder = IMP_Folder::singleton(); - $imp_folder->clearFlistCache(); - $imaptree = IMP_Imap_Tree::singleton(); - $imaptree->init(); - $GLOBALS['imp_search']->initialize(true); - } - - /** * Returns a list of authentication credentials, i.e. server settings that * can be specified by the user on the login screen. * diff --git a/imp/lib/Application.php b/imp/lib/Application.php index d26f853be..ad9887d6b 100644 --- a/imp/lib/Application.php +++ b/imp/lib/Application.php @@ -725,4 +725,25 @@ class IMP_Application extends Horde_Registry_Application } } + /* Language change callback. */ + + /** + * Performs tasks necessary when the language is changed during the + * session. + */ + public function changeLanguage() + { + try { + $this->init(array('authentication' => 'throw')); + } catch (Horde_Exception $e) { + return; + } + + $imp_folder = IMP_Folder::singleton(); + $imp_folder->clearFlistCache(); + $imaptree = IMP_Imap_Tree::singleton(); + $imaptree->init(); + $GLOBALS['imp_search']->initialize(true); + } + }