summaryrefslogtreecommitdiff
path: root/Pigeonholes.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2007-07-16 17:07:59 +0000
committerMax Kremmel <xing@synapse.plus.com>2007-07-16 17:07:59 +0000
commita76b4204dbe256aa8165fd9f6f6fde56ccf35970 (patch)
tree8b13b9bd620d8a3289af249fd9cbb878823d2722 /Pigeonholes.php
parentc241682c31b81b26963f859b512de08a4f714bf7 (diff)
downloadpigeonholes-a76b4204dbe256aa8165fd9f6f6fde56ccf35970.tar.gz
pigeonholes-a76b4204dbe256aa8165fd9f6f6fde56ccf35970.tar.bz2
pigeonholes-a76b4204dbe256aa8165fd9f6f6fde56ccf35970.zip
only load LibertyAttachable when needed
Diffstat (limited to 'Pigeonholes.php')
-rw-r--r--Pigeonholes.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/Pigeonholes.php b/Pigeonholes.php
index 64fbe8e..41bf536 100644
--- a/Pigeonholes.php
+++ b/Pigeonholes.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_pigeonholes/Pigeonholes.php,v 1.93 2007/07/16 15:27:21 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_pigeonholes/Pigeonholes.php,v 1.94 2007/07/16 17:07:59 squareing Exp $
*
* +----------------------------------------------------------------------+
* | Copyright ( c ) 2004, bitweaver.org
@@ -17,7 +17,7 @@
* Pigeonholes class
*
* @author xing <xing@synapse.plus.com>
- * @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