Skip to content

Commit

Permalink
Fix include errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
vboctor committed Apr 17, 2014
1 parent 91c05ff commit 6ddbb97
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
13 changes: 10 additions & 3 deletions core.php
Expand Up @@ -74,7 +74,9 @@
require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'config_defaults_inc.php' );

# Load user-defined constants (if required)
@include_once( $g_config_path . 'custom_constants_inc.php' );
if ( file_exists( $g_config_path . 'custom_constants_inc.php' ) ) {
include_once( $g_config_path . 'custom_constants_inc.php' );
}

# Remember (globally) which API files have already been loaded
$g_api_included = array();
Expand Down Expand Up @@ -187,7 +189,9 @@ function __autoload( $className ) {
# config_inc may not be present if this is a new install
$t_config_inc_found = file_exists( $g_config_path . 'config_inc.php' );

@include_once( $g_config_path . 'config_inc.php' );
if ( $t_config_inc_found ) {
include_once( $g_config_path . 'config_inc.php' );
}

# If no configuration file exists, redirect the user to the admin page so
# they can complete installation and configuration of MantisBT
Expand Down Expand Up @@ -273,7 +277,10 @@ function __autoload( $className ) {

# Load custom functions
require_api( 'custom_function_api.php' );
@include_once( $g_config_path . 'custom_functions_inc.php' );

if ( file_exists( $g_config_path . 'custom_functions_inc.php' ) ) {
include_once( $g_config_path . 'custom_functions_inc.php' );
}

# Set HTTP response headers
require_api( 'http_api.php' );
Expand Down
5 changes: 4 additions & 1 deletion core/lang_api.php
Expand Up @@ -78,7 +78,10 @@ function lang_load( $p_lang, $p_dir = null ) {
# custom_strings_inc.php can use $g_active_language.
# Include file multiple times to allow for overrides per language.
global $g_config_path;
@include( $g_config_path . 'custom_strings_inc.php' );

if ( file_exists( $g_config_path . 'custom_strings_inc.php' ) ) {
include( $g_config_path . 'custom_strings_inc.php' );
}

$t_vars = get_defined_vars();

Expand Down

0 comments on commit 6ddbb97

Please sign in to comment.