openrat-cms

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

commit 4c1f8ff5b9261b790db14f1a6e3773f31f87591d
parent 3115c6377e3f6c0f2dece329a6c736dfcfa63739
Author: dankert <devnull@localhost>
Date:   Mon, 22 Feb 2010 22:58:03 +0100

Wenn Objekt-Id nicht gefunden, dann nicht abbrechen, sondern Objekt \"unbekannt\" erzeugen.

Diffstat:
objectClasses/Object.class.php | 16++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/objectClasses/Object.class.php b/objectClasses/Object.class.php @@ -494,11 +494,19 @@ SQL if (count($row) == 0) { - debug_print_backtrace(); - die('fatal: Object::objectLoad(): objectid not found: '.$this->objectid.', SQL='.$sql->raw ); + $this->name = lang('unknown'); + $this->parentid = Session::getProject()->getRootObjectId(); + $this->projectid = Session::getProject()->projectid; + $this->filename = ""; + $this->orderid = 0; + $this->isRoot = false; + $this->createDate = 0; + $this->lastchangeDate = 0; + $this->createUser = new User(); + $this->lastchangeUser = new User(); } - - $this->setDatabaseRow( $row ); + else + $this->setDatabaseRow( $row ); }