summaryrefslogtreecommitdiff
path: root/Pigeonholes.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-09-08 20:29:12 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-09-08 20:29:12 +0000
commitc1031b76d63d8ef4cf791e1b012aee14d5f1ac66 (patch)
treea6e62dc9f0644acb8cfbaca8c645b6391457557e /Pigeonholes.php
parentc4abd2f83650be11c9a2fc94945caf370debc1a3 (diff)
downloadpigeonholes-c1031b76d63d8ef4cf791e1b012aee14d5f1ac66.tar.gz
pigeonholes-c1031b76d63d8ef4cf791e1b012aee14d5f1ac66.tar.bz2
pigeonholes-c1031b76d63d8ef4cf791e1b012aee14d5f1ac66.zip
some cleanup in getContentList(), fix syntax and clean up in get_content.php, use more generic keys and add some docs all over the place
Diffstat (limited to 'Pigeonholes.php')
-rw-r--r--Pigeonholes.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/Pigeonholes.php b/Pigeonholes.php
index 8b970b1..1ce6c78 100644
--- a/Pigeonholes.php
+++ b/Pigeonholes.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_pigeonholes/Pigeonholes.php,v 1.68 2006/09/08 16:36:53 bitweaver Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_pigeonholes/Pigeonholes.php,v 1.69 2006/09/08 20:29:12 squareing Exp $
*
* +----------------------------------------------------------------------+
* | Copyright ( c ) 2004, bitweaver.org
@@ -17,7 +17,7 @@
* Pigeonholes class
*
* @author xing <xing@synapse.plus.com>
- * @version $Revision: 1.68 $
+ * @version $Revision: 1.69 $
* @package pigeonholes
*/
@@ -988,22 +988,23 @@ function pigeonholes_content_store( $pObject, $pParamHash ) {
}
}
}
+
/**
* filter the search with pigeonholes
* @param $pParamHash['pigeonholes'] - a pigeonhole or an array of pigeonhole content_id
**/
-function pigeonholes_content_list_sql ( &$pObject, $pParamHash = '') {
+function pigeonholes_content_list_sql( &$pObject, $pParamHash = NULL ) {
global $gBitSystem;
$ret = array();
- if( /*$gBitSystem->isFeatureActive( 'pigeonholes_categorize_'.$pObject->getContentType() ) && */ !empty( $pParamHash['pigeonholes'] ) ) {
- if ( is_array( $pParamHash['pigeonholes'] ) ) {
+ if( /*$gBitSystem->isFeatureActive( 'pigeonholes_categorize_'.$pObject->getContentType() ) && */ !empty( $pParamHash['category_filter'] ) ) {
+ if ( is_array( $pParamHash['category_filter'] ) ) {
$ret['join_sql'] = "LEFT JOIN `".BIT_DB_PREFIX."pigeonhole_members` pm ON (lc .`content_id`= pm.`content_id`)";
- $ret['where_sql'] = ' AND pm.`parent_id` in ('.implode( ',', array_fill(0, count( $pParamHash['pigeonholes'] ), '?' ) ).')';
- $ret['bind_vars'] = $pParamHash['pigeonholes'];
+ $ret['where_sql'] = ' AND pm.`parent_id` in ('.implode( ',', array_fill(0, count( $pParamHash['category_filter'] ), '?' ) ).')';
+ $ret['bind_vars'] = $pParamHash['category_filter'];
} else {
$ret['join_sql'] = "LEFT JOIN `".BIT_DB_PREFIX."pigeonhole_members` pm ON (lc .`content_id`= pm.`content_id`)";
$ret['where_sql'] = " AND pm.`parent_id`=? ";
- $ret['bind_vars'][] = $pParamHash['pigeonholes'];
+ $ret['bind_vars'][] = $pParamHash['category_filter'];
}
}
return $ret;