View Issue Details

IDProjectCategoryView StatusLast Update
0004158mantisbtsqlpublic2004-08-29 02:28
Reportergrangeway Assigned Tograngeway  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Versiongit trunk 
Fixed in Version0.19.0rc1 
Summary0004158: Sql Error in bug_copy
Description

bug_copy causes an sql error against mssql:

UPDATE mantis_bug_table
SET date_submitted='''2004-07-13 09:13:50AM'''
WHERE id='911'

When updating a bug, we call a different function to set the date_submitted type values.
In bug_copy, we treat it as a string, and 'addslashes' to it, which is not needed.

i.e. in bug_api, lines 480-481 read:
bug_set_field( $t_new_bug_id, 'date_submitted', $t_mantis_db->DBTimeStamp( $t_bug_data->date_submitted ) );
bug_set_field( $t_new_bug_id, 'last_updated', $t_mantis_db->DBTimeStamp( $t_bug_data->last_updated ) );

This is not correct as bug_set_field prepares the string, adding an extra pair of slashes.

bug_update calls bug_update_date( $p_bug_id ); which does not have this issue (only passes db_now).
We should modify bug_update_date to also take a custom date and call this instead of set_field.

TagsNo tags attached.

Relationships

child of 0003987 closedvboctor Mantis 0.19.0 Release 

Activities

There are no notes attached to this issue.