From cb3e84150edf23491c3c353ad850905002de2259 Mon Sep 17 00:00:00 2001 From: Max Kremmel Date: Sat, 4 Feb 2006 17:47:25 +0000 Subject: add module that automatically displays the full pigeonhole, the content is part of --- Pigeonholes.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Pigeonholes.php') diff --git a/Pigeonholes.php b/Pigeonholes.php index 899d395..36136ad 100644 --- a/Pigeonholes.php +++ b/Pigeonholes.php @@ -1,6 +1,6 @@ - * @version $Revision: 1.37 $ + * @version $Revision: 1.38 $ * @package pigeonholes */ @@ -262,15 +262,21 @@ class Pigeonholes extends LibertyAttachable { **/ function getPigeonholesFromContentId( $pContentId ) { if( @BitBase::verifyId( $pContentId ) ) { - $query = "SELECT pig.* + $query = "SELECT ls.* FROM `".BIT_DB_PREFIX."pigeonhole_members` pigm INNER JOIN `".BIT_DB_PREFIX."pigeonholes` pig ON ( pig.`content_id` = pigm.`parent_id` ) + INNER JOIN `".BIT_DB_PREFIX."liberty_structures` ls ON ( pig.`structure_id` = ls.`structure_id` ) WHERE pigm.`content_id`=?"; $ret = $this->mDb->getAll( $query, array( $pContentId ) ); } return( !empty( $ret ) ? $ret : FALSE ); } + function getStructure( $pParamHash ) { + $struct = new LibertyStructure(); + return $struct->getStructure( $pParamHash ); + } + /** * get the path of a pigeonhole * @param $pStructureId structure id of pigeonhole, if no id is given, it gets the id from $this->mStructureId -- cgit v1.3