summaryrefslogtreecommitdiff
path: root/Pigeonholes.php
diff options
context:
space:
mode:
authorSylvie Greverend <sylvieg@users.sourceforge.net>2006-04-18 21:39:44 +0000
committerSylvie Greverend <sylvieg@users.sourceforge.net>2006-04-18 21:39:44 +0000
commitcd1973538e38347dcdcb9dc0c7e274a9ddc9dd7c (patch)
treee5cc4da7b7f04834f98c96ada26664ba93c4fb2d /Pigeonholes.php
parent3983ac8ae4e22f1dcbc4205eb0a12cba9da7a1fe (diff)
downloadpigeonholes-cd1973538e38347dcdcb9dc0c7e274a9ddc9dd7c.tar.gz
pigeonholes-cd1973538e38347dcdcb9dc0c7e274a9ddc9dd7c.tar.bz2
pigeonholes-cd1973538e38347dcdcb9dc0c7e274a9ddc9dd7c.zip
new param to getList to look only in a set of brothers
Diffstat (limited to 'Pigeonholes.php')
-rw-r--r--Pigeonholes.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/Pigeonholes.php b/Pigeonholes.php
index 812ac6d..3e341bd 100644
--- a/Pigeonholes.php
+++ b/Pigeonholes.php
@@ -1,6 +1,6 @@
-<?php
+<<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_pigeonholes/Pigeonholes.php,v 1.52 2006/04/14 20:25:52 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_pigeonholes/Pigeonholes.php,v 1.53 2006/04/18 21:39:44 sylvieg Exp $
*
* +----------------------------------------------------------------------+
* | Copyright ( c ) 2004, bitweaver.org
@@ -17,7 +17,7 @@
* Pigeonholes class
*
* @author xing <xing@synapse.plus.com>
- * @version $Revision: 1.52 $
+ * @version $Revision: 1.53 $
* @package pigeonholes
*/
@@ -318,6 +318,7 @@ class Pigeonholes extends LibertyAttachable {
* @param $pListHash[max_rows] maximum number of rows to return
* @param $pListHash[offset] number of results data is offset by
* @param $pListHash[title] pigeonhole name
+ * @param $pListHash[parent_id] pigeonhole parent_id, optional
* @return array of pigeonholes in 'data' and count of pigeonholes in 'cant'
* @access public
**/
@@ -351,6 +352,12 @@ class Pigeonholes extends LibertyAttachable {
$bindVars[] = $pListHash['title'];
}
+ if ( isset( $pListHash['parent_id'] ) ) {
+ $where .= empty( $where ) ? ' WHERE ' : ' AND ';
+ $where .= ' ls.`parent_id` = ? ';
+ $bindVars[] = $pListHash['parent_id'];
+ }
+
if( !empty( $pListHash['sort_mode'] ) ) {
$order .= " ORDER BY ".$this->mDb->convert_sortmode( $pListHash['sort_mode'] )." ";
} else {