Index: core/filter_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/filter_api.php,v
retrieving revision 1.122.2.2.2.3
diff -u -r1.122.2.2.2.3 filter_api.php
--- core/filter_api.php 12 Dec 2005 02:46:19 -0000 1.122.2.2.2.3
+++ core/filter_api.php 2 Mar 2006 14:19:37 -0000
@@ -311,6 +311,15 @@
}
}
+ # by Mike
+ if( $t_filter['show_children'] == 'off' ) {
+ $t_relationship_type = 2;
+ $t_sub_query_relationship = "SELECT DISTINCT $t_bug_table.id FROM $t_bug_relationship_table, $t_bug_table WHERE ($t_bug_table.id=$t_bug_relationship_table.destination_bug_id) AND ($t_bug_relationship_table.relationship_type=$t_relationship_type)";
+
+ $t_filter_children = "($t_bug_table.id NOT IN ($t_sub_query_relationship))";
+
+ array_push( $t_where_clauses, $t_filter_children);
+ }
# show / hide status
# take a list of all available statuses then remove the ones that we want hidden, then make sure
# the ones we want shown are still available
@@ -1377,9 +1386,9 @@