diff options
| author | Lester Caine <lester@lsces.co.uk> | 2006-02-09 13:08:40 +0000 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2006-02-09 13:08:40 +0000 |
| commit | 42cd7e64fbc33e4e435b6fc7ee95a52971823bfe (patch) | |
| tree | 675ccbf656147441463a789e9a0eb45bdc0944b7 /LibertyStructure.php | |
| parent | 12a86200ddbb732cf39c20a525259d7deaf8850e (diff) | |
| download | liberty-42cd7e64fbc33e4e435b6fc7ee95a52971823bfe.tar.gz liberty-42cd7e64fbc33e4e435b6fc7ee95a52971823bfe.tar.bz2 liberty-42cd7e64fbc33e4e435b6fc7ee95a52971823bfe.zip | |
Filter lists of content by group_id ( only enabled when gatekeeper is off )
Diffstat (limited to 'LibertyStructure.php')
| -rwxr-xr-x | LibertyStructure.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/LibertyStructure.php b/LibertyStructure.php index 6c6335d..be50aa6 100755 --- a/LibertyStructure.php +++ b/LibertyStructure.php @@ -3,7 +3,7 @@ * Management of Liberty Content * * @package liberty - * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyStructure.php,v 1.23 2006/02/06 09:58:33 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyStructure.php,v 1.24 2006/02/09 13:08:40 lsces Exp $ * @author spider <spider@steelsun.com> */ @@ -291,7 +291,7 @@ class LibertyStructure extends LibertyBase { } function getList( &$pListHash ) { - global $gBitSystem; + global $gBitSystem, $gBitUser; $this->prepGetList( $pListHash ); @@ -309,6 +309,12 @@ class LibertyStructure extends LibertyBase { array_push( $bindVars, $pListHash['user_id'] ); } + if( !$gBitSystem->isPackageActive( 'gatekeeper' ) ) { + $groups = array_keys($gBitUser->mGroups); + $mid .= " AND lc.`group_id` IN ( ".implode( ',',array_fill ( 0, count( $groups ),'?' ) )." )"; + $bindVars = array_merge( $bindVars, $groups ); + } + if( !empty( $pListHash['content_type_guid'] ) ) { $mid .= " AND lc.`content_type_guid`=? "; array_push( $bindVars, $pListHash['content_type_guid'] ); |
