summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTekimaki <tekimaki_admin@users.sourceforge.net>2009-04-02 16:53:27 +0000
committerTekimaki <tekimaki_admin@users.sourceforge.net>2009-04-02 16:53:27 +0000
commit8b4bc4431f50a5442344b3159e12329c3ebb36a9 (patch)
tree02c2f7e5c38ece1eda7d9e46aad5f61739d2f1b9
parente02cddb21b487603381a63096f4cad5b78e0058b (diff)
downloadliberty-8b4bc4431f50a5442344b3159e12329c3ebb36a9.tar.gz
liberty-8b4bc4431f50a5442344b3159e12329c3ebb36a9.tar.bz2
liberty-8b4bc4431f50a5442344b3159e12329c3ebb36a9.zip
add option to mod list results by excluding by content_type_guid -- move out of group to liberty
-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` >= ?';