summaryrefslogtreecommitdiff
path: root/lookup_content_inc.php
diff options
context:
space:
mode:
authorbitweaver.org <bitweaver@users.sourceforge.net>2005-06-19 04:55:51 +0000
committerbitweaver.org <bitweaver@users.sourceforge.net>2005-06-19 04:55:51 +0000
commit9263d2df0226a118f4add4664d746a266ce5aa78 (patch)
tree7bc560ee5a4111a80f7b4ecd23afe53278cfd352 /lookup_content_inc.php
downloadliberty-9263d2df0226a118f4add4664d746a266ce5aa78.tar.gz
liberty-9263d2df0226a118f4add4664d746a266ce5aa78.tar.bz2
liberty-9263d2df0226a118f4add4664d746a266ce5aa78.zip
IMPORT TikiPro CLYDE FINAL
Diffstat (limited to 'lookup_content_inc.php')
-rw-r--r--lookup_content_inc.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/lookup_content_inc.php b/lookup_content_inc.php
new file mode 100644
index 0000000..02d4840
--- /dev/null
+++ b/lookup_content_inc.php
@@ -0,0 +1,31 @@
+<?php
+ global $gContent;
+
+ if( !empty( $_REQUEST['structure_id'] ) ) {
+ require_once( LIBERTY_PKG_PATH.'LibertyStructure.php');
+ $gStructure = new LibertyStructure( $_REQUEST['structure_id'] );
+ if( $gStructure->load() ) {
+// vd( $gStructure->mInfo );
+ $gStructure->loadNavigation();
+ $gStructure->loadPath();
+ $smarty->assign( 'structureInfo', $gStructure->mInfo );
+ // $_REQUEST['page_id'] = $gStructure->mInfo['page_id'];
+ if( $viewContent = $gStructure->getLibertyObject( $gStructure->mInfo['content_id'], $gStructure->mInfo['content_type']['content_type_guid'] ) ) {
+ $viewContent->load();
+ $viewContent->setStructure( $_REQUEST['structure_id'] );
+ $smarty->assign_by_ref( 'pageInfo', $viewContent->mInfo );
+ $gContent = &$viewContent;
+ $smarty->assign_by_ref( 'gContent', $gContent );
+ }
+ }
+ } elseif( !empty( $_REQUEST['content_id'] ) ) {
+ require_once( LIBERTY_PKG_PATH.'LibertyBase.php');
+ if( $gContent = LibertyBase::getLibertyObject( $_REQUEST['content_id'] ) ) {
+ if( $gContent->load() ) {
+ $smarty->assign_by_ref( 'gContent', $gContent );
+ $smarty->assign_by_ref( 'pageInfo', $gContent->mInfo );
+ }
+ }
+ }
+
+?>