From: <gi...@ma...> - 2010-01-17 12:55:04
|
The branch, master-1.2.x has been updated via 4dfa13341720dd7974c2df6b113d3f697463270c (commit) from b9bd739473f77e0c6ad4cd4dc76259c86e70bd45 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4dfa13341720dd7974c2df6b113d3f697463270c Author: David Hicks <hic...@op...> Date: Sun Jan 17 23:30:28 2010 +1100 Remove duplicate checks that are performed in project_hierarchy_cache ----------------------------------------------------------------------- Summary of changes: core/project_hierarchy_api.php | 16 ++++------------ 1 files changed, 4 insertions(+), 12 deletions(-) ----------------------------------------------------------------------- commit 4dfa13341720dd7974c2df6b113d3f697463270c Author: David Hicks <hic...@op...> Date: Sun Jan 17 23:30:28 2010 +1100 Remove duplicate checks that are performed in project_hierarchy_cache diff --git a/core/project_hierarchy_api.php b/core/project_hierarchy_api.php index 5188080..75e6131 100644 --- a/core/project_hierarchy_api.php +++ b/core/project_hierarchy_api.php @@ -120,9 +120,7 @@ function project_hierarchy_remove_all( $p_project_id ) { function project_hierarchy_is_toplevel( $p_project_id, $p_show_disabled = false ) { global $g_cache_project_hierarchy; - if( ( null === $g_cache_project_hierarchy ) || ( $p_show_disabled ) ) { - project_hierarchy_cache( $p_show_disabled ); - } + project_hierarchy_cache( $p_show_disabled ); if( isset( $g_cache_project_hierarchy[ALL_PROJECTS] ) ) { return in_array( $p_project_id, $g_cache_project_hierarchy[ALL_PROJECTS] ); @@ -200,9 +198,7 @@ function project_hierarchy_cache( $p_show_disabled = false ) { function project_hierarchy_inherit_parent( $p_child_id, $p_parent_id, $p_show_disabled = false ) { global $g_cache_project_inheritance; - if( ( null === $g_cache_project_inheritance ) || ( $p_show_disabled ) ) { - project_hierarchy_cache( $p_show_disabled ); - } + project_hierarchy_cache( $p_show_disabled ); return in_array( $p_parent_id, $g_cache_project_inheritance[$p_child_id] ); } @@ -217,9 +213,7 @@ function project_hierarchy_inherit_parent( $p_child_id, $p_parent_id, $p_show_di function project_hierarchy_inheritance( $p_project_id, $p_show_disabled = false ) { global $g_cache_project_inheritance; - if( ( null === $g_cache_project_inheritance ) || ( $p_show_disabled ) ) { - project_hierarchy_cache( $p_show_disabled ); - } + project_hierarchy_cache( $p_show_disabled ); $t_project_ids = array( (int) $p_project_id, @@ -258,9 +252,7 @@ function project_hierarchy_inheritance( $p_project_id, $p_show_disabled = false function project_hierarchy_get_subprojects( $p_project_id, $p_show_disabled = false ) { global $g_cache_project_hierarchy; - if( ( null === $g_cache_project_hierarchy ) || ( $p_show_disabled ) ) { - project_hierarchy_cache( $p_show_disabled ); - } + project_hierarchy_cache( $p_show_disabled ); if( isset( $g_cache_project_hierarchy[$p_project_id] ) ) { return $g_cache_project_hierarchy[$p_project_id]; ----------------------------------------------------------------------- -- Mantis Bug Tracker |