Fixed – well, actually in this case unfortunately $t_file_table  is correct usage as we pass in either {bug_file} or {project_file}.

 

The code to generate that still had the db_get_table call as I was trying to decide on most sensible way to handle this.

 

 

 

From: Victor Boctor [mailto:notifications@github.com] 
Sent: 05 April 2014 05:45
To: mantisbt/mantisbt
Cc: grangeway
Subject: Re: [mantisbt] Mantis 2.0 - Database Layer Patch (#156)

 

In admin/move_attachments.php:

> @@ -107,12 +103,8 @@ function move_attachments_to_disk( $p_type, $p_projects ) {
>                              if( file_put_contents( $t_filename, $t_row['content'] ) ) {
>                                     # successful, update database
>                                     # @todo do we want to check the size of data transfer matches here?
> -                                   $t_update_query = "UPDATE $t_file_table
> -                                           SET diskfile = " . db_param() . ",
> -                                                  folder = " . db_param() . ",
> -                                                  content = ''
> -                                           WHERE id = " . db_param();
> -                                   $t_update_result = db_query_bound(
> +                                   $t_update_query = "UPDATE $t_file_table SET diskfile=%s, folder=%s, content = '' WHERE id=%d";

{file} instead of $t_file_table?

—
Reply to this email directly or view it on GitHub <https://github.com/mantisbt/mantisbt/pull/156/files#r11319991> .