summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspiderr <spiderr@bitweaver.org>2021-02-13 21:47:27 -0500
committerspiderr <spiderr@bitweaver.org>2021-02-13 21:47:27 -0500
commit4ef6a0dbd81d1499101763db21c0897f1a27c2b3 (patch)
tree8c07fea2c4ad1eb6149f8204622ac8a9e9ae1d8c
parentc6f3b74117c4ed0f41eafaf6c4915c12cdc48521 (diff)
parent67bf5e1d5ba517914374d793b1d9d59130904221 (diff)
downloadliberty-4ef6a0dbd81d1499101763db21c0897f1a27c2b3.tar.gz
liberty-4ef6a0dbd81d1499101763db21c0897f1a27c2b3.tar.bz2
liberty-4ef6a0dbd81d1499101763db21c0897f1a27c2b3.zip
Merge branch 'master' of github.com:bitweaver/liberty
-rw-r--r--includes/classes/LibertyStructure.php38
1 files changed, 19 insertions, 19 deletions
diff --git a/includes/classes/LibertyStructure.php b/includes/classes/LibertyStructure.php
index 7cb5755..8456f37 100644
--- a/includes/classes/LibertyStructure.php
+++ b/includes/classes/LibertyStructure.php
@@ -73,30 +73,30 @@ class LibertyStructure extends LibertyBase {
LEFT JOIN `'.BIT_DB_PREFIX.'users_users` uu ON ( uu.`user_id` = lc.`user_id` )' . $where;
if( $result = $this->mDb->query( $query, $bindVars ) ) {
- $ret = $result->fetchRow();
- }
-
- if( !empty( $contentTypes[$ret['content_type_guid']] ) ) {
- // quick alias for code readability
- $type = &$contentTypes[$ret['content_type_guid']];
- if( empty( $type['content_object'] ) && !empty( $gBitSystem->mPackages[$type['handler_package']] ) ) {
- // create *one* object for each object *type* to call virtual methods.
- $handlerFile = $gBitSystem->mPackages[$type['handler_package']]['path'].$type['handler_file'];
- if( file_exists( $handlerFile ) ) {
- include_once( $handlerFile );
- if( class_exists( $type['handler_class'] ) ) {
- $type['content_object'] = new $type['handler_class']();
+ if( $ret = $result->fetchRow() ) {
+ if( !empty( $contentTypes[$ret['content_type_guid']] ) ) {
+ // quick alias for code readability
+ $type = &$contentTypes[$ret['content_type_guid']];
+ if( empty( $type['content_object'] ) && !empty( $gBitSystem->mPackages[$type['handler_package']] ) ) {
+ // create *one* object for each object *type* to call virtual methods.
+ $handlerFile = $gBitSystem->mPackages[$type['handler_package']]['path'].$type['handler_file'];
+ if( file_exists( $handlerFile ) ) {
+ include_once( $handlerFile );
+ if( class_exists( $type['handler_class'] ) ) {
+ $type['content_object'] = new $type['handler_class']();
+ }
+ }
+ }
+ if( !empty( $type['content_object'] ) && is_object( $type['content_object'] ) ) {
+ $ret['title'] = $type['content_object']->getTitleFromHash( $ret );
}
}
- }
- if( !empty( $type['content_object'] ) && is_object( $type['content_object'] ) ) {
- $ret['title'] = $type['content_object']->getTitleFromHash( $ret );
+
+ $sStructureNodeCache['structure_id'][$ret['structure_id']] = $ret;
+ $sStructureNodeCache['content_id'][$ret['content_id']] = $ret;
}
}
- $sStructureNodeCache['structure_id'][$ret['structure_id']] = $ret;
- $sStructureNodeCache['content_id'][$ret['content_id']] = $ret;
-
return $ret;
}