Skip to content

Commit

Permalink
following giallu's change to use set_include_path to set first requir…
Browse files Browse the repository at this point in the history
…e directory as core dir, we no longer need to use core path in require_once
  • Loading branch information
mantis committed May 26, 2009
1 parent ffc522c commit c36df5b
Show file tree
Hide file tree
Showing 185 changed files with 381 additions and 709 deletions.
10 changes: 4 additions & 6 deletions account_manage_columns_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path . 'authentication_api.php' );
require_once( $t_core_path . 'columns_api.php' );
require_once( $t_core_path . 'custom_field_api.php' );
require_once( $t_core_path . 'helper_api.php' );
require_once( 'authentication_api.php' );
require_once( 'columns_api.php' );
require_once( 'custom_field_api.php' );
require_once( 'helper_api.php' );

html_page_top( lang_get( 'manage_columns_config' ) );

Expand Down
4 changes: 1 addition & 3 deletions account_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'current_user_api.php' );
require_once( 'current_user_api.php' );

#============ Parameters ============
# (none)
Expand Down
3 changes: 1 addition & 2 deletions account_prefs_inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
/**
* MantisBT Core API's
*/
$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'user_pref_api.php' );
require_once( 'user_pref_api.php' );

function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_accounts_menu = true, $p_redirect_url = '') {
if ( null === $p_user_id ) {
Expand Down
4 changes: 1 addition & 3 deletions account_prefs_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'current_user_api.php' );
require_once( 'current_user_api.php' );

#============ Parameters ============
# (none)
Expand Down
4 changes: 1 addition & 3 deletions account_prefs_reset.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'user_pref_api.php' );
require_once( 'user_pref_api.php' );

#============ Parameters ============
$f_user_id = gpc_get_int( 'user_id' );
Expand Down
4 changes: 1 addition & 3 deletions account_prefs_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'user_pref_api.php' );
require_once( 'user_pref_api.php' );

# helper_ensure_post();

Expand Down
6 changes: 2 additions & 4 deletions account_prof_edit_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'current_user_api.php' );
require_once( $t_core_path.'profile_api.php' );
require_once( 'current_user_api.php' );
require_once( 'profile_api.php' );

auth_ensure_user_authenticated();

Expand Down
4 changes: 1 addition & 3 deletions account_prof_menu_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

if ( isset( $g_global_profiles ) ) {
$g_global_profiles = true;
} else {
$g_global_profiles = false;
}

require_once( $t_core_path.'current_user_api.php' );
require_once( 'current_user_api.php' );

auth_ensure_user_authenticated();

Expand Down
4 changes: 1 addition & 3 deletions account_prof_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'profile_api.php' );
require_once( 'profile_api.php' );

form_security_validate('profile_update');

Expand Down
4 changes: 1 addition & 3 deletions account_sponsor_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'current_user_api.php' );
require_once( 'current_user_api.php' );

if ( config_get( 'enable_sponsorship' ) == OFF ) {
trigger_error( ERROR_SPONSORSHIP_NOT_ENABLED, ERROR );
Expand Down
4 changes: 1 addition & 3 deletions account_sponsor_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'email_api.php' );
require_once( 'email_api.php' );

# helper_ensure_post();

Expand Down
4 changes: 1 addition & 3 deletions account_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'email_api.php' );
require_once( 'email_api.php' );

form_security_validate('account_update');

Expand Down
2 changes: 0 additions & 2 deletions adm_config_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

access_ensure_project_level( config_get( 'view_configuration_threshold' ) );

$t_core_path = config_get( 'core_path' );

html_page_top( lang_get( 'configuration_report' ) );

print_manage_menu( 'adm_config_report.php' );
Expand Down
2 changes: 0 additions & 2 deletions adm_config_set.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

# helper_ensure_post();

$f_user_id = gpc_get_int( 'user_id' );
Expand Down
2 changes: 0 additions & 2 deletions adm_permissions_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

access_ensure_project_level( config_get( 'view_configuration_threshold' ) );

$t_core_path = config_get( 'core_path' );

html_page_top( lang_get( 'permissions_summary_report' ) );

print_manage_menu( 'adm_permissions_report.php' );
Expand Down
8 changes: 3 additions & 5 deletions admin/check.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@
*/
require_once( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'core.php' );

$t_core_path = config_get_global( 'core_path' );

require_once( $t_core_path . 'email_api.php' );
require_once( $t_core_path . 'database_api.php' );
require_once( 'email_api.php' );
require_once( 'database_api.php' );

define( 'BAD', 0 );
define( 'GOOD', 1 );
Expand Down Expand Up @@ -238,7 +236,7 @@ function test_database_utf8() {
}


require_once( $t_core_path . 'obsolete.php' );
require_once( 'obsolete.php' );

html_page_top( 'MantisBT Administration - Check Installation' );

Expand Down
2 changes: 0 additions & 2 deletions admin/test_email.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

