Skip to content

Commit

Permalink
Fix spelling mistakes
Browse files Browse the repository at this point in the history
Typos found using [misspell tool](https://github.com/client9/misspell).
  • Loading branch information
vboctor committed Dec 5, 2018
1 parent e493a7f commit 50a0314
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 28 deletions.
2 changes: 1 addition & 1 deletion core/authentication_api.php
Expand Up @@ -1046,7 +1046,7 @@ function auth_is_cookie_valid( $p_cookie_string ) {
return false;
}

# succeeed if user has already been authenticated
# succeed if user has already been authenticated
if( NO_USER != $g_cache_current_user_id ) {
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions core/classes/BugFilterQuery.class.php
Expand Up @@ -1077,7 +1077,7 @@ protected function build_prop_relationship() {
$t_where = $t_table_dst . '.relationship_type IS NULL AND ' . $t_table_src . '.relationship_type IS NULL';
} else {
# rel NONE, bug ID, those bugs that are not related in any way to bug ID
# map to a non-existant relation type -1 to include nulls
# map to a non-existent relation type -1 to include nulls
# not including the self id
$t_where = 'NOT COALESCE(' . $t_table_dst . '.source_bug_id, -1) = ' . $this->param( $c_rel_bug )
. ' AND NOT COALESCE(' . $t_table_src . '.destination_bug_id, -1) = ' . $this->param( $c_rel_bug )
Expand All @@ -1099,7 +1099,7 @@ protected function build_prop_relationship() {
# relation is specified
if( META_FILTER_NONE == $c_rel_bug ) {
# rel REL, bug NONE, those bugs that don't have any REL relation (may have other types)
# map to a non-existant relation type -1 to include nulls
# map to a non-existent relation type -1 to include nulls
$t_where = 'COALESCE(' . $t_table_dst . '.relationship_type, -1) <> ' . $this->param( $t_comp_type )
. ' AND COALESCE(' . $t_table_src . '.relationship_type, -1) <> ' . $this->param( $c_rel_type );
} elseif( META_FILTER_ANY == $c_rel_bug ) {
Expand Down
2 changes: 1 addition & 1 deletion core/classes/ConfigParser.class.php
Expand Up @@ -57,7 +57,7 @@ public function __construct( $p_code ) {
/**
* Parse the code for a variable assignment.
* Handles scalar types, and various array types (simple, associative,
* multi-dimentional)
* multi-dimensional)
* @param integer $p_extra_tokens Define how extra tokens should be handled
* - EXTRA_TOKENS_IGNORE silently ignore any
* extra code given after the first token
Expand Down
2 changes: 1 addition & 1 deletion core/classes/DbQuery.class.php
Expand Up @@ -48,7 +48,7 @@
* supported formats:
* - ":{string}" For labeled parameters. Binded values are stored in $query_bind_array
* - "${int}" For anonymous parameters. Binded values are stored in $query_autobind_array
* - "${string}{int}" For special constructs, eg: $in0 for late binding IN caluses
* - "${string}{int}" For special constructs, eg: $in0 for late binding IN clauses
* 2) $expanded_query_string: stores the query string after expansion of special constructs
* into standard "${int}" parameters
* 3) $db_query_string: stores the query string after all parameters have been renamed,
Expand Down
9 changes: 5 additions & 4 deletions core/csv_api.php
Expand Up @@ -78,11 +78,12 @@ function csv_get_newline() {
* @access public
*/
function csv_get_separator() {
static $s_seperator = null;
if( $s_seperator === null ) {
$s_seperator = config_get( 'csv_separator' );
static $s_separator = null;
if( $s_separator === null ) {
$s_separator = config_get( 'csv_separator' );
}
return $s_seperator;

return $s_separator;
}

/**
Expand Down
6 changes: 4 additions & 2 deletions core/custom_field_api.php
Expand Up @@ -264,13 +264,15 @@ function custom_field_cache_values( array $p_bug_id_array, array $p_field_id_arr
if( !isset( $g_cache_cf_bug_values[$c_bug_id] ) ) {
$g_cache_cf_bug_values[$c_bug_id] = array();
}

$c_field_id = (int)$t_row['field_id'];
$t_value_column = ( $f_cf_defs[$c_field_id]['type'] == CUSTOM_FIELD_TYPE_TEXTAREA ? 'text' : 'value' );
$t_value = $t_row[$t_value_column];
if( null !== $t_value ) {
$t_value = custom_field_database_to_value( $t_value, $f_cf_defs[$c_field_id]['type'] );
}
# non-existant will be stored as null

# non-existent will be stored as null
$g_cache_cf_bug_values[$c_bug_id][$c_field_id] = $t_value;
}
}
Expand Down Expand Up @@ -1398,7 +1400,7 @@ function custom_field_set_sequence( $p_field_id, $p_project_id, $p_sequence ) {
* Print an input field
* $p_field_def contains the definition of the custom field (including it's field id
* $p_bug_id contains the bug where this field belongs to. If it's left
* away, it'll default to 0 and thus belongs to a new (i.e. non-existant) bug
* away, it'll default to 0 and thus belongs to a new (i.e. non-existent) bug
* NOTE: This probably belongs in the print_api.php
* @param array $p_field_def Custom field definition.
* @param integer $p_bug_id A bug identifier.
Expand Down
2 changes: 1 addition & 1 deletion core/filter_api.php
Expand Up @@ -1278,7 +1278,7 @@ function filter_get_bug_count( array $p_query_clauses, $p_pop_param = true ) {

error_parameters( __FUNCTION__ . '()', 'BugFilterQuery class' );
trigger_error( ERROR_DEPRECATED_SUPERSEDED, DEPRECATED );
# If query caluses is an empty array, the query can't be created
# If query clauses is an empty array, the query can't be created
if( empty( $p_query_clauses ) ) {
if( $p_pop_param ) {
# reset the db_param stack, this woould have been done by db_query if executed
Expand Down
6 changes: 3 additions & 3 deletions core/graphviz_api.php
Expand Up @@ -360,9 +360,9 @@ function output( $p_format = 'dot', $p_headers = false ) {
);

$t_pipes = array();
$t_proccess = proc_open( $t_command, $t_descriptors, $t_pipes );
$t_process = proc_open( $t_command, $t_descriptors, $t_pipes );

if( is_resource( $t_proccess ) ) {
if( is_resource( $t_process ) ) {
# Filter generated output through dot
fwrite( $t_pipes[0], $t_dot_source );
fclose( $t_pipes[0] );
Expand All @@ -384,7 +384,7 @@ function output( $p_format = 'dot', $p_headers = false ) {
}

fclose( $t_pipes[1] );
proc_close( $t_proccess );
proc_close( $t_process );
}
}

Expand Down
2 changes: 1 addition & 1 deletion core/install_helper_functions_api.php
Expand Up @@ -797,7 +797,7 @@ function install_print_unserialize_error( $p_description, $p_table, $p_error, $p
printf('<p><br>%s could not be converted because its data is not valid. '
. 'Fix the problem by manually repairing or deleting the '
. 'offending %s row as appropriate, then try again.'
. '<br>Error: <em>%s</em> occured because of the string below</p>'
. '<br>Error: <em>%s</em> occurred because of the string below</p>'
. '<pre>%s</pre>',
$p_description,
db_get_table( $p_table ),
Expand Down
4 changes: 2 additions & 2 deletions core/summary_api.php
Expand Up @@ -134,7 +134,7 @@ function summary_helper_build_bugcount( &$p_cache, $p_key, $p_status, $p_bugcoun
*
* @param string $p_bug_link The base bug link.
* @param string &$p_bugs_open The open bugs count, return open bugs link.
* @param string &$p_bugs_resolved The resovled bugs count, return resolved bugs link.
* @param string &$p_bugs_resolved The resolved bugs count, return resolved bugs link.
* @param string &$p_bugs_closed The closed bugs count, return closed bugs link.
* @param string &$p_bugs_total The total bugs count, return total bugs link.
* @return void
Expand All @@ -160,7 +160,7 @@ function summary_helper_build_buglinks( $p_bug_link, &$p_bugs_open, &$p_bugs_res
/**
* Calculate bug ratio
* @param integer $p_bugs_open The open bugs count.
* @param integer $p_bugs_resolved The resovled bugs count.
* @param integer $p_bugs_resolved The resolved bugs count.
* @param integer $p_bugs_closed The closed bugs count.
* @param integer $p_bugs_total_count The total bugs count.
* @return array array of ($t_bugs_resolved_ratio, $t_bugs_ratio)
Expand Down
21 changes: 11 additions & 10 deletions core/tag_api.php
Expand Up @@ -75,20 +75,20 @@
function tag_cache_rows( array $p_tag_ids ) {
global $g_cache_tags;

$t_ids_to_seach = array();
$t_ids_to_search = array();
foreach( $p_tag_ids as $t_id ) {
if( !isset( $g_cache_tags[(int)$t_id]) ) {
$t_ids_to_seach[(int)$t_id] = (int)$t_id;
$t_ids_to_search[(int)$t_id] = (int)$t_id;
}
}
if( empty( $t_ids_to_seach ) ) {
if( empty( $t_ids_to_search ) ) {
return;
}

db_param_push();
$t_sql_in_params = array();
$t_params = array();
foreach( $t_ids_to_seach as $t_id ) {
foreach( $t_ids_to_search as $t_id ) {
$t_sql_in_params[] = db_param();
$t_params[] = $t_id;
}
Expand All @@ -98,10 +98,10 @@ function tag_cache_rows( array $p_tag_ids ) {
while( $t_row = db_fetch_array( $t_result ) ) {
$c_id = (int)$t_row['id'];
$g_cache_tags[$c_id] = $t_row;
unset( $t_ids_to_seach[$c_id] );
unset( $t_ids_to_search[$c_id] );
}
# mark the non existent ids
foreach( $t_ids_to_seach as $t_id ) {
foreach( $t_ids_to_search as $t_id ) {
$g_cache_tags[$t_id] = false;
}
}
Expand All @@ -116,20 +116,21 @@ function tag_cache_rows( array $p_tag_ids ) {
function tag_cache_bug_tag_rows( array $p_bug_ids ) {
global $g_cache_bug_tags;

$t_ids_to_seach = array();
$t_ids_to_search = array();
foreach( $p_bug_ids as $t_id ) {
if( !isset( $g_cache_bug_tags[(int)$t_id]) ) {
$t_ids_to_seach[] = (int)$t_id;
$t_ids_to_search[] = (int)$t_id;
}
}
if( empty( $t_ids_to_seach ) ) {

if( empty( $t_ids_to_search ) ) {
return;
}

db_param_push();
$t_sql_in_params = array();
$t_params = array();
foreach( $t_ids_to_seach as $t_id ) {
foreach( $t_ids_to_search as $t_id ) {
$t_sql_in_params[] = db_param();
$t_params[] = $t_id;
}
Expand Down

0 comments on commit 50a0314

Please sign in to comment.