summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorspiderr <spiderr@bitweaver.org>2021-02-12 13:28:08 -0500
committerspiderr <spiderr@bitweaver.org>2021-02-12 13:28:08 -0500
commit1cd663956c5a0bf55b4f43b34d7ab28fb16a4543 (patch)
tree4a46738319c09c82c80d1572508c068bc5a9a481 /includes
parentfc66432d43610589602b3c87422fc95aca9e0de6 (diff)
downloadliberty-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.php52
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 );
+ }
+}
-?>