From a76b4204dbe256aa8165fd9f6f6fde56ccf35970 Mon Sep 17 00:00:00 2001 From: Max Kremmel Date: Mon, 16 Jul 2007 17:07:59 +0000 Subject: only load LibertyAttachable when needed --- Pigeonholes.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Pigeonholes.php') diff --git a/Pigeonholes.php b/Pigeonholes.php index 64fbe8e..41bf536 100644 --- a/Pigeonholes.php +++ b/Pigeonholes.php @@ -1,6 +1,6 @@ - * @version $Revision: 1.93 $ + * @version $Revision: 1.94 $ * @package pigeonholes */ @@ -66,7 +66,7 @@ class Pigeonholes extends LibertyAttachable { * @return bool TRUE on success, FALSE if it's not valid * @access public **/ - function load( $pExtras=FALSE ) { + function load( $pExtras=FALSE, $pLoadAttachable=TRUE ) { if( @BitBase::verifyId( $this->mContentId ) || @BitBase::verifyId( $this->mStructureId ) ) { global $gBitSystem; $lookupColumn = ( @BitBase::verifyId( $this->mContentId ) ? 'lc.`content_id`' : 'ls.`structure_id`' ); @@ -96,7 +96,9 @@ class Pigeonholes extends LibertyAttachable { $this->mInfo['parsed_data'] = $this->parseData( $row ); } - LibertyAttachable::load(); + if( $pLoadAttachable ) { + LibertyAttachable::load(); + } // if the content for the pigeonhole is requested, get it if( $pExtras ) { @@ -932,7 +934,7 @@ function pigeonholes_content_display( &$pObject ) { if( $pigeons = $pigeonholes->getPigeonholesFromContentId( $pObject->mContentId ) ) { foreach( $pigeons as $pigeon ) { $pigeonholes->mContentId = $pigeon['content_id']; - $pigeonholes->load( TRUE ); + $pigeonholes->load( TRUE, FALSE ); //$pigeonholes->loadPreferences(); $pigeonData[] = $pigeonholes->mInfo; // set the theme chosen for this page - virtually random if page is part of multiple themes -- cgit v1.3