Skip to content
This repository was archived by the owner on Nov 19, 2023. It is now read-only.

Commit c5614ea

Browse files
committed
Use config_get_global for default_home_page
Issue #23626
1 parent bc0fb1e commit c5614ea

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

core/access_api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function access_denied() {
9292
print_link_button( auth_login_page( 'return=' . $t_return_page ), lang_get( 'click_to_login' ) );
9393
echo '</p><p class="center">';
9494
print_link_button(
95-
helper_mantis_url( config_get( 'default_home_page' ) ),
95+
helper_mantis_url( config_get_global( 'default_home_page' ) ),
9696
lang_get( 'proceed' )
9797
);
9898
echo '</p>';
@@ -102,7 +102,7 @@ function access_denied() {
102102
layout_admin_page_begin();
103103
echo '<div class="space-10"></div>';
104104
html_operation_failure(
105-
helper_mantis_url( config_get( 'default_home_page' ) ),
105+
helper_mantis_url( config_get_global( 'default_home_page' ) ),
106106
error_string( ERROR_ACCESS_DENIED )
107107
);
108108
layout_admin_page_end();

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
require_api( 'print_api.php' );
3535

3636
if( auth_is_user_authenticated() ) {
37-
print_header_redirect( config_get( 'default_home_page' ) );
37+
print_header_redirect( config_get_global( 'default_home_page' ) );
3838
} else {
3939
print_header_redirect( auth_login_page() );
4040
}

login.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
$f_username = gpc_get_string( 'username', '' );
4545
$f_password = gpc_get_string( 'password', '' );
46-
$t_return = string_url( string_sanitize_url( gpc_get_string( 'return', config_get( 'default_home_page' ) ) ) );
46+
$t_return = string_url( string_sanitize_url( gpc_get_string( 'return', config_get_global( 'default_home_page' ) ) ) );
4747
$f_from = gpc_get_string( 'from', '' );
4848
$f_secure_session = gpc_get_bool( 'secure_session', false );
4949
$f_reauthenticate = gpc_get_bool( 'reauthenticate', false );

login_page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
if( !is_blank( $f_return ) ) {
8787
print_header_redirect( $f_return, false, false, true );
8888
} else {
89-
print_header_redirect( config_get( 'default_home_page' ) );
89+
print_header_redirect( config_get_global( 'default_home_page' ) );
9090
}
9191
}
9292

login_password_page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
if( !is_blank( $f_return ) ) {
122122
print_header_redirect( $f_return, false, false, true );
123123
} else {
124-
print_header_redirect( config_get( 'default_home_page' ) );
124+
print_header_redirect( config_get_global( 'default_home_page' ) );
125125
}
126126
}
127127

manage_user_impersonate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
form_security_purge( 'manage_user_impersonate' );
5151

52-
$t_redirect_to = config_get( 'default_home_page' );
52+
$t_redirect_to = config_get_global( 'default_home_page' );
5353

5454
layout_page_header();
5555

set_project.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@
7878
if( !is_blank( $c_ref ) ) {
7979
$t_redirect_url = $c_ref;
8080
} else if( !isset( $_SERVER['HTTP_REFERER'] ) || is_blank( $_SERVER['HTTP_REFERER'] ) ) {
81-
$t_redirect_url = config_get( 'default_home_page' );
81+
$t_redirect_url = config_get_global( 'default_home_page' );
8282
} else {
83-
$t_home_page = config_get( 'default_home_page' );
83+
$t_home_page = config_get_global( 'default_home_page' );
8484

8585
# Check that referrer matches our address after squashing case (case insensitive compare)
8686
$t_path = rtrim( config_get_global( 'path' ), '/' );

tests/test_config_get_set.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@
3939
print_r( $t_test );
4040

4141
$t_config = 'default_home_page';
42-
$t_test = config_get( $t_config );
42+
$t_test = config_get_global( $t_config );
4343
print_r( $t_config );
4444
print_r( $t_test );
4545
$t_test .= '?test';
46-
config_set( $t_config, $t_test );
47-
$t_test = config_get( $t_config );
46+
config_set_global( $t_config, $t_test );
47+
$t_test = config_get_global( $t_config );
4848
print_r( $t_test );
4949

5050
$g_test_config = array();

0 commit comments

Comments
 (0)