access_ensure_global_level( ADMINISTRATOR );

$t_core_path = config_get( 'core_path' );

$f_mail_test = gpc_get_bool( 'mail_test' );

html_page_top();
Expand Down
2 changes: 0 additions & 2 deletions admin/test_icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

access_ensure_global_level( ADMINISTRATOR );

$t_core_path = config_get( 'core_path' );

html_page_top();

foreach( $g_file_type_icons as $t_ext => $t_filename ) {
Expand Down
4 changes: 1 addition & 3 deletions billing_inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@
* @link http://www.mantisbt.org
*/

$t_core_path = config_get( 'core_path' );

/**
* Requires bugnote API
*/
require_once( $t_core_path.'bugnote_api.php' );
require_once( 'bugnote_api.php' );

if ( !config_get('time_tracking_enabled') )
return;
Expand Down
1 change: 0 additions & 1 deletion billing_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );
access_ensure_global_level( config_get( 'time_tracking_reporting_threshold' ) );

html_page_top( lang_get( 'time_tracking_billing_link' ) );
Expand Down
4 changes: 1 addition & 3 deletions bug_actiongroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'bug_api.php' );
require_once( 'bug_api.php' );

auth_ensure_user_authenticated();
helper_begin_long_process();
Expand Down
4 changes: 1 addition & 3 deletions bug_actiongroup_attach_tags_inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
* @link http://www.mantisbt.org
*/

$t_core_path = config_get( 'core_path' );

/**
* Requires Tag API
*/
require_once( $t_core_path . 'tag_api.php' );
require_once( 'tag_api.php' );

/**
* Prints the title for the custom action page.
Expand Down
6 changes: 2 additions & 4 deletions bug_actiongroup_ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path . 'bug_api.php' );
require_once( $t_core_path . 'bug_group_action_api.php' );
require_once( 'bug_api.php' );
require_once( 'bug_group_action_api.php' );

auth_ensure_user_authenticated();

Expand Down
2 changes: 1 addition & 1 deletion bug_actiongroup_ext_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
require_once( 'core.php' );

require_once( $t_core_path.'bug_group_action_api.php' );
require_once( 'bug_group_action_api.php' );

auth_ensure_user_authenticated();

Expand Down
2 changes: 1 addition & 1 deletion bug_actiongroup_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
require_once( 'core.php' );

require_once( $t_core_path.'bug_group_action_api.php' );
require_once( 'bug_group_action_api.php' );

auth_ensure_user_authenticated();

Expand Down
4 changes: 1 addition & 3 deletions bug_assign.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'bug_api.php' );
require_once( 'bug_api.php' );

# helper_ensure_post();

Expand Down
4 changes: 1 addition & 3 deletions bug_assign_reporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'bug_api.php' );
require_once( 'bug_api.php' );

# helper_ensure_post();

Expand Down
8 changes: 3 additions & 5 deletions bug_change_status_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@
$g_allow_browser_cache = 1;
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );
require_once( 'bug_api.php' );
require_once( 'custom_field_api.php' );

require_once( $t_core_path.'bug_api.php' );
require_once( $t_core_path.'custom_field_api.php' );

require_once( $t_core_path.'relationship_api.php' );
require_once( 'relationship_api.php' );
?>
<?php
$f_bug_id = gpc_get_int( 'bug_id' );
Expand Down
4 changes: 1 addition & 3 deletions bug_file_add.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'file_api.php' );
require_once( 'file_api.php' );

# helper_ensure_post();

Expand Down
4 changes: 1 addition & 3 deletions bug_file_delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'file_api.php' );
require_once( 'file_api.php' );

# helper_ensure_post();

Expand Down
3 changes: 1 addition & 2 deletions bug_file_upload_inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
* @link http://www.mantisbt.org
*/

$t_core_path = config_get( 'core_path' );
require_once( $t_core_path.'file_api.php' );
require_once( 'file_api.php' );

# check if we can allow the upload... bail out if we can't
if ( !file_allow_bug_upload( $f_bug_id ) ) {
Expand Down
6 changes: 2 additions & 4 deletions bug_graph_bycategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'class.period.php' );
require_once( $t_core_path.'graph_api.php' );
require_once( 'class.period.php' );
require_once( 'graph_api.php' );

access_ensure_project_level( config_get( 'view_summary_threshold' ) );

Expand Down
6 changes: 2 additions & 4 deletions bug_graph_bystatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'class.period.php' );
require_once( $t_core_path.'graph_api.php' );
require_once( 'class.period.php' );
require_once( 'graph_api.php' );

access_ensure_project_level( config_get( 'view_summary_threshold' ) );

Expand Down
3 changes: 1 addition & 2 deletions bug_graph_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
*/
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );
require_once( $t_core_path.'class.period.php' );
require_once( 'class.period.php' );

access_ensure_project_level( config_get( 'view_summary_threshold' ) );

Expand Down
Loading

0 comments on commit c36df5b

Please sign in to comment.