Skip to content

Commit

Permalink
Revert "Rename Array() calls to array()"
Browse files Browse the repository at this point in the history
This reverts commit 53cdda7.

Conflicts:
	core/print_api.php

Conflicts:
	core/bugnote_api.php
  • Loading branch information
dregad committed Oct 11, 2013
1 parent cd1df15 commit f30363b
Show file tree
Hide file tree
Showing 56 changed files with 568 additions and 568 deletions.
4 changes: 2 additions & 2 deletions account_sponsor_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
AND $t_project_clause
ORDER BY s.paid ASC, b.project_id ASC, b.fixed_in_version ASC, b.status ASC, b.id DESC";

$result = db_query_bound( $query, $t_show_all ? array( $t_user ) : array( $t_user , $t_resolved ) );
$result = db_query_bound( $query, $t_show_all ? Array( $t_user ) : Array( $t_user , $t_resolved ) );

$t_sponsors = db_num_rows( $result );
if ( 0 == $t_sponsors ) {
Expand Down Expand Up @@ -236,7 +236,7 @@
AND $t_project_clause
ORDER BY s.paid ASC, b.project_id ASC, b.fixed_in_version ASC, b.status ASC, b.id DESC";

$result = db_query_bound( $query, $t_show_all ? array( $t_user ) : array( $t_user , $t_resolved ) );
$result = db_query_bound( $query, $t_show_all ? Array( $t_user ) : Array( $t_user , $t_resolved ) );
$t_sponsors = db_num_rows( $result );
if ( 0 == $t_sponsors ) {
echo '<p>' . lang_get( 'no_sponsored' ) . '</p>';
Expand Down
2 changes: 1 addition & 1 deletion admin/copy_field.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
$t_bug_table = db_get_table( 'bug' );
$query = 'SELECT * FROM ' . $t_string_table . ' WHERE field_id = ' . db_param() . ' and value <> ' . db_param();

$result = @db_query_bound( $query, array( $f_source_field_id, '' ) );
$result = @db_query_bound( $query, Array( $f_source_field_id, '' ) );
if( FALSE == $result ) {
echo '<p>No fields need to be updated.</p>';
}
Expand Down
8 changes: 4 additions & 4 deletions admin/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function print_test( $p_test_description, $p_result, $p_hard_fail = true, $p_mes
# create an SQLArray to insert data
function InsertData( $p_table, $p_data ) {
$query = "INSERT INTO " . $p_table . $p_data;
return array( $query );
return Array( $query );
}

# install_state
Expand Down Expand Up @@ -595,7 +595,7 @@ function InsertData( $p_table, $p_data ) {
$t_db_open = true;
}
} else {
$sqlarray = $dict->CreateDatabase( $f_database_name, array( 'mysql' => 'DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci' ) );
$sqlarray = $dict->CreateDatabase( $f_database_name, Array( 'mysql' => 'DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci' ) );
$ret = $dict->ExecuteSQLArray( $sqlarray, false );
if( $ret == 2 ) {
print_test_result( GOOD );
Expand Down Expand Up @@ -706,12 +706,12 @@ function InsertData( $p_table, $p_data ) {
/* 0: function to call, 1: function params, 2: function to evaluate before calling upgrade, if false, skip upgrade. */
if( isset( $upgrade[$i][2] ) ) {
if( call_user_func_array( $upgrade[$i][2][0], $upgrade[$i][2][1] ) ) {
$sqlarray = call_user_func_array( array( $dict, $upgrade[$i][0] ), $upgrade[$i][1] );
$sqlarray = call_user_func_array( Array( $dict, $upgrade[$i][0] ), $upgrade[$i][1] );
} else {
$sqlarray = array();
}
} else {
$sqlarray = call_user_func_array( array( $dict, $upgrade[$i][0] ), $upgrade[$i][1] );
$sqlarray = call_user_func_array( Array( $dict, $upgrade[$i][0] ), $upgrade[$i][1] );
}
}
if( $f_log_queries ) {
Expand Down
442 changes: 221 additions & 221 deletions admin/schema.php

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions admin/test_langs.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
checklangdir( $t_mantis_dir );
}
else {
$t_lang_files = array();
$t_lang_files = Array();
foreach( $g_language_choices_arr as $t_lang ) {
if( $t_lang == 'auto' ) {
continue;
Expand Down Expand Up @@ -180,11 +180,11 @@ function checkfile( $p_path, $p_file, $p_quiet = false ) {
return true;
}

$basevariables = array();
$basevariables = Array();

function checktoken( $file, $base = false ) {
$in_php_code = false;
$variables = array();
$variables = Array();
global $basevariables;
$current_var = null;
$last_token = 0;
Expand Down
4 changes: 2 additions & 2 deletions admin/upgrade_unattended.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ function print_test_result( $p_result, $p_hard_fail = true, $p_message = '' ) {
if( $upgrade[$i][0] == 'InsertData' ) {
$sqlarray = call_user_func_array( $upgrade[$i][0], $upgrade[$i][1] );
} else {
$sqlarray = call_user_func_array( array( $dict, $upgrade[$i][0] ), $upgrade[$i][1] );
$sqlarray = call_user_func_array( Array( $dict, $upgrade[$i][0] ), $upgrade[$i][1] );
}

$ret = $dict->ExecuteSQLarray( $sqlarray );
$ret = $dict->ExecuteSQLArray( $sqlarray );
if( $ret == 2 ) {
print_test_result( GOOD );
config_set( 'database_version', $i );
Expand Down
2 changes: 1 addition & 1 deletion api/soap/mc_file_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function mci_file_add( $p_id, $p_name, $p_content, $p_file_type, $p_table, $p_ti
. db_param() . ", " . db_param() . ", " . db_param() . ", "
. db_param() . ", " . db_param() . ", " . db_param() . ", "
. db_param() . ", " . db_param() . " )";
db_query_bound( $query, array(
db_query_bound( $query, Array(
$t_id,
$p_title,
$p_desc,
Expand Down
22 changes: 11 additions & 11 deletions api/soap/mc_issue_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,35 +459,35 @@ function mc_issue_get_biggest_id( $p_username, $p_password, $p_project_id ) {
$t_none = defined( 'META_FILTER_NONE' ) ? META_FILTER_NONE : 'none';

$t_filter = array(
'category_id' => array(
'category_id' => Array(
'0' => $t_any,
),
'severity' => array(
'severity' => Array(
'0' => $t_any,
),
'status' => array(
'status' => Array(
'0' => $t_any,
),
'highlight_changed' => 0,
'reporter_id' => array(
'reporter_id' => Array(
'0' => $t_any,
),
'handler_id' => array(
'handler_id' => Array(
'0' => $t_any,
),
'resolution' => array(
'resolution' => Array(
'0' => $t_any,
),
'build' => array(
'build' => Array(
'0' => $t_any,
),
'version' => array(
'version' => Array(
'0' => $t_any,
),
'hide_status' => array(
'hide_status' => Array(
'0' => $t_none,
),
'monitor_user_id' => array(
'monitor_user_id' => Array(
'0' => $t_any,
),
'dir' => 'DESC',
Expand Down Expand Up @@ -544,7 +544,7 @@ function mc_issue_get_id_from_summary( $p_username, $p_password, $p_summary ) {
FROM $t_bug_table
WHERE summary = " . db_param();

$result = db_query_bound( $query, array( $p_summary ), 1 );
$result = db_query_bound( $query, Array( $p_summary ), 1 );

if( db_num_rows( $result ) == 0 ) {
return 0;
Expand Down
2 changes: 1 addition & 1 deletion changelog_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function print_project_header_changelog ( $p_project_name ) {
$t_issue_parents = array();
$t_issue_handlers = array();

$t_result = db_query_bound( $query, array( $t_project_id, $t_version ) );
$t_result = db_query_bound( $query, Array( $t_project_id, $t_version ) );

while ( $t_row = db_fetch_array( $t_result ) ) {
# hide private bugs if user doesn't have access to view them.
Expand Down
4 changes: 2 additions & 2 deletions core/access_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function access_cache_matrix_project( $p_project_id ) {
$query = "SELECT user_id, access_level
FROM $t_project_user_list_table
WHERE project_id=" . db_param();
$result = db_query_bound( $query, array( (int)$p_project_id ) );
$result = db_query_bound( $query, Array( (int)$p_project_id ) );
$count = db_num_rows( $result );
for( $i = 0;$i < $count;$i++ ) {
$row = db_fetch_array( $result );
Expand Down Expand Up @@ -167,7 +167,7 @@ function access_cache_matrix_user( $p_user_id ) {
$query = "SELECT project_id, access_level
FROM $t_project_user_list_table
WHERE user_id=" . db_param();
$result = db_query_bound( $query, array( (int)$p_user_id ) );
$result = db_query_bound( $query, Array( (int)$p_user_id ) );

$count = db_num_rows( $result );

Expand Down
10 changes: 5 additions & 5 deletions core/authentication_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ function auth_does_password_match( $p_user_id, $p_test_password ) {
}

$t_password = user_get_field( $p_user_id, 'password' );
$t_login_methods = array(
$t_login_methods = Array(
MD5,
CRYPT,
PLAIN,
Expand Down Expand Up @@ -573,7 +573,7 @@ function auth_is_cookie_string_unique( $p_cookie_string ) {
$query = "SELECT COUNT(*)
FROM $t_user_table
WHERE cookie_string=" . db_param();
$result = db_query_bound( $query, array( $p_cookie_string ) );
$result = db_query_bound( $query, Array( $p_cookie_string ) );
$t_count = db_result( $result );

if( $t_count > 0 ) {
Expand Down Expand Up @@ -617,7 +617,7 @@ function auth_get_current_user_cookie( $p_login_anonymous=true ) {

# get anonymous information if database is available
$query = 'SELECT id, cookie_string FROM ' . db_get_table( 'user' ) . ' WHERE username = ' . db_param();
$result = db_query_bound( $query, array( config_get( 'anonymous_account' ) ) );
$result = db_query_bound( $query, Array( config_get( 'anonymous_account' ) ) );

if( 1 == db_num_rows( $result ) ) {
$row = db_fetch_array( $result );
Expand Down Expand Up @@ -782,7 +782,7 @@ function auth_is_cookie_valid( $p_cookie_string ) {
$query = "SELECT *
FROM $t_user_table
WHERE cookie_string=" . db_param();
$result = db_query_bound( $query, array( $p_cookie_string ) );
$result = db_query_bound( $query, Array( $p_cookie_string ) );

# return true if a matching cookie was found
if( 1 == db_num_rows( $result ) ) {
Expand Down Expand Up @@ -819,7 +819,7 @@ function auth_get_current_user_id() {
$query = "SELECT id
FROM $t_user_table
WHERE cookie_string=" . db_param();
$result = db_query_bound( $query, array( $t_cookie_string ) );
$result = db_query_bound( $query, Array( $t_cookie_string ) );

# The cookie was invalid. Clear the cookie (to allow people to log in again)
# and give them an Access Denied message.
Expand Down
Loading

0 comments on commit f30363b

Please sign in to comment.