Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'unused-variable2' of https://github.com/grangeway/mantisbt

 into grangeway-unused-variable2
  • Loading branch information...
commit 8fb46a2475a12b2b3fbe25acce5d087887a09bb3 2 parents a6a3a13 + 3a8474f
@grangeway grangeway authored
View
2  bug_actiongroup_update_severity_inc.php
@@ -89,8 +89,6 @@ function action_update_severity_print_fields() {
* @return string|null On failure: the reason why the action could not be validated. On success: null.
*/
function action_update_severity_validate( $p_bug_id ) {
- $f_severity = gpc_get_string( 'severity' );
-
$t_update_severity_threshold = config_get( 'update_bug_threshold' );
$t_bug_id = $p_bug_id;
View
8 core/bug_api.php
@@ -655,7 +655,7 @@ function update( $p_update_extended = false, $p_bypass_mail = false ) {
if( $t_old_data->description != $this->description ) {
if ( bug_revision_count( $c_bug_id, REV_DESCRIPTION ) < 1 ) {
- $t_revision_id = bug_revision_add( $c_bug_id, $t_old_data->reporter_id, REV_DESCRIPTION, $t_old_data->description, 0, $t_old_data->date_submitted );
+ bug_revision_add( $c_bug_id, $t_old_data->reporter_id, REV_DESCRIPTION, $t_old_data->description, 0, $t_old_data->date_submitted );
}
$t_revision_id = bug_revision_add( $c_bug_id, $t_current_user, REV_DESCRIPTION, $this->description );
history_log_event_special( $c_bug_id, DESCRIPTION_UPDATED, $t_revision_id );
@@ -663,7 +663,7 @@ function update( $p_update_extended = false, $p_bypass_mail = false ) {
if( $t_old_data->steps_to_reproduce != $this->steps_to_reproduce ) {
if ( bug_revision_count( $c_bug_id, REV_STEPS_TO_REPRODUCE ) < 1 ) {
- $t_revision_id = bug_revision_add( $c_bug_id, $t_old_data->reporter_id, REV_STEPS_TO_REPRODUCE, $t_old_data->steps_to_reproduce, 0, $t_old_data->date_submitted );
+ bug_revision_add( $c_bug_id, $t_old_data->reporter_id, REV_STEPS_TO_REPRODUCE, $t_old_data->steps_to_reproduce, 0, $t_old_data->date_submitted );
}
$t_revision_id = bug_revision_add( $c_bug_id, $t_current_user, REV_STEPS_TO_REPRODUCE, $this->steps_to_reproduce );
history_log_event_special( $c_bug_id, STEP_TO_REPRODUCE_UPDATED, $t_revision_id );
@@ -671,7 +671,7 @@ function update( $p_update_extended = false, $p_bypass_mail = false ) {
if( $t_old_data->additional_information != $this->additional_information ) {
if ( bug_revision_count( $c_bug_id, REV_ADDITIONAL_INFO ) < 1 ) {
- $t_revision_id = bug_revision_add( $c_bug_id, $t_old_data->reporter_id, REV_ADDITIONAL_INFO, $t_old_data->additional_information, 0, $t_old_data->date_submitted );
+ bug_revision_add( $c_bug_id, $t_old_data->reporter_id, REV_ADDITIONAL_INFO, $t_old_data->additional_information, 0, $t_old_data->date_submitted );
}
$t_revision_id = bug_revision_add( $c_bug_id, $t_current_user, REV_ADDITIONAL_INFO, $this->additional_information );
history_log_event_special( $c_bug_id, ADDITIONAL_INFO_UPDATED, $t_revision_id );
@@ -1073,11 +1073,9 @@ function bug_copy( $p_bug_id, $p_target_project_id = null, $p_copy_custom_fields
global $g_db;
$t_mantis_custom_field_string_table = db_get_table( 'custom_field_string' );
- $t_mantis_bug_file_table = db_get_table( 'bug_file' );
$t_mantis_bugnote_table = db_get_table( 'bugnote' );
$t_mantis_bugnote_text_table = db_get_table( 'bugnote_text' );
$t_mantis_bug_history_table = db_get_table( 'bug_history' );
- $t_mantis_db = $g_db;
$t_bug_id = (int)$p_bug_id;
$t_target_project_id = (int)$p_target_project_id;
View
2  core/bug_group_action_api.php
@@ -102,8 +102,6 @@ function bug_group_action_print_bug_list( $p_bug_ids_array ) {
$t_i = 1;
foreach( $p_bug_ids_array as $t_bug_id ) {
- $t_class = sprintf( "row-%d", ( $t_i++ % 2 ) + 1 );
-
# choose color based on status
$status_label = html_get_status_css_class( bug_get_field( $t_bug_id, 'status' ), auth_get_current_user_id(), bug_get_field( $t_bug_id, 'project_id' ) );
View
2  core/bugnote_api.php
@@ -326,7 +326,7 @@ function bugnote_delete_all( $p_bug_id ) {
# Delete the corresponding bugnotes
$query = "DELETE FROM $t_bugnote_table
WHERE bug_id=" . db_param();
- $result = db_query_bound( $query, array( (int)$p_bug_id ) );
+ db_query_bound( $query, array( (int)$p_bug_id ) );
# db_query errors on failure so:
return true;
View
5 core/collapse_api.php
@@ -130,8 +130,6 @@ function collapse_icon( $p_name, $p_section = '' ) {
return;
}
- $t_block = ( is_blank( $p_section ) ? $p_name : $p_section . '_' . $p_name );
-
global $g_open_collapse_section;
if( $g_open_collapse_section === true ) {
@@ -157,7 +155,7 @@ function collapse_end( $p_name, $p_section = '' ) {
global $g_current_collapse_section, $g_open_collapse_section;
$t_block = ( is_blank( $p_section ) ? $p_name : $p_section . '_' . $p_name );
- $t_display = collapse_display( $t_block );
+ collapse_display( $t_block );
# Make sure a section is opened, and it is the same section.
if( $t_block !== $g_current_collapse_section ) {
@@ -210,7 +208,6 @@ function collapse_cache_token() {
return;
}
- $t_user_id = auth_get_current_user_id();
$t_token = token_get_value( TOKEN_COLLAPSE );
if( !is_null( $t_token ) ) {
View
2  core/columns_api.php
@@ -1040,7 +1040,7 @@ function print_column_plugin( $p_column_object, $p_bug, $p_columns_target = COLU
* @access public
*/
function print_column_edit( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
- global $t_icon_path, $t_update_bug_threshold;
+ global $t_icon_path;
echo '<td class="column-edit">';
View
17 core/config_api.php
@@ -230,7 +230,7 @@ function config_get_access( $p_option, $p_user = null, $p_project = null ) {
global $g_cache_config, $g_cache_config_access, $g_cache_filled;
if( !$g_cache_filled ) {
- $t = config_get( $p_option, -1, $p_user, $p_project );
+ config_get( $p_option, -1, $p_user, $p_project );
}
# prepare the user's list
@@ -286,7 +286,7 @@ function config_is_set( $p_option, $p_user = null, $p_project = null ) {
global $g_cache_config, $g_cache_filled;
if( !$g_cache_filled ) {
- $t = config_get( $p_option, -1, $p_user, $p_project );
+ config_get( $p_option, -1, $p_user, $p_project );
}
# prepare the user's list
@@ -404,7 +404,7 @@ function config_set( $p_option, $p_value, $p_user = NO_USER, $p_project = ALL_PR
);
}
- $result = db_query_bound( $t_set_query, $t_params );
+ db_query_bound( $t_set_query, $t_params );
}
config_set_cache( $p_option, $c_value, $t_type, $p_user, $p_project, $p_access );
@@ -501,8 +501,6 @@ function config_can_delete( $p_option ) {
* @param int $p_project project id
*/
function config_delete( $p_option, $p_user = ALL_USERS, $p_project = ALL_PROJECTS ) {
- global $g_cache_config, $g_cache_config_access;
-
# bypass table lookup for certain options
$t_bypass_lookup = !config_can_set_in_database( $p_option );
@@ -516,7 +514,7 @@ function config_delete( $p_option, $p_user = ALL_USERS, $p_project = ALL_PROJECT
WHERE config_id = " . db_param() . " AND
project_id=" . db_param() . " AND
user_id=" . db_param();
- $result = db_query_bound( $query, array( $p_option, $p_project, $p_user ) );
+ db_query_bound( $query, array( $p_option, $p_project, $p_user ) );
}
config_flush_cache( $p_option, $p_user, $p_project );
@@ -547,9 +545,8 @@ function config_delete_for_user( $p_option, $p_user_id ) {
*/
function config_delete_project( $p_project = ALL_PROJECTS ) {
$t_config_table = db_get_table( 'config' );
- $query = "DELETE FROM $t_config_table
- WHERE project_id=" . db_param();
- $result = db_query_bound( $query, array( $p_project ) );
+ $query = "DELETE FROM $t_config_table WHERE project_id=" . db_param();
+ db_query_bound( $query, array( $p_project ) );
# flush cache here in case some of the deleted configs are in use.
config_flush_cache();
@@ -564,7 +561,7 @@ function config_delete_project( $p_project = ALL_PROJECTS ) {
* @param int $p_project project id
*/
function config_flush_cache( $p_option = '', $p_user = ALL_USERS, $p_project = ALL_PROJECTS ) {
- global $g_cache_config, $g_cache_config_access, $g_cache_filled;
+ global $g_cache_filled;
if( '' !== $p_option ) {
unset( $GLOBALS['g_cache_config'][$p_option][$p_user][$p_project] );
View
2  core/current_user_api.php
@@ -209,8 +209,6 @@ function current_user_ensure_unprotected() {
*/
function current_user_get_bug_filter( $p_project_id = null ) {
$f_filter_string = gpc_get_string( 'filter', '' );
- $t_view_all_cookie = '';
- $t_cookie_detail = '';
$t_filter = '';
if( !is_blank( $f_filter_string ) ) {
View
2  core/custom_field_api.php
@@ -625,7 +625,7 @@ function custom_field_get_id_from_name( $p_field_name ) {
* @access public
*/
function custom_field_get_linked_ids( $p_project_id = ALL_PROJECTS ) {
- global $g_cache_cf_linked, $g_cache_custom_field;
+ global $g_cache_cf_linked;
if( !isset( $g_cache_cf_linked[$p_project_id] ) ) {
View
11 core/database_api.php
@@ -152,7 +152,6 @@ function db_is_connected() {
* @return bool indicating if php current supports the given database type
*/
function db_check_database_support( $p_db_type ) {
- $t_support = false;
switch( $p_db_type ) {
case 'mysql':
$t_support = function_exists( 'mysql_connect' );
@@ -443,8 +442,6 @@ function db_param() {
* @return int Record Count
*/
function db_num_rows( $p_result ) {
- global $g_db;
-
return $p_result->RecordCount();
}
@@ -543,8 +540,6 @@ function db_fetch_array( &$p_result ) {
* @return mixed Database result
*/
function db_result( $p_result, $p_index1 = 0, $p_index2 = 0 ) {
- global $g_db;
-
if( $p_result && ( db_num_rows( $p_result ) > 0 ) ) {
$p_result->Move( $p_index1 );
$t_result = $p_result->GetArray();
@@ -569,7 +564,6 @@ function db_result( $p_result, $p_index1 = 0, $p_index2 = 0 ) {
*/
function db_insert_id( $p_table = null, $p_field = "id" ) {
global $g_db;
- $t_db_type = config_get_global( 'db_type' );
if( isset( $p_table ) ) {
if( db_is_oracle() ) {
@@ -620,7 +614,7 @@ function db_table_exists( $p_table_name ) {
* @return bool indicating whether the index exists
*/
function db_index_exists( $p_table_name, $p_index_name ) {
- global $g_db, $g_db_schema;
+ global $g_db;
if( is_blank( $p_index_name ) || is_blank( $p_table_name ) ) {
return false;
@@ -651,7 +645,6 @@ function db_index_exists( $p_table_name, $p_index_name ) {
* @return bool indicating whether the field exists
*/
function db_field_exists( $p_field_name, $p_table_name ) {
- global $g_db;
$columns = db_field_names( $p_table_name );
return in_array( $p_field_name, $columns );
}
@@ -839,8 +832,6 @@ function db_prepare_bool( $p_bool ) {
* @return string Formatted Date for DB insertion e.g. 1970-01-01 00:00:00 ready for database insertion
*/
function db_now() {
- global $g_db;
-
return time();
}
View
4 core/error_api.php
@@ -71,8 +71,7 @@
* @uses html_api.php (optional)
*/
function error_handler( $p_type, $p_error, $p_file, $p_line, $p_context ) {
- global $g_error_parameters, $g_error_handled, $g_error_proceed_url;
- global $g_lang_overrides;
+ global $g_error_parameters, $g_error_handled;
global $g_error_send_page_header;
# check if errors were disabled with @ somewhere in this call chain
@@ -99,7 +98,6 @@ function error_handler( $p_type, $p_error, $p_file, $p_line, $p_context ) {
$t_lang_pushed = true;
}
- $t_short_file = basename( $p_file );
$t_method_array = config_get_global( 'display_errors' );
if( isset( $t_method_array[$p_type] ) ) {
$t_method = $t_method_array[$p_type];
View
9 core/file_api.php
@@ -56,8 +56,6 @@
* @return string
*/
function file_get_display_name( $p_filename ) {
- $t_array = explode( '-', $p_filename, 2 );
-
# Check if it's a project document filename (doc-0000000-filename)
# or a bug attachment filename (0000000-filename)
# for newer filenames, the filename in schema is correct.
@@ -458,7 +456,7 @@ function file_delete_project_files( $p_project_id ) {
# Delete the corresponding db records
$query = "DELETE FROM $t_project_file_table
WHERE project_id=" . db_param();
- $result = db_query_bound( $query, array( (int) $p_project_id ) );
+ db_query_bound( $query, array( (int) $p_project_id ) );
}
/**
@@ -490,7 +488,7 @@ function file_ftp_connect() {
*/
function file_ftp_put( $p_conn_id, $p_remote_filename, $p_local_filename ) {
helper_begin_long_process();
- $upload = ftp_put( $p_conn_id, $p_remote_filename, $p_local_filename, FTP_BINARY );
+ ftp_put( $p_conn_id, $p_remote_filename, $p_local_filename, FTP_BINARY );
}
/**
@@ -501,7 +499,7 @@ function file_ftp_put( $p_conn_id, $p_remote_filename, $p_local_filename ) {
*/
function file_ftp_get( $p_conn_id, $p_local_filename, $p_remote_filename ) {
helper_begin_long_process();
- $download = ftp_get( $p_conn_id, $p_local_filename, $p_remote_filename, FTP_BINARY );
+ ftp_get( $p_conn_id, $p_local_filename, $p_remote_filename, FTP_BINARY );
}
/**
@@ -1181,7 +1179,6 @@ function file_copy_attachments( $p_source_bug_id, $p_dest_bug_id ) {
$t_project_id = bug_get_field( $p_source_bug_id, 'project_id' );
- $t_bug_file = array();
for( $i = 0;$i < $t_count;$i++ ) {
$t_bug_file = db_fetch_array( $result );
View
19 core/filter_api.php
@@ -1421,9 +1421,7 @@ function filter_get_bug_rows( &$p_page_number, &$p_per_page, &$p_page_count, &$p
$t_available_statuses = MantisEnum::getValues( config_get( 'status_enum_string' ) );
if( 'simple' == $t_filter['_view_type'] ) {
-
# simple filtering: if showing any, restrict by the hide status value, otherwise ignore the hide
- $t_any_found = false;
$t_this_status = $t_filter[FILTER_PROPERTY_STATUS][0];
$t_this_hide_status = $t_filter[FILTER_PROPERTY_HIDE_STATUS][0];
@@ -4215,9 +4213,7 @@ function print_filter_show_sort() {
* @param int $p_field_id
*/
function print_filter_custom_field_date( $p_field_num, $p_field_id ) {
- global $t_filter, $t_accessible_custom_fields_names, $t_accessible_custom_fields_types, $t_accessible_custom_fields_values, $t_accessible_custom_fields_ids, $t_select_modifier;
-
- $t_js_toggle_func = 'toggle_custom_date_field_' . $p_field_id . '_controls';
+ global $t_filter, $t_accessible_custom_fields_values;
# Resort the values so there ordered numerically, they are sorted as strings otherwise which
# may be wrong for dates before early 2001.
@@ -4335,7 +4331,7 @@ function print_filter_custom_field_date( $p_field_num, $p_field_id ) {
* print project field
*/
function print_filter_project_id() {
- global $t_select_modifier, $t_filter, $f_view_type;
+ global $t_select_modifier, $t_filter;
?>
<!-- Project -->
<select <?php echo $t_select_modifier;?> name="<?php echo FILTER_PROPERTY_PROJECT_ID;?>[]">
@@ -4349,7 +4345,7 @@ function print_filter_project_id() {
}
function print_filter_match_type() {
- global $t_select_modifier, $t_filter, $f_view_type;
+ global $t_select_modifier, $t_filter;
?>
<!-- Project -->
<select <?php echo $t_select_modifier;?> name="<?php echo FILTER_PROPERTY_MATCH_TYPE;?>">
@@ -4687,14 +4683,13 @@ function filter_db_can_delete_filter( $p_filter_id ) {
function filter_db_delete_filter( $p_filter_id ) {
$t_filters_table = db_get_table( 'filters' );
$c_filter_id = (int)$p_filter_id;
- $t_user_id = auth_get_current_user_id();
if( !filter_db_can_delete_filter( $c_filter_id ) ) {
return false;
}
- $query = 'DELETE FROM ' . $t_filters_table . ' WHERE id=' . db_param();
- $result = db_query_bound( $query, array( $c_filter_id ) );
+ $t_query = 'DELETE FROM ' . $t_filters_table . ' WHERE id=' . db_param();
+ db_query_bound( $t_query, array( $c_filter_id ) );
# db_query errors on failure so:
return true;
@@ -4707,10 +4702,10 @@ function filter_db_delete_current_filters() {
$t_filters_table = db_get_table( 'filters' );
$t_all_id = ALL_PROJECTS;
- $query = "DELETE FROM $t_filters_table
+ $t_query = "DELETE FROM $t_filters_table
WHERE project_id<=" . db_param() . "
AND name=" . db_param();
- $result = db_query_bound( $query, array( $t_all_id, '' ) );
+ db_query_bound( $t_query, array( $t_all_id, '' ) );
}
/**
View
1  core/helper_api.php
@@ -142,7 +142,6 @@ function get_percentage_by_status() {
$query .= ' GROUP BY status';
$result = db_query_bound( $query );
- $t_bug_count = 0;
$t_status_count_array = array();
while( $row = db_fetch_array( $result ) ) {
View
3  core/history_api.php
@@ -125,7 +125,7 @@ function history_log_event_special( $p_bug_id, $p_type, $p_optional = '', $p_opt
( user_id, bug_id, date_modified, type, old_value, new_value, field_name )
VALUES
( " . db_param() . ', ' . db_param() . ', ' . db_param() . ', ' . db_param() . ', ' . db_param() . ',' . db_param() . ', ' . db_param() . ')';
- $result = db_query_bound( $query, array( $t_user_id, $p_bug_id, db_now(), $p_type, $c_optional, $c_optional2, '' ) );
+ db_query_bound( $query, array( $t_user_id, $p_bug_id, db_now(), $p_type, $c_optional, $c_optional2, '' ) );
}
/**
@@ -183,7 +183,6 @@ function history_get_raw_events_array( $p_bug_id, $p_user_id = null ) {
$result = db_query_bound( $query, array( $p_bug_id ) );
$raw_history = array();
- $t_private_bugnote_threshold = config_get( 'private_bugnote_threshold' );
$t_private_bugnote_visible = access_has_bug_level( config_get( 'private_bugnote_threshold' ), $p_bug_id, $t_user_id );
$t_tag_view_threshold = config_get( 'tag_view_threshold' );
$t_show_monitor_list_threshold = config_get( 'show_monitor_list_threshold' );
View
10 core/html_api.php
@@ -1307,7 +1307,6 @@ function html_status_legend() {
$t_status_array = MantisEnum::getAssocArrayIndexedByValues( config_get( 'status_enum_string' ) );
$t_status_names = MantisEnum::getAssocArrayIndexedByValues( lang_get( 'status_enum_string' ) );
- $enum_count = count( $t_status_array );
# read through the list and eliminate unused ones for the selected project
# assumes that all status are are in the enum array
@@ -1348,7 +1347,6 @@ function html_status_legend() {
echo '<tr>';
# draw the status bar
- $width = (int)( 100 / count( $t_status_array ) );
$t_status_enum_string = config_get('status_enum_string' );
foreach( $t_status_array as $t_status => $t_name ) {
$t_val = isset( $t_status_names[$t_status] ) ? $t_status_names[$t_status] : $t_status_array[$t_status];
@@ -1372,7 +1370,7 @@ function html_status_percentage_legend() {
$t_status_percents = get_percentage_by_status();
$t_status_enum_string = config_get('status_enum_string' );
$t_enum_values = MantisEnum::getValues( $t_status_enum_string );
- $enum_count = count( $t_enum_values );
+ $t_enum_count = count( $t_enum_values );
$t_bug_count = array_sum( $t_status_percents );
@@ -1380,7 +1378,7 @@ function html_status_percentage_legend() {
echo '<br />';
echo '<table class="width100" cellspacing="1">';
echo '<tr>';
- echo '<td class="form-title" colspan="' . $enum_count . '">' . lang_get( 'issue_status_percentage' ) . '</td>';
+ echo '<td class="form-title" colspan="' . $t_enum_count . '">' . lang_get( 'issue_status_percentage' ) . '</td>';
echo '</tr>';
echo '<tr>';
@@ -1531,7 +1529,6 @@ function html_button_bug_assign_to( $p_bug ) {
}
$t_current_user_id = auth_get_current_user_id();
- $t_new_status = ( ON == config_get( 'auto_set_status_to_assigned' ) ) ? config_get( 'bug_assigned_status' ) : $p_bug->status;
$t_options = array();
$t_default_assign_to = null;
@@ -1736,9 +1733,6 @@ function html_button_wiki( $p_bug_id ) {
* @return null
*/
function html_buttons_view_bug_page( $p_bug_id ) {
- $t_resolved = config_get( 'bug_resolved_status_threshold' );
- $t_closed = config_get( 'bug_closed_status_threshold' );
- $t_status = bug_get_field( $p_bug_id, 'status' );
$t_readonly = bug_is_readonly( $p_bug_id );
$t_sticky = config_get( 'set_bug_sticky_threshold' );
View
4 core/install_helper_functions_api.php
@@ -304,7 +304,7 @@ function install_correct_multiselect_custom_fields_db_format() {
SET value = '$c_value'
WHERE field_id = $c_field_id
AND bug_id = $c_bug_id";
- $t_update_result = db_query_bound( $t_update_query );
+ db_query_bound( $t_update_query );
}
# Remove vertical pipe | prefix and suffix from radio custom field values.
@@ -324,7 +324,7 @@ function install_correct_multiselect_custom_fields_db_format() {
SET value = '$c_value'
WHERE field_id = $c_field_id
AND bug_id = $c_bug_id";
- $t_update_result = db_query_bound( $t_update_query );
+ db_query_bound( $t_update_query );
}
# Re-enable query logging if we disabled it
View
7 core/print_api.php
@@ -686,9 +686,6 @@ function print_profile_option_list_from_profiles( $p_profiles, $p_select_id ) {
* @param int $p_project_id project id
*/
function print_category_option_list( $p_category_id = 0, $p_project_id = null ) {
- $t_category_table = db_get_table( 'category' );
- $t_project_table = db_get_table( 'project' );
-
if( null === $p_project_id ) {
$t_project_id = helper_get_current_project();
} else {
@@ -1131,8 +1128,6 @@ function print_custom_field_projects_list( $p_field_id ) {
$t_linked_field_ids = custom_field_get_linked_ids( $t_project_id );
- $t_current_project_fields = array();
-
$t_first = true;
foreach( $t_linked_field_ids as $t_current_field_id ) {
if( $t_first ) {
@@ -1425,7 +1420,6 @@ function print_page_link( $p_page_url, $p_text = '', $p_page_no = 0, $p_page_cur
*/
function print_page_links( $p_page, $p_start, $p_end, $p_current, $p_temp_filter_id = 0 ) {
$t_items = array();
- $t_link = '';
# Check if we have more than one page,
# otherwise return without doing anything.
@@ -1719,7 +1713,6 @@ function get_dropdown( $p_control_array, $p_control_name, $p_match = '', $p_add_
*/
function print_bug_attachments_list( $p_bug_id ) {
$t_attachments = file_get_visible_attachments( $p_bug_id );
- $t_attachments_count = count( $t_attachments );
echo "\n<ul>";
foreach ( $t_attachments as $t_attachment ) {
echo "\n<li>";
View
2  core/profile_api.php
@@ -156,7 +156,7 @@ function profile_update( $p_user_id, $p_profile_id, $p_platform, $p_os, $p_os_bu
os_build=" . db_param() . ",
description=" . db_param() . "
WHERE id=" . db_param() . " AND user_id=" . db_param();
- $result = db_query_bound( $query, array( $p_platform, $p_os, $p_os_build, $p_description, $p_profile_id, $p_user_id ) );
+ db_query_bound( $query, array( $p_platform, $p_os, $p_os_build, $p_description, $p_profile_id, $p_user_id ) );
}
/**
View
1  core/project_api.php
@@ -633,7 +633,6 @@ function project_get_all_user_rows( $p_project_id = ALL_PROJECTS, $p_access_leve
$t_user_table = db_get_table( 'user' );
$t_project_user_list_table = db_get_table( 'project_user_list' );
- $t_project_table = db_get_table( 'project' );
$t_on = ON;
$t_users = array();
View
7 core/relationship_api.php
@@ -282,7 +282,7 @@ function relationship_delete_all( $p_bug_id ) {
$query = "DELETE FROM $t_mantis_bug_relationship_table
WHERE source_bug_id=" . db_param() . " OR
destination_bug_id=" . db_param();
- $result = db_query_bound( $query, array( $c_bug_id, $c_bug_id ) );
+ db_query_bound( $query, array( $c_bug_id, $c_bug_id ) );
}
/**
@@ -291,11 +291,6 @@ function relationship_delete_all( $p_bug_id ) {
* @param int $p_new_bug_id Destination Bug Id
*/
function relationship_copy_all( $p_bug_id, $p_new_bug_id ) {
- $c_bug_id = db_prepare_int( $p_bug_id );
- $c_new_bug_id = db_prepare_int( $p_new_bug_id );
-
- $t_mantis_bug_relationship_table = db_get_table( 'bug_relationship' );
-
$t_relationship = relationship_get_all_src( $p_bug_id );
$t_relationship_count = count( $t_relationship );
for( $i = 0;$i < $t_relationship_count;$i++ ) {
View
3  core/session_api.php
@@ -257,7 +257,6 @@ function session_get( $p_name, $p_default = null ) {
* @return int Session variable
*/
function session_get_int( $p_name, $p_default = null ) {
- global $g_session;
$t_args = func_get_args();
return (int) call_user_func_array( 'session_get', $t_args );
}
@@ -269,7 +268,6 @@ function session_get_int( $p_name, $p_default = null ) {
* @return boolean Session variable
*/
function session_get_bool( $p_name, $p_default = null ) {
- global $g_session;
$t_args = func_get_args();
return true && call_user_func_array( 'session_get', $t_args );
}
@@ -281,7 +279,6 @@ function session_get_bool( $p_name, $p_default = null ) {
* @return string Session variable
*/
function session_get_string( $p_name, $p_default = null ) {
- global $g_session;
$t_args = func_get_args();
return '' . call_user_func_array( 'session_get', $t_args );
}
View
2  core/string_api.php
@@ -550,7 +550,7 @@ function string_strip_hrefs( $p_string ) {
*/
function string_restore_valid_html_tags( $p_string, $p_multiline = true ) {
global $g_cache_html_valid_tags_single_line, $g_cache_html_valid_tags;
- $tags = '';
+
if( is_blank(( $p_multiline ? $g_cache_html_valid_tags : $g_cache_html_valid_tags_single_line ) ) ) {
$t_html_valid_tags = config_get( $p_multiline ? 'html_valid_tags' : 'html_valid_tags_single_line' );
View
21 core/summary_api.php
@@ -98,7 +98,6 @@ function summary_helper_get_developer_label ( $p_user_id ) {
*/
function summary_print_by_enum( $p_enum ) {
$t_project_id = helper_get_current_project();
- $t_user_id = auth_get_current_user_id();
$t_project_filter = helper_project_specific_where( $t_project_id );
if( ' 1<>1' == $t_project_filter ) {
@@ -253,7 +252,6 @@ function summary_new_bug_count_by_date( $p_time_length = 1 ) {
$c_time_length = (int) $p_time_length * SECONDS_PER_DAY;
$t_project_id = helper_get_current_project();
- $t_user_id = auth_get_current_user_id();
$specific_where = helper_project_specific_where( $t_project_id );
if( ' 1<>1' == $specific_where ) {
@@ -281,7 +279,6 @@ function summary_resolved_bug_count_by_date( $p_time_length = 1 ) {
$c_time_length = (int) $p_time_length * SECONDS_PER_DAY;
$t_project_id = helper_get_current_project();
- $t_user_id = auth_get_current_user_id();
$specific_where = helper_project_specific_where( $t_project_id );
if( ' 1<>1' == $specific_where ) {
@@ -309,7 +306,6 @@ function summary_resolved_bug_count_by_date( $p_time_length = 1 ) {
* @param array $p_date_array An array of integers representing days is passed in
*/
function summary_print_by_date( $p_date_array ) {
- $arr_count = count( $p_date_array );
foreach( $p_date_array as $t_days ) {
$t_new_count = summary_new_bug_count_by_date( $t_days );
$t_resolved_count = summary_resolved_bug_count_by_date( $t_days );
@@ -356,7 +352,6 @@ function summary_print_by_activity() {
$t_mantis_history_table = db_get_table( 'bug_history' );
$t_project_id = helper_get_current_project();
- $t_user_id = auth_get_current_user_id();
$t_resolved = config_get( 'bug_resolved_status_threshold' );
$specific_where = helper_project_specific_where( $t_project_id );
@@ -415,7 +410,6 @@ function summary_print_by_age() {
$t_mantis_bug_table = db_get_table( 'bug' );
$t_project_id = helper_get_current_project();
- $t_user_id = auth_get_current_user_id();
$t_resolved = config_get( 'bug_resolved_status_threshold' );
$specific_where = helper_project_specific_where( $t_project_id );
@@ -459,10 +453,7 @@ function summary_print_by_age() {
*/
function summary_print_by_developer() {
$t_mantis_bug_table = db_get_table( 'bug' );
- $t_mantis_user_table = db_get_table( 'user' );
-
$t_project_id = helper_get_current_project();
- $t_user_id = auth_get_current_user_id();
$specific_where = helper_project_specific_where( $t_project_id );
if( ' 1<>1' == $specific_where ) {
@@ -561,11 +552,9 @@ function summary_print_by_developer() {
*/
function summary_print_by_reporter() {
$t_mantis_bug_table = db_get_table( 'bug' );
- $t_mantis_user_table = db_get_table( 'user' );
$t_reporter_summary_limit = config_get( 'reporter_summary_limit' );
$t_project_id = helper_get_current_project();
- $t_user_id = auth_get_current_user_id();
$specific_where = helper_project_specific_where( $t_project_id );
if( ' 1<>1' == $specific_where ) {
@@ -595,7 +584,6 @@ function summary_print_by_reporter() {
ORDER BY status";
$result2 = db_query( $query );
- $last_reporter = -1;
$t_bugs_open = 0;
$t_bugs_resolved = 0;
$t_bugs_closed = 0;
@@ -644,7 +632,6 @@ function summary_print_by_reporter() {
function summary_print_by_category() {
$t_mantis_bug_table = db_get_table( 'bug' );
$t_mantis_category_table = db_get_table( 'category' );
- $t_mantis_project_table = db_get_table( 'project' );
$t_summary_category_include_project = config_get( 'summary_category_include_project' );
$t_project_id = helper_get_current_project();
@@ -666,7 +653,6 @@ function summary_print_by_category() {
$result = db_query( $query );
$last_category_name = -1;
- $last_category_id = -1;
$last_project = -1;
$t_bugs_open = 0;
$t_bugs_resolved = 0;
@@ -721,7 +707,6 @@ function summary_print_by_category() {
$t_bugs_open += $row['bugcount'];
}
- $last_category_id = $v_category_id;
$last_category_name = $v_category_name;
if(( ON == $t_summary_category_include_project ) && ( ALL_PROJECTS == $t_project_id ) ) {
$last_project = $row['project_id'];
@@ -852,10 +837,8 @@ function summary_print_by_project( $p_projects = null, $p_level = 0, $p_cache =
*/
function summary_print_developer_resolution( $p_resolution_enum_string ) {
$t_mantis_bug_table = db_get_table( 'bug' );
- $t_mantis_user_table = db_get_table( 'user' );
$t_project_id = helper_get_current_project();
- $t_user_id = auth_get_current_user_id();
# Get the resolution values ot use
$c_res_s = MantisEnum::getValues( $p_resolution_enum_string );
@@ -961,11 +944,9 @@ function summary_print_developer_resolution( $p_resolution_enum_string ) {
*/
function summary_print_reporter_resolution( $p_resolution_enum_string ) {
$t_mantis_bug_table = db_get_table( 'bug' );
- $t_mantis_user_table = db_get_table( 'user' );
$t_reporter_summary_limit = config_get( 'reporter_summary_limit' );
$t_project_id = helper_get_current_project();
- $t_user_id = auth_get_current_user_id();
# Get the resolution values ot use
$c_res_s = MantisEnum::getValues( $p_resolution_enum_string );
@@ -1083,7 +1064,6 @@ function summary_print_reporter_effectiveness( $p_severity_enum_string, $p_resol
$t_reporter_summary_limit = config_get( 'reporter_summary_limit' );
$t_project_id = helper_get_current_project();
- $t_user_id = auth_get_current_user_id();
$t_severity_multipliers = config_get( 'severity_multipliers' );
$t_resolution_multipliers = config_get( 'resolution_multipliers' );
@@ -1094,7 +1074,6 @@ function summary_print_reporter_effectiveness( $p_severity_enum_string, $p_resol
# Get the resolution values to use
$c_res_s = MantisEnum::getValues( $p_resolution_enum_string );
- $enum_res_count = count( $c_res_s );
# Checking if it's a per project statistic or all projects
$specific_where = helper_project_specific_where( $t_project_id );
View
4 core/tag_api.php
@@ -450,10 +450,8 @@ function tag_delete( $p_tag_id ) {
}
$t_tag_table = db_get_table( 'tag' );
- $t_bug_tag_table = db_get_table( 'bug_tag' );
- $query = "DELETE FROM $t_tag_table
- WHERE id=" . db_param();
+ $query = "DELETE FROM $t_tag_table WHERE id=" . db_param();
db_query_bound( $query, array( $p_tag_id ) );
return true;
View
4 core/user_api.php
@@ -688,7 +688,6 @@ function user_delete( $p_user_id ) {
* @return int|bool
*/
function user_get_id_by_name( $p_username ) {
- global $g_cache_user;
if( $t_user = user_search_cache( 'username', $p_username ) ) {
return $t_user['id'];
}
@@ -1552,9 +1551,6 @@ function user_set_password( $p_user_id, $p_password, $p_allow_protected = false
user_ensure_unprotected( $p_user_id );
}
- $t_email = user_get_field( $p_user_id, 'email' );
- $t_username = user_get_field( $p_user_id, 'username' );
-
# When the password is changed, invalidate the cookie to expire sessions that
# may be active on all browsers.
$c_cookie_string = auth_generate_unique_cookie_string();
View
1  core/utility_api.php
@@ -123,7 +123,6 @@ function ini_get_bool( $p_name ) {
function ini_get_number( $p_name ) {
$t_value = ini_get( $p_name );
- $t_result = 0;
switch( substr( $t_value, -1 ) ) {
case 'G':
case 'g':
View
1  manage_config_email_page.php
@@ -195,7 +195,6 @@ function show_notify_threshold( $p_access, $p_action ) {
* @param string $p_section_name section name
*/
function get_section_begin_for_email( $p_section_name ) {
- global $t_project;
$t_access_levels = MantisEnum::getValues( config_get( 'access_levels_enum_string' ) );
echo '<div class="form-container">'. "\n";
echo '<table class="width100">';
View
13 print_all_bug_options_inc.php
@@ -111,10 +111,10 @@ function edit_printing_prefs( $p_user_id = null, $p_error_if_protected = true, $
$field_name_count = count( $t_field_name_arr );
# Grab the data
- $query = "SELECT print_pref
+ $t_query = "SELECT print_pref
FROM $t_user_print_pref_table
WHERE user_id=" . db_param();
- $result = db_query_bound( $query, array( $c_user_id ) );
+ $result = db_query_bound( $t_query, array( $c_user_id ) );
## OOPS, No entry in the database yet. Lets make one
if ( 0 == db_num_rows( $result ) ) {
@@ -126,19 +126,19 @@ function edit_printing_prefs( $p_user_id = null, $p_error_if_protected = true, $
$t_default = implode( '', $t_default_arr ) ;
# all fields are added by default
- $query = "INSERT
+ $t_query = "INSERT
INTO $t_user_print_pref_table
(user_id, print_pref)
VALUES
(" . db_param() . "," . db_param() . ")";
- $result = db_query_bound( $query, array( $c_user_id, $t_default ) );
+ db_query_bound( $t_query, array( $c_user_id, $t_default ) );
# Rerun select query
- $query = "SELECT print_pref
+ $t_query = "SELECT print_pref
FROM $t_user_print_pref_table
WHERE user_id=" . db_param();
- $result = db_query_bound( $query, array( $c_user_id ) );
+ $result = db_query_bound( $t_query, array( $c_user_id ) );
}
# putting the query result into an array with the same size as $t_fields_arr
@@ -146,7 +146,6 @@ function edit_printing_prefs( $p_user_id = null, $p_error_if_protected = true, $
$t_prefs = $row['print_pref'];
# Account Preferences Form BEGIN
- $t_index_count=0;
?>
<br />
<div>
Please sign in to comment.
Something went wrong with that request. Please try again.