summaryrefslogtreecommitdiffstats
path: root/application/modules
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules')
-rw-r--r--application/modules/user/controllers/FilterController.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/application/modules/user/controllers/FilterController.php b/application/modules/user/controllers/FilterController.php
index 88c7668..444a33a 100644
--- a/application/modules/user/controllers/FilterController.php
+++ b/application/modules/user/controllers/FilterController.php
@@ -174,6 +174,25 @@ class User_FilterController extends Zend_Controller_Action
}
}
}
+
+ // $parent is the parent of the children we want to see
+ // $level is increased when we go deeper into the tree
+ private function display_children($parent, $level, &$data) {
+ // retrieve all children of $parent
+ $result = mysql_query('SELECT groupID FROM pbs_groupgroups '.
+ 'WHERE parentID="'.$parent.'";');
+
+ // display each child
+ while ($row = mysql_fetch_array($result)) {
+ // indent and display the title of this child
+ $data[$level][] = str_repeat(' ',$level).$row['title'];
+
+ // call this function again to display this
+ // child's children
+ $data = display_children($row['title'], $level+1,$data);
+ }
+ return $data;
+ }
private function prepareFormData(){
$poolMapper = new Application_Model_PoolMapper();