Skip to content

Commit

Permalink
Use config_get_global to access subprojects_enabled
Browse files Browse the repository at this point in the history
Issue #27884
  • Loading branch information
atrol committed Jan 30, 2021
1 parent 981dbd7 commit 8bf578e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/commands/ProjectHierarchyAddCommand.php
Expand Up @@ -58,7 +58,7 @@ function __construct( array $p_data ) {
* Validate the data.
*/
function validate() {
if ( config_get( 'subprojects_enabled' ) == OFF ) {
if ( config_get_global( 'subprojects_enabled' ) == OFF ) {
throw new ClientException(
'Project hierarchy (subprojects) is disabled',
ERROR_PROJECT_HIERARCHY_DISABLED );
Expand Down
2 changes: 1 addition & 1 deletion core/commands/ProjectHierarchyDeleteCommand.php
Expand Up @@ -53,7 +53,7 @@ function __construct( array $p_data ) {
* Validate the data.
*/
function validate() {
if ( config_get( 'subprojects_enabled' ) == OFF ) {
if ( config_get_global( 'subprojects_enabled' ) == OFF ) {
throw new ClientException(
'Project hierarchy (subprojects) is disabled',
ERROR_PROJECT_HIERARCHY_DISABLED );
Expand Down
2 changes: 1 addition & 1 deletion core/commands/ProjectHierarchyUpdateCommand.php
Expand Up @@ -61,7 +61,7 @@ function __construct( array $p_data ) {
* Validate the data.
*/
function validate() {
if ( config_get( 'subprojects_enabled' ) == OFF ) {
if ( config_get_global( 'subprojects_enabled' ) == OFF ) {
throw new ClientException(
'Project hierarchy (subprojects) is disabled',
ERROR_PROJECT_HIERARCHY_DISABLED );
Expand Down
2 changes: 1 addition & 1 deletion core/print_api.php
Expand Up @@ -643,7 +643,7 @@ function print_project_option_list( $p_project_id = null, $p_include_all_project
* @return void
*/
function print_subproject_option_list( $p_parent_id, $p_project_id = null, $p_filter_project_id = null, $p_trace = false, $p_can_report_only = false, array $p_parents = array() ) {
if ( config_get( 'subprojects_enabled' ) == OFF ) {
if ( config_get_global( 'subprojects_enabled' ) == OFF ) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion manage_proj_edit_page.php
Expand Up @@ -227,7 +227,7 @@
</div>

<?php
if ( config_get( 'subprojects_enabled') == ON ) {
if ( config_get_global( 'subprojects_enabled') == ON ) {
?>
<!-- SUBPROJECTS -->
<div class="col-md-12 col-xs-12">
Expand Down

0 comments on commit 8bf578e

Please sign in to comment.