summaryrefslogtreecommitdiff
path: root/LibertyContent.php
diff options
context:
space:
mode:
Diffstat (limited to 'LibertyContent.php')
-rw-r--r--LibertyContent.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/LibertyContent.php b/LibertyContent.php
index 2e25ff1..790b99f 100644
--- a/LibertyContent.php
+++ b/LibertyContent.php
@@ -3,7 +3,7 @@
* Management of Liberty content
*
* @package liberty
-* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.397 2009/03/31 06:35:40 lsces Exp $
+* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.398 2009/04/02 16:53:27 tekimaki_admin Exp $
* @author spider <spider@steelsun.com>
*/
@@ -2287,6 +2287,7 @@ class LibertyContent extends LibertyBase {
}
}
+ // join on specific content_type_guids
if( !empty( $pListHash['content_type_guid'] ) && is_string( $pListHash['content_type_guid'] ) ) {
$whereSql .= ' AND lc.`content_type_guid`=? ';
$bindVars[] = $pListHash['content_type_guid'];
@@ -2295,6 +2296,15 @@ class LibertyContent extends LibertyBase {
$bindVars = array_merge( $bindVars, $pListHash['content_type_guid'] );
}
+ // exclude by content_type_guids
+ if( !empty( $pListHash['exclude_content_type_guid'] ) && is_string( $pListHash['exclude_content_type_guid'] ) ) {
+ $whereSql .= " AND lc.`content_type_guid` != ?";
+ $bindVars[] = $pListHash['exclude_content_type_guid'];
+ } elseif( !empty( $pListHash['exclude_content_type_guid'] ) && is_array( $pListHash['exclude_content_type_guid'] ) ) {
+ $whereSql .= " AND lc.`content_type_guid` NOT IN ( ".implode( ',',array_fill ( 0, count( $pListHash['exclude_content_type_guid'] ),'?' ) )." )";
+ $bindVars = array_merge( $bindVars, $pListHash['exclude_content_type_guid'] );
+ }
+
// only display content modified more recently than this (UTC timestamp)
if( !empty( $pListHash['from_date'] ) ) {
$whereSql .= ' AND lc.`last_modified` >= ?';