From: <pri...@us...> - 2007-10-31 23:07:25
|
Revision: 4691 http://mantisbt.svn.sourceforge.net/mantisbt/?rev=4691&view=rev Author: prichards Date: 2007-10-31 16:07:21 -0700 (Wed, 31 Oct 2007) Log Message: ----------- config_get(*_table) can be config_get_global as these values can not be stored in the database. Modified Paths: -------------- trunk/mantisbt/admin/db_stats.php trunk/mantisbt/admin/schema.php trunk/mantisbt/admin/upgrade_unattended.php trunk/mantisbt/api/soap/mc_api.php trunk/mantisbt/api/soap/mc_compat_api.php trunk/mantisbt/api/soap/mc_file_api.php trunk/mantisbt/api/soap/mc_issue_api.php trunk/mantisbt/core/access_api.php trunk/mantisbt/core/authentication_api.php trunk/mantisbt/core/bug_api.php trunk/mantisbt/core/bugnote_api.php trunk/mantisbt/core/category_api.php trunk/mantisbt/core/custom_field_api.php trunk/mantisbt/core/email_api.php trunk/mantisbt/core/email_queue_api.php trunk/mantisbt/core/file_api.php trunk/mantisbt/core/filter_api.php trunk/mantisbt/core/graph_api.php trunk/mantisbt/core/history_api.php trunk/mantisbt/core/html_api.php trunk/mantisbt/core/news_api.php trunk/mantisbt/core/print_api.php trunk/mantisbt/core/profile_api.php trunk/mantisbt/core/project_api.php trunk/mantisbt/core/project_hierarchy_api.php trunk/mantisbt/core/relationship_api.php trunk/mantisbt/core/sponsorship_api.php trunk/mantisbt/core/summary_api.php trunk/mantisbt/core/tag_api.php trunk/mantisbt/core/tokens_api.php trunk/mantisbt/core/user_api.php trunk/mantisbt/core/user_pref_api.php trunk/mantisbt/core/version_api.php trunk/mantisbt/print_all_bug_page_word.php trunk/mantisbt/print_bug_page.php trunk/mantisbt/print_bugnote_inc.php trunk/mantisbt/proj_doc_delete.php trunk/mantisbt/proj_doc_edit_page.php trunk/mantisbt/proj_doc_page.php trunk/mantisbt/proj_doc_update.php trunk/mantisbt/roadmap_page.php trunk/mantisbt/summary_page.php Modified: trunk/mantisbt/admin/db_stats.php =================================================================== --- trunk/mantisbt/admin/db_stats.php 2007-10-31 23:06:31 UTC (rev 4690) +++ trunk/mantisbt/admin/db_stats.php 2007-10-31 23:07:21 UTC (rev 4691) @@ -48,32 +48,32 @@ echo '<h1>Mantis Database Statistics</h1>'; # echo '<table border="1" width="50%" cellpadding="3" cellspacing="0">'; - print_table_stats( config_get( 'mantis_bug_file_table' ) ); - print_table_stats( config_get( 'mantis_bug_history_table' ) ); - print_table_stats( config_get( 'mantis_bug_monitor_table' ) ); - print_table_stats( config_get( 'mantis_bug_relationship_table' ) ); - print_table_stats( config_get( 'mantis_bug_table' ) ); - print_table_stats( config_get( 'mantis_bug_text_table' ) ); - print_table_stats( config_get( 'mantis_bugnote_table' ) ); - print_table_stats( config_get( 'mantis_bugnote_text_table' ) ); - print_table_stats( config_get( 'mantis_config_table' ) ); - print_table_stats( config_get( 'mantis_custom_field_project_table' ) ); - print_table_stats( config_get( 'mantis_custom_field_string_table' ) ); - print_table_stats( config_get( 'mantis_custom_field_table' ) ); - print_table_stats( config_get( 'mantis_filters_table' ) ); - print_table_stats( config_get( 'mantis_news_table' ) ); - print_table_stats( config_get( 'mantis_project_category_table' ) ); - print_table_stats( config_get( 'mantis_project_file_table' ) ); - print_table_stats( config_get( 'mantis_project_hierarchy_table' ) ); - print_table_stats( config_get( 'mantis_project_table' ) ); - print_table_stats( config_get( 'mantis_project_user_list_table' ) ); - print_table_stats( config_get( 'mantis_project_version_table' ) ); - print_table_stats( config_get( 'mantis_sponsorship_table' ) ); - print_table_stats( config_get( 'mantis_tokens_table' ) ); - print_table_stats( config_get( 'mantis_user_pref_table' ) ); - print_table_stats( config_get( 'mantis_user_print_pref_table' ) ); - print_table_stats( config_get( 'mantis_user_profile_table' ) ); - print_table_stats( config_get( 'mantis_user_table' ) ); + print_table_stats( config_get_global( 'mantis_bug_file_table' ) ); + print_table_stats( config_get_global( 'mantis_bug_history_table' ) ); + print_table_stats( config_get_global( 'mantis_bug_monitor_table' ) ); + print_table_stats( config_get_global( 'mantis_bug_relationship_table' ) ); + print_table_stats( config_get_global( 'mantis_bug_table' ) ); + print_table_stats( config_get_global( 'mantis_bug_text_table' ) ); + print_table_stats( config_get_global( 'mantis_bugnote_table' ) ); + print_table_stats( config_get_global( 'mantis_bugnote_text_table' ) ); + print_table_stats( config_get_global( 'mantis_config_table' ) ); + print_table_stats( config_get_global( 'mantis_custom_field_project_table' ) ); + print_table_stats( config_get_global( 'mantis_custom_field_string_table' ) ); + print_table_stats( config_get_global( 'mantis_custom_field_table' ) ); + print_table_stats( config_get_global( 'mantis_filters_table' ) ); + print_table_stats( config_get_global( 'mantis_news_table' ) ); + print_table_stats( config_get_global( 'mantis_project_category_table' ) ); + print_table_stats( config_get_global( 'mantis_project_file_table' ) ); + print_table_stats( config_get_global( 'mantis_project_hierarchy_table' ) ); + print_table_stats( config_get_global( 'mantis_project_table' ) ); + print_table_stats( config_get_global( 'mantis_project_user_list_table' ) ); + print_table_stats( config_get_global( 'mantis_project_version_table' ) ); + print_table_stats( config_get_global( 'mantis_sponsorship_table' ) ); + print_table_stats( config_get_global( 'mantis_tokens_table' ) ); + print_table_stats( config_get_global( 'mantis_user_pref_table' ) ); + print_table_stats( config_get_global( 'mantis_user_print_pref_table' ) ); + print_table_stats( config_get_global( 'mantis_user_profile_table' ) ); + print_table_stats( config_get_global( 'mantis_user_table' ) ); # echo '</table>'; echo '</body></html>'; Modified: trunk/mantisbt/admin/schema.php =================================================================== --- trunk/mantisbt/admin/schema.php 2007-10-31 23:06:31 UTC (rev 4690) +++ trunk/mantisbt/admin/schema.php 2007-10-31 23:07:21 UTC (rev 4691) @@ -30,7 +30,7 @@ # An update identifier is inferred from the ordering of this table. ONLY ADD NEW CHANGES TO THE # END OF THE TABLE!!! -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_config_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_config_table')," config_id C(64) NOTNULL PRIMARY, project_id I DEFAULT '0' PRIMARY, user_id I DEFAULT '0' PRIMARY, @@ -38,8 +38,8 @@ type I DEFAULT '90', value XL NOTNULL", Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_config',config_get('mantis_config_table'),'config_id')); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_bug_file_table')," +$upgrade[] = Array('CreateIndexSQL',Array('idx_config',config_get_global('mantis_config_table'),'config_id')); +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_bug_file_table')," id I UNSIGNED NOTNULL PRIMARY AUTOINCREMENT, bug_id I UNSIGNED NOTNULL DEFAULT '0', title C(250) NOTNULL DEFAULT \" '' \", @@ -52,8 +52,8 @@ date_added T NOTNULL DEFAULT '1970-01-01 00:00:01', content B NOTNULL ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_bug_file_bug_id',config_get('mantis_bug_file_table'),'bug_id')); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_bug_history_table')," +$upgrade[] = Array('CreateIndexSQL',Array('idx_bug_file_bug_id',config_get_global('mantis_bug_file_table'),'bug_id')); +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_bug_history_table')," id I UNSIGNED NOTNULL PRIMARY AUTOINCREMENT, user_id I UNSIGNED NOTNULL DEFAULT '0', bug_id I UNSIGNED NOTNULL DEFAULT '0', @@ -63,21 +63,21 @@ new_value C(128) NOTNULL DEFAULT \" '' \", type I2 NOTNULL DEFAULT '0' ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_bug_history_bug_id',config_get('mantis_bug_history_table'),'bug_id')); -$upgrade[] = Array('CreateIndexSQL',Array('idx_history_user_id',config_get('mantis_bug_history_table'),'user_id')); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_bug_monitor_table')," +$upgrade[] = Array('CreateIndexSQL',Array('idx_bug_history_bug_id',config_get_global('mantis_bug_history_table'),'bug_id')); +$upgrade[] = Array('CreateIndexSQL',Array('idx_history_user_id',config_get_global('mantis_bug_history_table'),'user_id')); +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_bug_monitor_table')," user_id I UNSIGNED NOTNULL PRIMARY DEFAULT '0', bug_id I UNSIGNED NOTNULL PRIMARY DEFAULT '0' ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_bug_relationship_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_bug_relationship_table')," id I UNSIGNED NOTNULL AUTOINCREMENT PRIMARY, source_bug_id I UNSIGNED NOTNULL DEFAULT '0', destination_bug_id I UNSIGNED NOTNULL DEFAULT '0', relationship_type I2 NOTNULL DEFAULT '0' ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_relationship_source',config_get('mantis_bug_relationship_table'),'source_bug_id')); -$upgrade[] = Array('CreateIndexSQL',Array('idx_relationship_destination',config_get('mantis_bug_relationship_table'),'destination_bug_id')); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_bug_table')," +$upgrade[] = Array('CreateIndexSQL',Array('idx_relationship_source',config_get_global('mantis_bug_relationship_table'),'source_bug_id')); +$upgrade[] = Array('CreateIndexSQL',Array('idx_relationship_destination',config_get_global('mantis_bug_relationship_table'),'destination_bug_id')); +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_bug_table')," id I UNSIGNED PRIMARY NOTNULL AUTOINCREMENT, project_id I UNSIGNED NOTNULL DEFAULT '0', reporter_id I UNSIGNED NOTNULL DEFAULT '0', @@ -106,17 +106,17 @@ sponsorship_total I NOTNULL DEFAULT '0', sticky L NOTNULL DEFAULT \"'0'\" ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_bug_sponsorship_total',config_get('mantis_bug_table'),'sponsorship_total')); -$upgrade[] = Array('CreateIndexSQL',Array('idx_bug_fixed_in_version',config_get('mantis_bug_table'),'fixed_in_version')); -$upgrade[] = Array('CreateIndexSQL',Array('idx_bug_status',config_get('mantis_bug_table'),'status')); -$upgrade[] = Array('CreateIndexSQL',Array('idx_project',config_get('mantis_bug_table'),'project_id')); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_bug_text_table')," +$upgrade[] = Array('CreateIndexSQL',Array('idx_bug_sponsorship_total',config_get_global('mantis_bug_table'),'sponsorship_total')); +$upgrade[] = Array('CreateIndexSQL',Array('idx_bug_fixed_in_version',config_get_global('mantis_bug_table'),'fixed_in_version')); +$upgrade[] = Array('CreateIndexSQL',Array('idx_bug_status',config_get_global('mantis_bug_table'),'status')); +$upgrade[] = Array('CreateIndexSQL',Array('idx_project',config_get_global('mantis_bug_table'),'project_id')); +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_bug_text_table')," id I PRIMARY UNSIGNED NOTNULL AUTOINCREMENT, description XL NOTNULL, steps_to_reproduce XL NOTNULL, additional_information XL NOTNULL ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_bugnote_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_bugnote_table')," id I UNSIGNED PRIMARY NOTNULL AUTOINCREMENT, bug_id I UNSIGNED NOTNULL DEFAULT '0', reporter_id I UNSIGNED NOTNULL DEFAULT '0', @@ -127,24 +127,24 @@ note_type I DEFAULT '0', note_attr C(250) DEFAULT \" '' \" ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_bug',config_get('mantis_bugnote_table'),'bug_id')); -$upgrade[] = Array('CreateIndexSQL',Array('idx_last_mod',config_get('mantis_bugnote_table'),'last_modified')); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_bugnote_text_table')," +$upgrade[] = Array('CreateIndexSQL',Array('idx_bug',config_get_global('mantis_bugnote_table'),'bug_id')); +$upgrade[] = Array('CreateIndexSQL',Array('idx_last_mod',config_get_global('mantis_bugnote_table'),'last_modified')); +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_bugnote_text_table')," id I UNSIGNED NOTNULL PRIMARY AUTOINCREMENT, note XL NOTNULL ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_custom_field_project_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_custom_field_project_table')," field_id I NOTNULL PRIMARY DEFAULT '0', project_id I UNSIGNED PRIMARY NOTNULL DEFAULT '0', sequence I2 NOTNULL DEFAULT '0' ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_custom_field_string_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_custom_field_string_table')," field_id I NOTNULL PRIMARY DEFAULT '0', bug_id I NOTNULL PRIMARY DEFAULT '0', value C(255) NOTNULL DEFAULT \" '' \" ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_custom_field_bug',config_get('mantis_custom_field_string_table'),'bug_id')); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_custom_field_table')," +$upgrade[] = Array('CreateIndexSQL',Array('idx_custom_field_bug',config_get_global('mantis_custom_field_string_table'),'bug_id')); +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_custom_field_table')," id I NOTNULL PRIMARY AUTOINCREMENT, name C(64) NOTNULL DEFAULT \" '' \", type I2 NOTNULL DEFAULT '0', @@ -165,8 +165,8 @@ display_closed L NOTNULL DEFAULT \" '0' \", require_closed L NOTNULL DEFAULT \" '0' \" ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_custom_field_name',config_get('mantis_custom_field_table'),'name')); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_filters_table')," +$upgrade[] = Array('CreateIndexSQL',Array('idx_custom_field_name',config_get_global('mantis_custom_field_table'),'name')); +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_filters_table')," id I UNSIGNED NOTNULL PRIMARY AUTOINCREMENT, user_id I NOTNULL DEFAULT '0', project_id I NOTNULL DEFAULT '0', @@ -174,7 +174,7 @@ name C(64) NOTNULL DEFAULT \" '' \", filter_string XL NOTNULL ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_news_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_news_table')," id I UNSIGNED PRIMARY NOTNULL AUTOINCREMENT, project_id I UNSIGNED NOTNULL DEFAULT '0', poster_id I UNSIGNED NOTNULL DEFAULT '0', @@ -185,12 +185,12 @@ headline C(64) NOTNULL DEFAULT \" '' \", body XL NOTNULL ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_project_category_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_project_category_table')," project_id I UNSIGNED NOTNULL PRIMARY DEFAULT '0', category C(64) NOTNULL PRIMARY DEFAULT \" '' \", user_id I UNSIGNED NOTNULL DEFAULT '0' ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_project_file_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_project_file_table')," id I UNSIGNED NOTNULL PRIMARY AUTOINCREMENT, project_id I UNSIGNED NOTNULL DEFAULT '0', title C(250) NOTNULL DEFAULT \" '' \", @@ -203,11 +203,11 @@ date_added T NOTNULL DEFAULT '1970-01-01 00:00:01', content B NOTNULL ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_project_hierarchy_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_project_hierarchy_table')," child_id I UNSIGNED NOTNULL, parent_id I UNSIGNED NOTNULL", Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_project_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_project_table')," id I UNSIGNED PRIMARY NOTNULL AUTOINCREMENT, name C(128) NOTNULL DEFAULT \" '' \", status I2 NOTNULL DEFAULT '10', @@ -217,16 +217,16 @@ file_path C(250) NOTNULL DEFAULT \" '' \", description XL NOTNULL ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_project_id',config_get('mantis_project_table'),'id')); -$upgrade[] = Array('CreateIndexSQL',Array('idx_project_name',config_get('mantis_project_table'),'name',Array('UNIQUE'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_project_view',config_get('mantis_project_table'),'view_state')); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_project_user_list_table')," +$upgrade[] = Array('CreateIndexSQL',Array('idx_project_id',config_get_global('mantis_project_table'),'id')); +$upgrade[] = Array('CreateIndexSQL',Array('idx_project_name',config_get_global('mantis_project_table'),'name',Array('UNIQUE'))); +$upgrade[] = Array('CreateIndexSQL',Array('idx_project_view',config_get_global('mantis_project_table'),'view_state')); +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_project_user_list_table')," project_id I UNSIGNED PRIMARY NOTNULL DEFAULT '0', user_id I UNSIGNED PRIMARY NOTNULL DEFAULT '0', access_level I2 NOTNULL DEFAULT '10' ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array( 'CreateIndexSQL',Array('idx_project_user',config_get('mantis_project_user_list_table'),'user_id')); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_project_version_table')," +$upgrade[] = Array( 'CreateIndexSQL',Array('idx_project_user',config_get_global('mantis_project_user_list_table'),'user_id')); +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_project_version_table')," id I NOTNULL PRIMARY AUTOINCREMENT, project_id I UNSIGNED NOTNULL DEFAULT '0', version C(64) NOTNULL DEFAULT \" '' \", @@ -234,8 +234,8 @@ description XL NOTNULL, released L NOTNULL DEFAULT \" '1' \" ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_project_version',config_get('mantis_project_version_table'),'project_id,version',Array('UNIQUE'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_sponsorship_table')," +$upgrade[] = Array('CreateIndexSQL',Array('idx_project_version',config_get_global('mantis_project_version_table'),'project_id,version',Array('UNIQUE'))); +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_sponsorship_table')," id I NOTNULL PRIMARY AUTOINCREMENT, bug_id I NOTNULL DEFAULT '0', user_id I NOTNULL DEFAULT '0', @@ -246,9 +246,9 @@ date_submitted T NOTNULL DEFAULT '1970-01-01 00:00:01', last_updated T NOTNULL DEFAULT '1970-01-01 00:00:01' ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_sponsorship_bug_id',config_get('mantis_sponsorship_table'),'bug_id')); -$upgrade[] = Array('CreateIndexSQL',Array('idx_sponsorship_user_id',config_get('mantis_sponsorship_table'),'user_id')); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_tokens_table')," +$upgrade[] = Array('CreateIndexSQL',Array('idx_sponsorship_bug_id',config_get_global('mantis_sponsorship_table'),'bug_id')); +$upgrade[] = Array('CreateIndexSQL',Array('idx_sponsorship_user_id',config_get_global('mantis_sponsorship_table'),'user_id')); +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_tokens_table')," id I NOTNULL PRIMARY AUTOINCREMENT, owner I NOTNULL, type I NOTNULL, @@ -256,7 +256,7 @@ expiry T, value XL NOTNULL", Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_user_pref_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_user_pref_table')," id I UNSIGNED NOTNULL PRIMARY AUTOINCREMENT, user_id I UNSIGNED NOTNULL DEFAULT '0', project_id I UNSIGNED NOTNULL DEFAULT '0', @@ -289,11 +289,11 @@ email_bugnote_limit I2 NOTNULL DEFAULT '0', language C(32) NOTNULL DEFAULT 'english' ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_user_print_pref_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_user_print_pref_table')," user_id I UNSIGNED NOTNULL PRIMARY DEFAULT '0', print_pref C(27) NOTNULL DEFAULT \" '' \" ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_user_profile_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_user_profile_table')," id I UNSIGNED NOTNULL PRIMARY AUTOINCREMENT, user_id I UNSIGNED NOTNULL DEFAULT '0', platform C(32) NOTNULL DEFAULT \" '' \", @@ -301,7 +301,7 @@ os_build C(32) NOTNULL DEFAULT \" '' \", description XL NOTNULL ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_user_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_user_table')," id I UNSIGNED NOTNULL PRIMARY AUTOINCREMENT, username C(32) NOTNULL DEFAULT \" '' \", realname C(64) NOTNULL DEFAULT \" '' \", @@ -317,18 +317,18 @@ failed_login_count I2 NOTNULL DEFAULT '0', cookie_string C(64) NOTNULL DEFAULT \" '' \" ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_user_cookie_string',config_get('mantis_user_table'),'cookie_string',Array('UNIQUE'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_user_username',config_get('mantis_user_table'),'username',Array('UNIQUE'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_enable',config_get('mantis_user_table'),'enabled')); -$upgrade[] = Array('CreateIndexSQL',Array('idx_access',config_get('mantis_user_table'),'access_level')); -$upgrade[] = Array('InsertData', Array( config_get('mantis_user_table'), +$upgrade[] = Array('CreateIndexSQL',Array('idx_user_cookie_string',config_get_global('mantis_user_table'),'cookie_string',Array('UNIQUE'))); +$upgrade[] = Array('CreateIndexSQL',Array('idx_user_username',config_get_global('mantis_user_table'),'username',Array('UNIQUE'))); +$upgrade[] = Array('CreateIndexSQL',Array('idx_enable',config_get_global('mantis_user_table'),'enabled')); +$upgrade[] = Array('CreateIndexSQL',Array('idx_access',config_get_global('mantis_user_table'),'access_level')); +$upgrade[] = Array('InsertData', Array( config_get_global('mantis_user_table'), "(username, realname, email, password, date_created, last_visit, enabled, protected, access_level, login_count, lost_password_request_count, failed_login_count, cookie_string) VALUES ('administrator', '', 'root@localhost', '63a9f0ea7bb98050796b649e85481845', " . db_now() . ", " . db_now() . ", '1', '0', 90, 3, 0, 0, '" . md5( mt_rand( 0, mt_getrandmax() ) + mt_rand( 0, mt_getrandmax() ) ) . md5( time() ) . "')" ) ); -$upgrade[] = Array('AlterColumnSQL', Array( config_get( 'mantis_bug_history_table' ), "old_value C(255) NOTNULL" ) ); -$upgrade[] = Array('AlterColumnSQL', Array( config_get( 'mantis_bug_history_table' ), "new_value C(255) NOTNULL" ) ); +$upgrade[] = Array('AlterColumnSQL', Array( config_get_global( 'mantis_bug_history_table' ), "old_value C(255) NOTNULL" ) ); +$upgrade[] = Array('AlterColumnSQL', Array( config_get_global( 'mantis_bug_history_table' ), "new_value C(255) NOTNULL" ) ); -$upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_email_table')," +$upgrade[] = Array('CreateTableSQL',Array(config_get_global('mantis_email_table')," email_id I UNSIGNED NOTNULL PRIMARY AUTOINCREMENT, email C(64) NOTNULL DEFAULT \" '' \", subject C(250) NOTNULL DEFAULT \" '' \", @@ -336,16 +336,16 @@ metadata XL NOTNULL, body XL NOTNULL ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS'))); -$upgrade[] = Array('CreateIndexSQL',Array('idx_email_id',config_get('mantis_email_table'),'email_id')); -$upgrade[] = Array('AddColumnSQL',Array(config_get('mantis_bug_table'), "target_version C(64) NOTNULL DEFAULT \" '' \"")); -$upgrade[] = Array('AddColumnSQL',Array(config_get('mantis_bugnote_table'), "time_tracking I UNSIGNED NOTNULL DEFAULT \" 0 \"")); -$upgrade[] = Array('CreateIndexSQL',Array('idx_diskfile',config_get('mantis_bug_file_table'),'diskfile')); -$upgrade[] = Array('AlterColumnSQL', Array( config_get( 'mantis_user_print_pref_table' ), "print_pref C(64) NOTNULL" ) ); -$upgrade[] = Array('AlterColumnSQL', Array( config_get( 'mantis_bug_history_table' ), "field_name C(64) NOTNULL" ) ); +$upgrade[] = Array('CreateIndexSQL',Array('idx_email_id',config_get_global('mantis_email_table'),'email_id')); +$upgrade[] = Array('AddColumnSQL',Array(config_get_global('mantis_bug_table'), "target_version C(64) NOTNULL DEFAULT \" '' \"")); +$upgrade[] = Array('AddColumnSQL',Array(config_get_global('mantis_bugnote_table'), "time_tracking I UNSIGNED NOTNULL DEFAULT \" 0 \"")); +$upgrade[] = Array('CreateIndexSQL',Array('idx_diskfile',config_get_global('mantis_bug_file_table'),'diskfile')); +$upgrade[] = Array('AlterColumnSQL', Array( config_get_global( 'mantis_user_print_pref_table' ), "print_pref C(64) NOTNULL" ) ); +$upgrade[] = Array('AlterColumnSQL', Array( config_get_global( 'mantis_bug_history_table' ), "field_name C(64) NOTNULL" ) ); # Release marker: 1.1.0a4 -$upgrade[] = Array('CreateTableSQL', Array( config_get( 'mantis_tag_table' ), " +$upgrade[] = Array('CreateTableSQL', Array( config_get_global( 'mantis_tag_table' ), " id I UNSIGNED NOTNULL PRIMARY AUTOINCREMENT, user_id I UNSIGNED NOTNULL DEFAULT '0', name C(100) NOTNULL PRIMARY DEFAULT \" '' \", @@ -353,12 +353,12 @@ date_created T NOTNULL DEFAULT '1970-01-01 00:00:01', date_updated T NOTNULL DEFAULT '1970-01-01 00:00:01' ", Array( 'mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS' ) ) ); -$upgrade[] = Array('CreateTableSQL', Array( config_get( 'mantis_bug_tag_table' ), " +$upgrade[] = Array('CreateTableSQL', Array( config_get_global( 'mantis_bug_tag_table' ), " bug_id I UNSIGNED NOTNULL PRIMARY DEFAULT '0', tag_id I UNSIGNED NOTNULL PRIMARY DEFAULT '0', user_id I UNSIGNED NOTNULL DEFAULT '0', date_attached T NOTNULL DEFAULT '1970-01-01 00:00:01' ", Array( 'mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS' ) ) ); -$upgrade[] = Array('CreateIndexSQL', Array( 'idx_typeowner', config_get( 'mantis_tokens_table' ), 'type, owner' ) ); +$upgrade[] = Array('CreateIndexSQL', Array( 'idx_typeowner', config_get_global( 'mantis_tokens_table' ), 'type, owner' ) ); ?> Modified: trunk/mantisbt/admin/upgrade_unattended.php =================================================================== --- trunk/mantisbt/admin/upgrade_unattended.php 2007-10-31 23:06:31 UTC (rev 4690) +++ trunk/mantisbt/admin/upgrade_unattended.php 2007-10-31 23:07:21 UTC (rev 4691) @@ -71,9 +71,9 @@ # check to see if the new installer was used if ( -1 == config_get( 'database_version', -1 ) ) { # Old database detected: run the old style upgrade set - if ( ! db_table_exists( config_get( 'mantis_upgrade_table' ) ) ) { + if ( ! db_table_exists( config_get_global( 'mantis_upgrade_table' ) ) ) { # Create the upgrade table if it does not exist - $query = "CREATE TABLE " . config_get( 'mantis_upgrade_table' ) . + $query = "CREATE TABLE " . config_get_global( 'mantis_upgrade_table' ) . "(upgrade_id char(20) NOT NULL, description char(255) NOT NULL, PRIMARY KEY (upgrade_id))"; Modified: trunk/mantisbt/api/soap/mc_api.php =================================================================== --- trunk/mantisbt/api/soap/mc_api.php 2007-10-31 23:06:31 UTC (rev 4690) +++ trunk/mantisbt/api/soap/mc_api.php 2007-10-31 23:07:21 UTC (rev 4691) @@ -249,7 +249,7 @@ # -------------------- # category_get_all_rows did't respect subprojects. function mci_category_get_all_rows( $p_project_id, $p_user_id ) { - $t_mantis_project_category_table = config_get( 'mantis_project_category_table' ); + $t_mantis_project_category_table = config_get_global( 'mantis_project_category_table' ); $c_project_id = db_prepare_int( $p_project_id ); Modified: trunk/mantisbt/api/soap/mc_compat_api.php =================================================================== --- trunk/mantisbt/api/soap/mc_compat_api.php 2007-10-31 23:06:31 UTC (rev 4690) +++ trunk/mantisbt/api/soap/mc_compat_api.php 2007-10-31 23:07:21 UTC (rev 4691) @@ -25,8 +25,8 @@ $c_type = db_prepare_int( $p_type ); $c_attr = db_prepare_string( $p_attr ); - $t_bugnote_text_table = config_get( 'mantis_bugnote_text_table' ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_bugnote_text_table = config_get_global( 'mantis_bugnote_text_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); # insert bugnote text $query = "INSERT INTO $t_bugnote_text_table @@ -90,7 +90,7 @@ $c_bug_id = db_prepare_int( $p_issue_id ); - $t_bug_file_table = config_get( 'mantis_bug_file_table' ); + $t_bug_file_table = config_get_global( 'mantis_bug_file_table' ); $query = "SELECT id, title, diskfile, filename, filesize, file_type, date_added FROM $t_bug_file_table @@ -159,8 +159,8 @@ if ( !function_exists( 'bugnote_get_all_bugnotes' ) ) { function bugnote_get_all_bugnotes( $p_bug_id, $p_user_bugnote_order, $p_user_bugnote_limit ) { $c_bug_id = db_prepare_int( $p_bug_id ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); - $t_bugnote_text_table = config_get( 'mantis_bugnote_text_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); + $t_bugnote_text_table = config_get_global( 'mantis_bugnote_text_table' ); if ( 0 == $p_user_bugnote_limit ) { ## Show all bugnotes $t_bugnote_limit = -1; @@ -228,7 +228,7 @@ $t_released_where = "AND ( released = $c_released )"; } - $t_project_version_table = config_get( 'mantis_project_version_table' ); + $t_project_version_table = config_get_global( 'mantis_project_version_table' ); $query = "SELECT * FROM $t_project_version_table @@ -257,7 +257,7 @@ function project_get_id_by_name( $p_project_name ) { $c_project_name = db_prepare_string( $p_project_name ); - $t_project_table = config_get( 'mantis_project_table' ); + $t_project_table = config_get_global( 'mantis_project_table' ); $query = "SELECT id FROM $t_project_table WHERE name = '$c_project_name'"; $t_result = db_query( $query, 1 ); @@ -273,7 +273,7 @@ # -------------------- # In 0.19.0 this api has no parameters in Mantis, in 0.19.1-cvs, I changed it to the current implementation. function mci_filter_db_get_available_queries( $p_project_id = null, $p_user_id = null ) { - $t_filters_table = config_get( 'mantis_filters_table' ); + $t_filters_table = config_get_global( 'mantis_filters_table' ); $t_overall_query_arr = array(); if ( null === $p_project_id ) { Modified: trunk/mantisbt/api/soap/mc_file_api.php =================================================================== --- trunk/mantisbt/api/soap/mc_file_api.php 2007-10-31 23:06:31 UTC (rev 4690) +++ trunk/mantisbt/api/soap/mc_file_api.php 2007-10-31 23:07:21 UTC (rev 4691) @@ -118,7 +118,7 @@ break; } - $t_file_table = config_get( 'mantis_' . $p_table . '_file_table' ); + $t_file_table = config_get_global( 'mantis_' . $p_table . '_file_table' ); $c_id = ( 'bug' == $p_table ) ? $c_issue_id : $c_project_id; $query = "INSERT INTO $t_file_table (" . $p_table . "_id, title, description, diskfile, filename, folder, filesize, file_type, date_added, content) @@ -145,13 +145,13 @@ $query = ''; switch ( $p_type ) { case 'bug': - $t_bug_file_table = config_get( 'mantis_bug_file_table' ); + $t_bug_file_table = config_get_global( 'mantis_bug_file_table' ); $query = "SELECT * FROM $t_bug_file_table WHERE id='$p_file_id'"; break; case 'doc': - $t_project_file_table = config_get( 'mantis_project_file_table' ); + $t_project_file_table = config_get_global( 'mantis_project_file_table' ); $query = "SELECT * FROM $t_project_file_table WHERE id='$p_file_id'"; Modified: trunk/mantisbt/api/soap/mc_issue_api.php =================================================================== --- trunk/mantisbt/api/soap/mc_issue_api.php 2007-10-31 23:06:31 UTC (rev 4690) +++ trunk/mantisbt/api/soap/mc_issue_api.php 2007-10-31 23:07:21 UTC (rev 4691) @@ -346,7 +346,7 @@ return new soap_fault( 'Client', '', 'Access Denied' ); } - $t_bug_table = config_get( 'mantis_bug_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); $c_summary = db_prepare_string( $p_summary ); @@ -863,7 +863,7 @@ relationship_add( $p_issue_id, $t_dest_issue_id, $t_rel_type['id'] ); // The above function call into Mantis doesn't seem to return a valid BugRelationshipData object. // So we call db_insert_id in order to find the id of the created relationship. - $t_relationship_id = db_insert_id( config_get( 'mantis_bug_relationship_table' ) ); + $t_relationship_id = db_insert_id( config_get_global( 'mantis_bug_relationship_table' ) ); # Add log line to the history (both bugs) history_log_event_special( $p_issue_id, BUG_ADD_RELATIONSHIP, $t_rel_type['id'], $t_dest_issue_id ); Modified: trunk/mantisbt/core/access_api.php =================================================================== --- trunk/mantisbt/core/access_api.php 2007-10-31 23:06:31 UTC (rev 4690) +++ trunk/mantisbt/core/access_api.php 2007-10-31 23:07:21 UTC (rev 4691) @@ -94,7 +94,7 @@ } if ( !in_array( (int)$p_project_id, $g_cache_access_matrix_project_ids ) ) { - $t_project_user_list_table = config_get( 'mantis_project_user_list_table' ); + $t_project_user_list_table = config_get_global( 'mantis_project_user_list_table' ); $query = "SELECT user_id, access_level FROM $t_project_user_list_table @@ -128,7 +128,7 @@ $c_user_id = db_prepare_int( $p_user_id ); if ( !in_array( (int)$p_user_id, $g_cache_access_matrix_user_ids ) ) { - $t_project_user_list_table = config_get( 'mantis_project_user_list_table' ); + $t_project_user_list_table = config_get_global( 'mantis_project_user_list_table' ); $query = "SELECT project_id, access_level FROM $t_project_user_list_table Modified: trunk/mantisbt/core/authentication_api.php =================================================================== --- trunk/mantisbt/core/authentication_api.php 2007-10-31 23:06:31 UTC (rev 4690) +++ trunk/mantisbt/core/authentication_api.php 2007-10-31 23:07:21 UTC (rev 4691) @@ -360,7 +360,7 @@ # -------------------- # Return true if the cookie login identifier is unique, false otherwise function auth_is_cookie_string_unique( $p_cookie_string ) { - $t_user_table = config_get( 'mantis_user_table' ); + $t_user_table = config_get_global( 'mantis_user_table' ); $query = "SELECT COUNT(*) FROM $t_user_table @@ -402,7 +402,7 @@ if ( $g_cache_anonymous_user_cookie_string === null ) { if ( function_exists( 'db_is_connected' ) && db_is_connected() ) { # get anonymous information if database is available - $query = 'SELECT id, cookie_string FROM ' . config_get( 'mantis_user_table' ) . ' WHERE username = ' . db_param(0); + $query = 'SELECT id, cookie_string FROM ' . config_get_global( 'mantis_user_table' ) . ' WHERE username = ' . db_param(0); $result = db_query_bound( $query, Array( config_get( 'anonymous_account' ) ) ); if ( 1 == db_num_rows( $result ) ) { @@ -566,7 +566,7 @@ } # look up cookie in the database to see if it is valid - $t_user_table = config_get( 'mantis_user_table' ); + $t_user_table = config_get_global( 'mantis_user_table' ); $query = "SELECT id FROM $t_user_table @@ -590,7 +590,7 @@ return $g_cache_current_user_id; } - $t_user_table = config_get( 'mantis_user_table' ); + $t_user_table = config_get_global( 'mantis_user_table' ); $t_cookie_string = auth_get_current_user_cookie(); Modified: trunk/mantisbt/core/bug_api.php =================================================================== --- trunk/mantisbt/core/bug_api.php 2007-10-31 23:06:31 UTC (rev 4690) +++ trunk/mantisbt/core/bug_api.php 2007-10-31 23:07:21 UTC (rev 4691) @@ -124,7 +124,7 @@ } $c_bug_id = (int) $p_bug_id; - $t_bug_table = config_get( 'mantis_bug_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); $query = "SELECT * FROM $t_bug_table @@ -188,8 +188,8 @@ global $g_cache_bug_text; $c_bug_id = (int) $p_bug_id; - $t_bug_table = config_get( 'mantis_bug_table' ); - $t_bug_text_table = config_get( 'mantis_bug_text_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); + $t_bug_text_table = config_get_global( 'mantis_bug_text_table' ); if ( isset ( $g_cache_bug_text[$c_bug_id] ) ) { return $g_cache_bug_text[$c_bug_id]; @@ -390,9 +390,9 @@ $c_target_version = ''; } - $t_bug_table = config_get( 'mantis_bug_table' ); - $t_bug_text_table = config_get( 'mantis_bug_text_table' ); - $t_project_category_table = config_get( 'mantis_project_category_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); + $t_bug_text_table = config_get_global( 'mantis_bug_text_table' ); + $t_project_category_table = config_get_global( 'mantis_project_category_table' ); # Insert text information $query = "INSERT INTO $t_bug_text_table @@ -485,12 +485,12 @@ $p_copy_history = false, $p_copy_attachments = false, $p_copy_bugnotes = false, $p_copy_monitoring_users = false ) { global $g_db; - $t_mantis_custom_field_string_table = config_get( 'mantis_custom_field_string_table' ); - $t_mantis_bug_file_table = config_get( 'mantis_bug_file_table' ); - $t_mantis_bugnote_table = config_get( 'mantis_bugnote_table' ); - $t_mantis_bugnote_text_table = config_get( 'mantis_bugnote_text_table' ); - $t_mantis_bug_monitor_table = config_get( 'mantis_bug_monitor_table' ); - $t_mantis_bug_history_table = config_get( 'mantis_bug_history_table' ); + $t_mantis_custom_field_string_table = config_get_global( 'mantis_custom_field_string_table' ); + $t_mantis_bug_file_table = config_get_global( 'mantis_bug_file_table' ); + $t_mantis_bugnote_table = config_get_global( 'mantis_bugnote_table' ); + $t_mantis_bugnote_text_table = config_get_global( 'mantis_bugnote_text_table' ); + $t_mantis_bug_monitor_table = config_get_global( 'mantis_bug_monitor_table' ); + $t_mantis_bug_history_table = config_get_global( 'mantis_bug_history_table' ); $t_mantis_db = $g_db; $t_bug_id = db_prepare_int( $p_bug_id ); @@ -684,8 +684,8 @@ # used in bug_delete.php & mass treatments function bug_delete( $p_bug_id ) { $c_bug_id = db_prepare_int( $p_bug_id ); - $t_bug_table = config_get( 'mantis_bug_table' ); - $t_bug_text_table = config_get( 'mantis_bug_text_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); + $t_bug_text_table = config_get_global( 'mantis_bug_text_table' ); # call pre-deletion custom function helper_call_custom_function( 'issue_delete_validate', array( $p_bug_id ) ); @@ -750,7 +750,7 @@ function bug_delete_all( $p_project_id ) { $c_project_id = db_prepare_int( $p_project_id ); - $t_bug_table = config_get( 'mantis_bug_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); $query = "SELECT id FROM $t_bug_table @@ -799,7 +799,7 @@ $t_old_data = bug_get( $p_bug_id, true ); - $t_bug_table = config_get( 'mantis_bug_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); # Update all fields # Ignore date_submitted and last_updated since they are pulled out @@ -872,7 +872,7 @@ # Update extended info if requested if ( $p_update_extended ) { - $t_bug_text_table = config_get( 'mantis_bug_text_table' ); + $t_bug_text_table = config_get_global( 'mantis_bug_text_table' ); $t_bug_text_id = bug_get_field( $p_bug_id, 'bug_text_id' ); @@ -1026,7 +1026,7 @@ $t_restriction = ''; } - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); $query = "SELECT COUNT(*) FROM $t_bugnote_table WHERE bug_id =" . db_param(0) . " $t_restriction"; @@ -1040,7 +1040,7 @@ # associated wiht the bug was modified function bug_get_newest_bugnote_timestamp( $p_bug_id ) { $c_bug_id = db_prepare_int( $p_bug_id ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); $query = "SELECT last_modified FROM $t_bugnote_table @@ -1074,7 +1074,7 @@ return $t_stats; } - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); $query = "SELECT last_modified FROM $t_bugnote_table @@ -1103,7 +1103,7 @@ $c_bug_id = db_prepare_int( $p_bug_id ); - $t_bug_file_table = config_get( 'mantis_bug_file_table' ); + $t_bug_file_table = config_get_global( 'mantis_bug_file_table' ); $query = "SELECT id, title, diskfile, filename, filesize, file_type, date_added FROM $t_bug_file_table @@ -1143,7 +1143,7 @@ return true; } - $t_bug_table = config_get( 'mantis_bug_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); # Update fields $query = "UPDATE $t_bug_table @@ -1183,7 +1183,7 @@ $t_ass_val = $h_status; } - $t_bug_table = config_get( 'mantis_bug_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); if ( ( $t_ass_val != $h_status ) || ( $p_user_id != $h_handler_id ) ) { @@ -1339,7 +1339,7 @@ function bug_update_date( $p_bug_id ) { $c_bug_id = db_prepare_int( $p_bug_id ); - $t_bug_table = config_get( 'mantis_bug_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); $query = "UPDATE $t_bug_table SET last_updated= " . db_now() . " @@ -1362,7 +1362,7 @@ return true; } - $t_bug_monitor_table = config_get( 'mantis_bug_monitor_table' ); + $t_bug_monitor_table = config_get_global( 'mantis_bug_monitor_table' ); # Insert monitoring record $query ="INSERT ". @@ -1385,7 +1385,7 @@ $c_bug_id = db_prepare_int( $p_bug_id ); $c_user_id = db_prepare_int( $p_user_id ); - $t_bug_monitor_table = config_get( 'mantis_bug_monitor_table' ); + $t_bug_monitor_table = config_get_global( 'mantis_bug_monitor_table' ); # Delete monitoring record $query ="DELETE ". Modified: trunk/mantisbt/core/bugnote_api.php =================================================================== --- trunk/mantisbt/core/bugnote_api.php 2007-10-31 23:06:31 UTC (rev 4690) +++ trunk/mantisbt/core/bugnote_api.php 2007-10-31 23:07:21 UTC (rev 4691) @@ -56,7 +56,7 @@ # return true if the bugnote exists, false otherwise function bugnote_exists( $p_bugnote_id ) { $c_bugnote_id = db_prepare_int( $p_bugnote_id ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); $query = "SELECT COUNT(*) FROM $t_bugnote_table @@ -107,8 +107,8 @@ $c_type = db_prepare_int( $p_type ); $c_attr = db_prepare_string( $p_attr ); - $t_bugnote_text_table = config_get( 'mantis_bugnote_text_table' ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_bugnote_text_table = config_get_global( 'mantis_bugnote_text_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); # insert bugnote text $query = "INSERT INTO $t_bugnote_text_table @@ -160,8 +160,8 @@ $c_bugnote_id = db_prepare_int( $p_bugnote_id ); $t_bug_id = bugnote_get_field( $p_bugnote_id, 'bug_id' ); $t_bugnote_text_id = bugnote_get_field( $p_bugnote_id, 'bugnote_text_id' ); - $t_bugnote_text_table = config_get( 'mantis_bugnote_text_table' ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_bugnote_text_table = config_get_global( 'mantis_bugnote_text_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); # Remove the bugnote $query = "DELETE FROM $t_bugnote_table @@ -183,8 +183,8 @@ # delete all bugnotes associated with the given bug function bugnote_delete_all( $p_bug_id ) { $c_bug_id = db_prepare_int( $p_bug_id ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); - $t_bugnote_text_table = config_get( 'mantis_bugnote_text_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); + $t_bugnote_text_table = config_get_global( 'mantis_bugnote_text_table' ); # Delete the bugnote text items $query = "SELECT bugnote_text_id @@ -220,7 +220,7 @@ # Get the text associated with the bugnote function bugnote_get_text( $p_bugnote_id ) { $t_bugnote_text_id = bugnote_get_field( $p_bugnote_id, 'bugnote_text_id' ); - $t_bugnote_text_table = config_get( 'mantis_bugnote_text_table' ); + $t_bugnote_text_table = config_get_global( 'mantis_bugnote_text_table' ); # grab the bugnote text $query = "SELECT note @@ -236,7 +236,7 @@ function bugnote_get_field( $p_bugnote_id, $p_field_name ) { $c_bugnote_id = db_prepare_int( $p_bugnote_id ); $c_field_name = db_prepare_string( $p_field_name ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); $query = "SELECT $c_field_name FROM $t_bugnote_table @@ -250,7 +250,7 @@ # Get latest bugnote id function bugnote_get_latest_id( $p_bug_id ) { $c_bug_id = db_prepare_int( $p_bug_id ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); $query = "SELECT id FROM $t_bugnote_table @@ -306,8 +306,8 @@ # the cache should be aware of the sorting order if ( !isset( $g_cache_bugnotes[$p_bug_id][$p_user_bugnote_order] ) ) { $c_bug_id = db_prepare_int( $p_bug_id ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); - $t_bugnote_text_table = config_get( 'mantis_bugnote_text_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); + $t_bugnote_text_table = config_get_global( 'mantis_bugnote_text_table' ); if ( 0 == $p_user_bugnote_limit ) { ## Show all bugnotes @@ -372,7 +372,7 @@ function bugnote_set_time_tracking( $p_bugnote_id, $p_time_tracking ) { $c_bugnote_id = db_prepare_int( $p_bugnote_id ); $c_bugnote_time_tracking = db_prepare_time( $p_time_tracking ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); $query = "UPDATE $t_bugnote_table SET time_tracking = '$c_bugnote_time_tracking' @@ -387,7 +387,7 @@ # Update the last_modified field of the bugnote function bugnote_date_update( $p_bugnote_id ) { $c_bugnote_id = db_prepare_int( $p_bugnote_id ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); $query = "UPDATE $t_bugnote_table SET last_modified=" . db_now() . " @@ -404,7 +404,7 @@ $c_bugnote_text = db_prepare_string( $p_bugnote_text ); $t_bug_id = bugnote_get_field( $p_bugnote_id, 'bug_id' ); $t_bugnote_text_id = bugnote_get_field( $p_bugnote_id, 'bugnote_text_id' ); - $t_bugnote_text_table = config_get( 'mantis_bugnote_text_table' ); + $t_bugnote_text_table = config_get_global( 'mantis_bugnote_text_table' ); $query = "UPDATE $t_bugnote_text_table SET note='$c_bugnote_text' @@ -432,7 +432,7 @@ $t_view_state = VS_PUBLIC; } - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); # update view_state $query = "UPDATE $t_bugnote_table @@ -472,8 +472,8 @@ $c_from = db_prepare_date( $p_from ); $c_to = db_prepare_date( $p_to ); - $t_user_table = config_get( 'mantis_user_table' ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_user_table = config_get_global( 'mantis_user_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); if ( !is_blank( $c_from ) ) { $t_from_where = " AND bn.date_submitted >= '$c_from 00:00:00'"; @@ -516,9 +516,9 @@ $c_cost = db_prepare_double( $p_cost ); // MySQL - $t_bug_table = config_get( 'mantis_bug_table' ); - $t_user_table = config_get( 'mantis_user_table' ); - $t_bugnote_table = config_get( 'mantis_bugnote_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); + $t_user_table = config_get_global( 'mantis_user_table' ); + $t_bugnote_table = config_get_global( 'mantis_bugnote_table' ); if ( !is_blank( $c_from ) ) { $t_from_where = " AND bn.date_submitted >= '$c_from 00:00:00'"; Modified: trunk/mantisbt/core/category_api.php =================================================================== --- trunk/mantisbt/core/category_api.php 2007-10-31 23:06:31 UTC (rev 4690) +++ trunk/mantisbt/core/category_api.php 2007-10-31 23:07:21 UTC (rev 4691) @@ -34,7 +34,7 @@ $c_project_id = db_prepare_int( $p_project_id ); $c_category = db_prepare_string( $p_category ); - $t_project_category_table = config_get( 'mantis_project_category_table' ); + $t_project_category_table = config_get_global( 'mantis_project_category_table' ); $query = "SELECT COUNT(*) FROM $t_project_category_table @@ -88,7 +88,7 @@ category_ensure_unique( $p_project_id, $p_category ); - $t_project_category_table = config_get( 'mantis_project_category_table' ); + $t_project_category_table = config_get_global( 'mantis_project_category_table' ); $query = "INSERT INTO $t_project_category_table ( project_id, category ) @@ -110,8 +110,8 @@ category_ensure_exists( $p_project_id, $p_category ); - $t_project_category_table = config_get( 'mantis_project_category_table' ); - $t_bug_table = config_get( 'mantis_bug_table' ); + $t_project_category_table = config_get_global( 'mantis_project_category_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); $query = "UPDATE $t_project_category_table SET category=" . db_param(0) . ", @@ -144,8 +144,8 @@ category_ensure_exists( $p_project_id, $p_new_category ); } - $t_project_category_table = config_get( 'mantis_project_category_table' ); - $t_bug_table = config_get( 'mantis_bug_table' ); + $t_project_category_table = config_get_global( 'mantis_project_category_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); $query = "DELETE FROM $t_project_category_table WHERE project_id=" . db_param(0) . " AND @@ -169,8 +169,8 @@ project_ensure_exists( $p_project_id ); - $t_project_category_table = config_get( 'mantis_project_category_table' ); - $t_bug_table = config_get( 'mantis_bug_table' ); + $t_project_category_table = config_get_global( 'mantis_project_category_table' ); + $t_bug_table = config_get_global( 'mantis_bug_table' ); $query = "DELETE FROM $t_project_category_table WHERE project_id=" . db_param(0); @@ -196,7 +196,7 @@ $c_project_id = db_prepare_int( $p_project_id ); $c_category = db_prepare_string( $p_category ); - $t_project_category_table = config_get( 'mantis_project_category_table' ); + $t_project_category_table = config_get_global( 'mantis_project_category_table' ); $query = "SELECT category, user_id FROM $t_project_category_table @@ -216,7 +216,7 @@ function category_get_all_rows( $p_project_id ) { $c_project_id = db_prepare_int( $p_project_id ); - $t_project_category_table = config_get( 'mantis_project_category_table' ); + $t_project_category_table = config_get_global( 'mantis_project_category_table' ); $query = "SELECT category, user_id FROM $t_project_category_table Modified: trunk/mantisbt/core/custom_field_api.php =================================================================== --- trunk/mantisbt/core/custom_field_api.php 2007-10-31 23:06:31 UTC (rev 4690) +++ trunk/mantisbt/core/custom_field_api.php 2007-10-31 23:07:21 UTC (rev 4691) @@ -58,7 +58,7 @@ $c_field_id = db_prepare_int( $p_field_id ); - $t_custom_field_table = config_get( 'mantis_custom_field_table' ); + $t_custom_field_table = config_get_global( 'mantis_custom_field_table' ); if ( isset ( $g_cache_custom_field[$c_field_id] ) ) { return $g_cache_custom_field[$c_field_id]; @@ -116,7 +116,7 @@ $c_field_id = db_prepare_int( $p_field_id ); # figure out if this bug_id/field_id combination exists - $t_custom_field_project_table = config_get( 'mantis_custom_field_project_table' ); + $t_custom_field_project_table = config_get_global( 'mantis_custom_field_project_table' ); $query = "SELECT COUNT(*) FROM $t_custom_field_project_table WHERE field_id=" . db_param(0) . " AND @@ -173,7 +173,7 @@ function custom_field_is_name_unique( $p_name, $p_custom_field_id = null ) { $c_name = db_prepare_string( $p_name ); - $t_custom_field_table = config_get( 'mantis_custom_field_table' ); + $t_custom_field_table = config_get_global( 'mantis_custom_field_table' ); $query = "SELECT COUNT(*) FROM $t_custom_field_table WHERE name='$c_name'"; @@ -264,7 +264,7 @@ custom_field_ensure_name_unique( $c_name ); - $t_custom_field_table = config_get( 'mantis_custom_field_table' ); + $t_custom_field_table = config_get_global( 'mantis_custom_field_table' ); $query = "INSERT INTO $t_custom_field_table ( name ) VALUES @@ -323,7 +323,7 @@ } $t_update_something = false; - $t_mantis_custom_field_table = config_get( 'mantis_custom_field_table' ); + $t_mantis_custom_field_table = config_get_global( 'mantis_custom_field_table' ); $query = "UPDATE $t_mantis_custom_field_table SET "; if( array_key_exists( 'name', $p_def_array ) ) { @@ -499,7 +499,7 @@ return false; } - $t_custom_field_project_table = config_get( 'mantis_custom_field_project_table' ); + $t_custom_field_project_table = config_get_global( 'mantis_custom_field_project_table' ); $query = "INSERT INTO $t_custom_field_project_table ( field_id, project_id ) VALUES @@ -521,7 +521,7 @@ $c_field_id = db_prepare_int( $p_field_id ); $c_project_id = db_prepare_int( $p_project_id ); - $t_custom_field_project_table = config_get( 'mantis_custom_field_project_table' ); + $t_custom_field_project_table = config_get_global( 'mantis_custom_field_project_table' ); $query = "DELETE FROM $t_custom_field_project_table WHERE field_id = '$c_field_id' AND project_id = '$c_project_id'"; @@ -539,18 +539,18 @@ $c_field_id = db_prepare_int( $p_field_id ); # delete all values - $t_custom_field_string_table = config_get( 'mantis_custom_field_string_table' ); + $t_custom_field_string_table = config_get_global( 'mantis_custom_field_string_table' ); $query = "DELETE FROM $t_custom_field_string_table WHERE field_id='$c_field_id'"; db_query( $query ); # delete all project associations - $t_custom_field_project_table = config_get( 'mantis_custom_field_project_table' ); + $t_custom_field_project_table = config_get_global( 'mantis_custom_field_project_table' ); $query = "DELETE FROM $t_custom_field_project_table WHERE field_id='$c_field_id'"; db_query( $query ); - $t_custom_field_table = config_get( 'mantis_custom_field_table' ); + $t_custom_field_table = config_get_global( 'mantis_custom_field_table' ); # delete the definition $query = "DELETE FROM $t_custom_field_table WHERE id='$c_field_id'"; @@ -571,7 +571,7 @@ $c_project_id = db_prepare_int( $p_project_id ); # delete all project associations - $t_custom_field_project_table = config_get( 'mantis_custom_field_project_table' ); + $t_custom_field_project_table = config_get_global( 'mantis_custom_field_project_table' ); $query = "DELETE FROM $t_custom_field_project_table WHERE project_id='$c_project_id'"; db_query( $query ); @@ -588,7 +588,7 @@ function custom_field_delete_all_values( $p_bug_id ) { $c_bug_id = db_prepare_int( $p_bug_id ); - $t_custom_field_string_table = config_get( 'mantis_custom_field_string_table' ); + $t_custom_field_string_table = config_get_global( 'mantis_custom_field_string_table' ); $query = "DELETE FROM $t_custom_field_string_table WHERE bug_id='$c_bug_id'"; db_query( $query ); @@ -609,7 +609,7 @@ return false; } - $t_custom_field_table = config_get( 'mantis_custom_field_table' ); + $t_custom_field_table = config_get_global( 'mantis_custom_field_table' ); $c_field_name = db_prepare_string( $p_field_name ); @@ -642,13 +642,13 @@ if ( ! isset( $g_cache_cf_linked[$p_project_id] ) ) { - $t_custom_field_table = config_get( 'mantis_custom_field_table' ); - $t_custom_field_project_table = config_get( 'mantis_custom_field_project_table' ); + $t_custom_field_table = config_get_global( 'mantis_custom_field_table' ); + $t_custom_field_project_table = config_get_global( 'mantis_custom_field_project_table' ); if ( ALL_PROJECTS == $p_project_id ) { - $t_project_user_list_table = config_get( 'mantis_project_user_list_table' ); - $t_project_table = config_get( 'mantis_project_table' ); - $t_user_table = config_get( 'mantis_user_table' ); + $t_project_user_list_table = config_get_global( 'mantis_project_user_list_table' ); + $t_project_table = config_get_global( 'mantis_project_table' ); + $t_user_table = config_get_global( 'mantis_user_table' ); $t_user_id = auth_get_current_user_id(); $t_pub = VS_PUBLIC; $t_priv = VS_PRIVATE; @@ -717,7 +717,7 @@ global $g_cache_cf_list; if ( $g_cache_cf_list === NULL ) { - $t_custom_field_table = config_get( 'mantis_custom_field_table' ); + $t_custom_field_table = config_get_global( 'mantis_custom_field_table' ); $query = "SELECT id, name FROM $t_custom_field_table ORDER BY name ASC"; @@ -744,7 +744,7 @@ function custom_field_get_project_ids( $p_field_id ) { $c_field_id = db_prepare_int( $p_field_id ); - $t_custom_field_project_table = config_get( 'mantis_custom_field_project_table' ); + $t_custom_field_project_table = config_get_global( 'mantis_custom_field_project_table' ); $query = "SELECT project_id FROM $t_... [truncated message content] |