summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspiderr <spiderr@bitweaver.org>2021-02-13 21:44:08 -0500
committerspiderr <spiderr@bitweaver.org>2021-02-13 21:44:08 -0500
commitb57c6ed6b1d5f0da3bb0d6271162faf6eab9fa34 (patch)
tree5eb3d49d3c41689ced843c8eff2883623ac549da
parent2b1458a54a7e8cc163e5b7dc6acea16ecd390073 (diff)
parent67bf5e1d5ba517914374d793b1d9d59130904221 (diff)
downloadliberty-b57c6ed6b1d5f0da3bb0d6271162faf6eab9fa34.tar.gz
liberty-b57c6ed6b1d5f0da3bb0d6271162faf6eab9fa34.tar.bz2
liberty-b57c6ed6b1d5f0da3bb0d6271162faf6eab9fa34.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;
}