openrat-cms

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

commit 6e8237c5a648e41b617f44fbc8f281f07a0d334a
parent a7a6e9cd0d224f6fca9549968cb8ee6aa4b47734
Author: dankert <devnull@localhost>
Date:   Sat, 25 Dec 2010 23:19:39 +0100

Fix: Kein Fehler, wenn Objekt nicht vorhanden.

Diffstat:
objectClasses/Model.class.php | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/objectClasses/Model.class.php b/objectClasses/Model.class.php @@ -77,9 +77,13 @@ class Model " WHERE projectid = {projectid} ". " ORDER BY name" ); - if ( isset($this) ) + if ( !empty($this->projectid) ) $sql->setInt('projectid',$this->projectid ); - else $sql->setInt('projectid',$SESS['projectid'] ); + else + { + $project = Session::getProject(); + $sql->setInt('projectid',$project->projectid); + } return $db->getAssoc( $sql ); }