diff options
| author | spiderr <spiderr@bitweaver.org> | 2021-02-12 13:28:08 -0500 |
|---|---|---|
| committer | spiderr <spiderr@bitweaver.org> | 2021-02-12 13:28:08 -0500 |
| commit | 1cd663956c5a0bf55b4f43b34d7ab28fb16a4543 (patch) | |
| tree | 4a46738319c09c82c80d1572508c068bc5a9a481 /includes | |
| parent | fc66432d43610589602b3c87422fc95aca9e0de6 (diff) | |
| download | liberty-1cd663956c5a0bf55b4f43b34d7ab28fb16a4543.tar.gz liberty-1cd663956c5a0bf55b4f43b34d7ab28fb16a4543.tar.bz2 liberty-1cd663956c5a0bf55b4f43b34d7ab28fb16a4543.zip | |
clean up structure lookup
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/lookup_content_inc.php | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/includes/lookup_content_inc.php b/includes/lookup_content_inc.php index d9ebaa6..e92a5a1 100644 --- a/includes/lookup_content_inc.php +++ b/includes/lookup_content_inc.php @@ -7,34 +7,34 @@ * @package liberty * @subpackage functions */ - global $gContent; - if( @BitBase::verifyId( $_REQUEST['structure_id'] ) ) { - /** - * required setup - */ - require_once( LIBERTY_PKG_CLASS_PATH.'LibertyStructure.php'); - $_REQUEST['structure_id'] = preg_replace( '/[\D]/', '', $_REQUEST['structure_id'] ); - $gStructure = new LibertyStructure( $_REQUEST['structure_id'] ); - if( $gStructure->load() ) { - $gStructure->loadNavigation(); - $gStructure->loadPath(); - $gBitSmarty->assign( 'structureInfo', $gStructure->mInfo ); - // $_REQUEST['page_id'] = $gStructure->mInfo['page_id']; - if( $viewContent = LibertyBase::getLibertyObject( $gStructure->mInfo['content_id'], $gStructure->mInfo['content_type']['content_type_guid'] ) ) { - $viewContent->setStructure( $_REQUEST['structure_id'] ); - $gBitSmarty->assignByRef( 'pageInfo', $viewContent->mInfo ); - $gContent = &$viewContent; - $gBitSmarty->assignByRef( 'gContent', $gContent ); - } - } - } elseif( @BitBase::verifyId( $_REQUEST['content_id'] ) ) { - $_REQUEST['content_id'] = preg_replace( '/[\D]/', '', $_REQUEST['content_id'] ); - require_once( LIBERTY_PKG_CLASS_PATH.'LibertyBase.php'); - if( $gContent = LibertyBase::getLibertyObject( $_REQUEST['content_id'] ) ) { +global $gContent; + +if( @BitBase::verifyId( $_REQUEST['structure_id'] ) ) { + /** + * required setup + */ + require_once( LIBERTY_PKG_CLASS_PATH.'LibertyStructure.php'); + $_REQUEST['structure_id'] = preg_replace( '/[\D]/', '', $_REQUEST['structure_id'] ); + $gStructure = new LibertyStructure( $_REQUEST['structure_id'] ); + if( $gStructure->load() ) { + $gStructure->loadNavigation(); + $gStructure->loadPath(); + $gBitSmarty->assign( 'structureInfo', $gStructure->mInfo ); +// $_REQUEST['page_id'] = $gStructure->mInfo['page_id']; + if( $viewContent = LibertyBase::getLibertyObject( $gStructure->mInfo['content_id'], $gStructure->mInfo['content_type']['content_type_guid'] ) ) { + $viewContent->setStructure( $_REQUEST['structure_id'] ); + $gBitSmarty->assignByRef( 'pageInfo', $viewContent->mInfo ); + $gContent = &$viewContent; $gBitSmarty->assignByRef( 'gContent', $gContent ); - $gBitSmarty->assignByRef( 'pageInfo', $gContent->mInfo ); } } +} elseif( @BitBase::verifyId( $_REQUEST['content_id'] ) ) { + $_REQUEST['content_id'] = preg_replace( '/[\D]/', '', $_REQUEST['content_id'] ); + require_once( LIBERTY_PKG_CLASS_PATH.'LibertyBase.php'); + if( $gContent = LibertyBase::getLibertyObject( $_REQUEST['content_id'] ) ) { + $gBitSmarty->assignByRef( 'gContent', $gContent ); + $gBitSmarty->assignByRef( 'pageInfo', $gContent->mInfo ); + } +} -?> |
