commit 3115c6377e3f6c0f2dece329a6c736dfcfa63739 parent a0724c75f9457e006e2389d34f7ddf4c8d1b48ec Author: dankert <devnull@localhost> Date: Mon, 22 Feb 2010 22:57:35 +0100 Nicht laden, wenn Objekt-Id nicht vorhanden. Diffstat:
objectClasses/Link.class.php | | | 25 | ++++++++++++++----------- |
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/objectClasses/Link.class.php b/objectClasses/Link.class.php @@ -53,18 +53,21 @@ class Link extends Object $sql->setInt( 'objectid',$this->objectid ); $row = $db->getRow( $sql ); - $this->url = $row['url']; - $this->linkedObjectId = $row['link_objectid']; - - if ( is_numeric( $this->linkedObjectId ) ) - { - $this->isLinkToUrl = false; - $this->isLinkToObject = true; - } - else + if ( count($row ) != 0 ) { - $this->isLinkToUrl = true; - $this->isLinkToObject = false; + $this->url = $row['url']; + $this->linkedObjectId = $row['link_objectid']; + + if ( is_numeric( $this->linkedObjectId ) ) + { + $this->isLinkToUrl = false; + $this->isLinkToObject = true; + } + else + { + $this->isLinkToUrl = true; + $this->isLinkToObject = false; + } } $this->objectLoad();