Mantis Bug 1.0.7
Posted: 03 May 2007, 15:50
There is a bug in the code for the 1.0.7 release in the file core/history_api.php, function history_get_events(), line 73:
As you can see, the config value is being loaded into the variable $t_mantis_bug_history_table, but then the variable $t_bug_history_table is being used in the SQL query. The result is an error message being displayed:
Changing line 73 fixes this.
-Robert[/code]
Code: Select all
66 function history_get_events( $p_bug_id ) {
67 $t_mantis_bug_history_table = config_get( 'mantis_bug_history_table' );
68 $t_mantis_user_table = config_get( 'mantis_user_table' );
69
70 $c_bug_id = db_prepare_int( $p_bug_id );
71
72 $query = "SELECT b.*, u.username
73 FROM $t_bug_history_table b
74 LEFT JOIN $t_mantis_user_table u
75 ON b.user_id=u.id
76 WHERE bug_id='$c_bug_id'
77 ORDER BY date_modified DESC";
78 $result = db_query( $query );
79 }Code: Select all
APPLICATION ERROR #401
Database query failed. Error received from database was #1146: Table 'mantis_107.b' doesn't exist for the query: SELECT b.*, u.username
FROM b
LEFT JOIN mantis_user_table u
ON b.user_id=u.id
WHERE bug_id='2'
ORDER BY date_modified DESC
Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.-Robert[/code]