openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 732f533666f1fafb347e56e1bb9572de521389da
parent 9afb07102a74b80bf22a30ac7251bd9598b2d29c
Author: Jan Dankert <devnull@localhost>
Date:   Wed, 31 Oct 2012 19:29:37 +0100

Wenn Projekt geladen wird, auch Sprache und Model initialisieren.

Diffstat:
action/LoginAction.class.php | 27+++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/action/LoginAction.class.php b/action/LoginAction.class.php @@ -852,7 +852,19 @@ class LoginAction extends Action { // Das einzige Projekt sofort starten. $projectIds = array_keys($allProjects); - Session::setProject( new Project($projectIds[0]) ); + + $project = new Project($projectIds[0]); + $project->load(); + $language = new Language( $project->getDefaultLanguageId() ); + $language->load(); + $model = new Model( $project->getDefaultModelId() ); + $model->load(); + + Session::setProject( $project ); + Session::setProjectLanguage( $language ); + Session::setProjectModel( $model ); + + $this->setPerspective('normal'); } elseif ( $conf['login']['start']['start_lastchanged_object'] ) @@ -865,7 +877,18 @@ class LoginAction extends Action // und dieses Projekt starten. $o = new Object( $objectid ); $o->load(); - Session::setProject( new Project($o->projectid) ); + + $project = new Project($o->projectid); + $project->load(); + $language = new Language( $project->getDefaultLanguageId() ); + $language->load(); + $model = new Model( $project->getDefaultModelId() ); + $model->load(); + + Session::setProject( $project ); + Session::setProjectLanguage( $language ); + Session::setProjectModel( $model ); + $this->setPerspective('normal'); } }