Skip to content
Permalink
Browse files

Fix show obsolete versions

Fix version_get_all_rows for a default parameter value of "null".
Regression caused by 46c77ac

Fixes: #25661
  • Loading branch information...
cproensa authored and dregad committed Mar 28, 2019
1 parent 934c01d commit f82e32fad7113655077a5dc1cc8b4d1f4cb29cd3
Showing with 6 additions and 2 deletions.
  1. +6 −2 core/version_api.php
@@ -492,7 +492,11 @@ function version_remove_all( $p_project_id ) {
* Return all versions for the specified project or projects list
* Returned versions are ordered by reverse 'date_order'
* @param integer|array $p_project_ids A valid project id, or array of ids
* @param boolean $p_released Whether to include released versions.
* @param boolean $p_released Whether to show only released, unreleased, or both.
* For this parameter, use constants defined as:
* VERSION_ALL (null): returns any
* VERSION_FUTURE (false): returns only unreleased versions
* VERSION_RELEASED (true): returns only released versions
* @param boolean $p_obsolete Whether to include obsolete versions.
* @param boolean $p_inherit True to include versions from parent projects,
* false not to, or null to use configuration
@@ -530,7 +534,7 @@ function version_get_all_rows( $p_project_ids, $p_released = null, $p_obsolete =
if( !empty( $g_cache_versions_project[$t_project_id]) ) {
foreach( $g_cache_versions_project[$t_project_id] as $t_id ) {
$t_version_row = version_cache_row( $t_id );
if( $p_obsolete == false && (int)$t_version_row['obsolete'] == 1 ) {
if( $p_obsolete === false && (int)$t_version_row['obsolete'] == 1 ) {
continue;
}
if( $p_released !== null ) {

0 comments on commit f82e32f

Please sign in to comment.
You can’t perform that action at this time.