From: Glenn H. <thr...@us...> - 2005-03-24 02:55:33
|
Update of /cvsroot/mantisbt/mantisbt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7634/core Modified Files: bugnote_api.php custom_field_api.php filter_api.php Log Message: fix for 0005380: Invalid LEFT JOIN syntax for Oracle database compatibility: remove AS from alias clauses Index: bugnote_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/bugnote_api.php,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- bugnote_api.php 21 Mar 2005 02:03:12 -0000 1.34 +++ bugnote_api.php 24 Mar 2005 02:55:22 -0000 1.35 @@ -301,8 +301,8 @@ } $query = "SELECT b.*, t.note - FROM $t_bugnote_table AS b - LEFT JOIN $t_bugnote_text_table AS t ON b.bugnote_text_id = t.id + FROM $t_bugnote_table b + LEFT JOIN $t_bugnote_text_table t ON b.bugnote_text_id = t.id WHERE b.bug_id = '$c_bug_id' ORDER BY b.date_submitted $p_user_bugnote_order"; $t_bugnotes = array(); Index: custom_field_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/custom_field_api.php,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- custom_field_api.php 21 Mar 2005 02:03:12 -0000 1.50 +++ custom_field_api.php 24 Mar 2005 02:55:23 -0000 1.51 @@ -776,9 +776,9 @@ $t_custom_field_string_table = config_get( 'mantis_custom_field_string_table' ); $query = "SELECT f.name, f.type, f.access_level_r, f.default_value, f.type, s.value - FROM $t_custom_field_project_table AS p INNER JOIN $t_custom_field_table AS f + FROM $t_custom_field_project_table p INNER JOIN $t_custom_field_table f ON p.field_id = f.id - LEFT JOIN $t_custom_field_string_table AS s + LEFT JOIN $t_custom_field_string_table s ON p.field_id=s.field_id AND s.bug_id='$c_bug_id' WHERE p.project_id = '$c_project_id' ORDER BY p.sequence ASC, f.name ASC"; Index: filter_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/filter_api.php,v retrieving revision 1.92 retrieving revision 1.93 diff -u -d -r1.92 -r1.93 --- filter_api.php 23 Mar 2005 20:01:39 -0000 1.92 +++ filter_api.php 24 Mar 2005 02:55:23 -0000 1.93 @@ -493,7 +493,7 @@ $t_clauses = array(); $t_table_name = 'user_monitor'; array_push( $t_from_clauses, $t_bug_monitor_table ); - array_push( $t_join_clauses, "LEFT JOIN $t_bug_monitor_table as $t_table_name ON $t_table_name.bug_id = $t_bug_table.id" ); + array_push( $t_join_clauses, "LEFT JOIN $t_bug_monitor_table $t_table_name ON $t_table_name.bug_id = $t_bug_table.id" ); foreach( $t_filter['user_monitor'] as $t_filter_member ) { $c_user_monitor = db_prepare_int( $t_filter_member ); @@ -522,9 +522,9 @@ $t_clauses = array(); $t_table_name = 'relationship'; array_push( $t_from_clauses, $t_bug_relationship_table ); - array_push( $t_join_clauses, "LEFT JOIN $t_bug_relationship_table as $t_table_name ON $t_table_name.destination_bug_id = $t_bug_table.id" ); + array_push( $t_join_clauses, "LEFT JOIN $t_bug_relationship_table $t_table_name ON $t_table_name.destination_bug_id = $t_bug_table.id" ); // get reverse relationships - if ( $c_rel_type == 1 ) array_push( $t_join_clauses, "LEFT JOIN $t_bug_relationship_table as $t_table_name"."2 ON $t_table_name"."2.source_bug_id = $t_bug_table.id" ); + if ( $c_rel_type == 1 ) array_push( $t_join_clauses, "LEFT JOIN $t_bug_relationship_table $t_table_name"."2 ON $t_table_name"."2.source_bug_id = $t_bug_table.id" ); array_push( $t_clauses, "($t_table_name.relationship_type='$c_rel_type' AND $t_table_name.source_bug_id='$c_rel_bug')" ); // get reverse relationships if ( $c_rel_type == 1 ) array_push( $t_clauses, "($t_table_name"."2.relationship_type='$c_rel_type' AND $t_table_name"."2.destination_bug_id='$c_rel_bug')" ); @@ -552,7 +552,7 @@ if ( !$t_any_found ) { $t_def = custom_field_get_definition( $t_cfid ); $t_table_name = $t_custom_field_string_table . '_' . $t_cfid; - array_push( $t_join_clauses, "LEFT JOIN $t_custom_field_string_table as $t_table_name ON $t_table_name.bug_id = $t_bug_table.id" ); + array_push( $t_join_clauses, "LEFT JOIN $t_custom_field_string_table $t_table_name ON $t_table_name.bug_id = $t_bug_table.id" ); if ($t_def['type'] == CUSTOM_FIELD_TYPE_DATE) { switch ($t_filter['custom_fields'][$t_cfid][0]) { |