diff options
Diffstat (limited to 'Nexus.php')
| -rw-r--r-- | Nexus.php | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -4,7 +4,7 @@ * * @abstract * @author xing <xing@synapse.plus.com> -* @version $Revision: 1.28 $ +* @version $Revision: 1.29 $ * @package nexus */ @@ -340,16 +340,18 @@ class Nexus extends NexusSystem { case 'content_id': // create *one* object for each object *type* to call virtual methods. $row = $this->mDb->getRow( "SELECT `title`,`content_id`,`content_type_guid` FROM `".BIT_DB_PREFIX."liberty_content` WHERE `content_id`=?", array( $pItemHash['rsrc'] )); - $type = &$contentTypes[$row['content_type_guid']]; + if( !empty( $row['content_type_guid'] )) { + $type = &$contentTypes[$row['content_type_guid']]; - if( empty( $type['content_object'] )) { - include_once( $gBitSystem->mPackages[$type['handler_package']]['path'].$type['handler_file'] ); - $type['content_object'] = new $type['handler_class'](); - } + if( empty( $type['content_object'] )) { + include_once( $gBitSystem->mPackages[$type['handler_package']]['path'].$type['handler_file'] ); + $type['content_object'] = new $type['handler_class'](); + } - $type['content_object']->mContentId = $row['content_id']; - $type['content_object']->load(); - $ret = $type['content_object']->getDisplayUrl(); + $type['content_object']->mContentId = $row['content_id']; + $type['content_object']->load(); + $ret = $type['content_object']->getDisplayUrl(); + } break; case 'structure_id': $ret .= BIT_ROOT_URL.'index.php?structure_id='.$pItemHash['rsrc']; |
