summaryrefslogtreecommitdiff
path: root/lookup_content_inc.php
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2006-09-06 15:56:53 +0000
committerChristian Fowler <spider@viovio.com>2006-09-06 15:56:53 +0000
commit4db16fbc209b83c0d0769ee6cb7ff5635ef045b3 (patch)
tree1a120a051f6ca9ac1ff7fedcd38b114656692ca9 /lookup_content_inc.php
parent6e6bfd54ee11f4852bbc7fc90317746844f4465d (diff)
downloadliberty-4db16fbc209b83c0d0769ee6cb7ff5635ef045b3.tar.gz
liberty-4db16fbc209b83c0d0769ee6cb7ff5635ef045b3.tar.bz2
liberty-4db16fbc209b83c0d0769ee6cb7ff5635ef045b3.zip
remove non integer bits from structure_id
Diffstat (limited to 'lookup_content_inc.php')
-rw-r--r--lookup_content_inc.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lookup_content_inc.php b/lookup_content_inc.php
index cd910c7..1e8abe8 100644
--- a/lookup_content_inc.php
+++ b/lookup_content_inc.php
@@ -3,7 +3,7 @@
* lookup_content_inc
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
* @package liberty
* @subpackage functions
*/
@@ -14,7 +14,8 @@
* required setup
*/
require_once( LIBERTY_PKG_PATH.'LibertyStructure.php');
- $gStructure = new LibertyStructure( $_REQUEST['structure_id'] );
+ $structureId = preg_replace( '/[\D]/', '', $_REQUEST['structure_id'] );
+ $gStructure = new LibertyStructure( $structureId );
if( $gStructure->load() ) {
// vd( $gStructure->mInfo );
$gStructure->loadNavigation();
@@ -22,7 +23,7 @@
$gBitSmarty->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->setStructure( $_REQUEST['structure_id'] );
+ $viewContent->setStructure( $structureId );
$gBitSmarty->assign_by_ref( 'pageInfo', $viewContent->mInfo );
$gContent = &$viewContent;
$gBitSmarty->assign_by_ref( 'gContent', $gContent );