summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LibertyBase.php5
-rw-r--r--lookup_content_inc.php9
2 files changed, 9 insertions, 5 deletions
diff --git a/LibertyBase.php b/LibertyBase.php
index 092a5ad..ef7fbe5 100644
--- a/LibertyBase.php
+++ b/LibertyBase.php
@@ -3,7 +3,7 @@
* Base class for Management of Liberty Content
*
* @package liberty
- * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyBase.php,v 1.11 2006/08/19 16:24:32 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyBase.php,v 1.12 2006/09/06 16:02:55 spiderr Exp $
* @author spider <spider@steelsun.com>
*/
// +----------------------------------------------------------------------+
@@ -54,6 +54,9 @@ class LibertyBase extends BitBase {
global $gLibertySystem, $gBitUser, $gBitSystem;
if( BitBase::verifyId( $pContentId ) ) {
+ // remove non integer bits from structure_id and content_id requests
+ // can happen with period's at the end of url's that are email'ed around
+ $pContentId = preg_replace( '/[\D]/', '', $pContentId );
if( empty( $pContentGuid ) ) {
$pContentGuid = $gLibertySystem->mDb->getOne( "SELECT `content_type_guid` FROM `".BIT_DB_PREFIX."liberty_content` WHERE `content_id`=?", array( $pContentId ) );
}
diff --git a/lookup_content_inc.php b/lookup_content_inc.php
index 1e8abe8..04fb3bc 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.7 $
+ * @version $Revision: 1.8 $
* @package liberty
* @subpackage functions
*/
@@ -14,8 +14,8 @@
* required setup
*/
require_once( LIBERTY_PKG_PATH.'LibertyStructure.php');
- $structureId = preg_replace( '/[\D]/', '', $_REQUEST['structure_id'] );
- $gStructure = new LibertyStructure( $structureId );
+ $_REQUEST['structure_id'] = preg_replace( '/[\D]/', '', $_REQUEST['structure_id'] );
+ $gStructure = new LibertyStructure( $_REQUEST['structure_id'] );
if( $gStructure->load() ) {
// vd( $gStructure->mInfo );
$gStructure->loadNavigation();
@@ -23,13 +23,14 @@
$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( $structureId );
+ $viewContent->setStructure( $_REQUEST['structure_id'] );
$gBitSmarty->assign_by_ref( 'pageInfo', $viewContent->mInfo );
$gContent = &$viewContent;
$gBitSmarty->assign_by_ref( 'gContent', $gContent );
}
}
} elseif( @BitBase::verifyId( $_REQUEST['content_id'] ) ) {
+ $_REQUEST['content_id'] = preg_replace( '/[\D]/', '', $_REQUEST['content_id'] );
require_once( LIBERTY_PKG_PATH.'LibertyBase.php');
if( $gContent = LibertyBase::getLibertyObject( $_REQUEST['content_id'] ) ) {
$gBitSmarty->assign_by_ref( 'gContent', $gContent );