Skip to content

Commit

Permalink
SOAP API: replace db_query() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhicks committed Sep 17, 2011
1 parent 4ab3ee3 commit acb7882
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/services/soap/mc_api.php
Expand Up @@ -257,7 +257,7 @@ function mci_filter_db_get_available_queries( $p_project_id = null, $p_user_id =
OR project_id='0')
AND name!=''
ORDER BY is_public DESC, name ASC";
$result = db_query( $query );
$result = db_query_bound( $query, array() );
$query_count = db_num_rows( $result );

for( $i = 0;$i < $query_count;$i++ ) {
Expand Down
4 changes: 2 additions & 2 deletions application/services/soap/mc_file_api.php
Expand Up @@ -124,7 +124,7 @@ function mci_file_add( $p_id, $p_name, $p_content, $p_file_type, $p_table, $p_ti
(" . $p_table . "_id, title, description, diskfile, filename, folder, filesize, file_type, date_added, content, user_id)
VALUES
($c_id, '$c_title', '$c_desc', '$c_disk_file_name', '$c_new_file_name', '$c_file_path', $c_file_size, '$c_file_type', '" . db_now() . "', $c_content, $c_user_id)";
db_query( $query );
db_query_bound( $query, array() );

# get attachment id
$t_attachment_id = db_insert_id( $t_file_table );
Expand Down Expand Up @@ -170,7 +170,7 @@ function mci_file_get( $p_file_id, $p_type, $p_user_id ) {
return new soap_fault( 'Server', '', 'Invalid file type '.$p_type. ' .' );
}

$result = db_query( $query );
$result = db_query_bound( $query, array() );

if ( $result->EOF ) {
return new soap_fault( 'Client', '', 'Unable to find an attachment with type ' . $p_type. ' and id ' . $p_file_id . ' .' );
Expand Down
2 changes: 1 addition & 1 deletion application/services/soap/mc_project_api.php
Expand Up @@ -600,7 +600,7 @@ function mc_project_get_attachments( $p_username, $p_password, $p_project_id ) {
( ( pult.user_id = $t_user_id ) AND ( pult.access_level $t_access_clause ) ) OR
( ut.access_level = $t_admin ) )
ORDER BY pt.name ASC, pft.title ASC";
$result = db_query( $query );
$result = db_query_bound( $query, array() );
$num_files = db_num_rows( $result );

$t_result = array();
Expand Down

0 comments on commit acb7882

Please sign in to comment.