'$t_clo_val'"; } $t_resolved_val = RESOLVED; if ( ( 'on' == $f_hide_resolved ) && ( 'resolved' != $f_show_status ) ) { $t_where_clause = $t_where_clause." AND status<>'$t_resolved_val'"; } if ( $f_show_category != 'any' ) { $t_where_clause = $t_where_clause." AND category='$c_show_category'"; } if ( $f_show_severity != 'any' ) { $t_where_clause = $t_where_clause." AND severity='$c_show_severity'"; } if ( $f_show_status != 'any' ) { $t_where_clause = $t_where_clause." AND status='$c_show_status'"; } # Simple Text Search - Thnaks to Alan Knowles if ( $f_search ) { $t_columns_clause = " $g_mantis_bug_table.*"; $t_where_clause .= " AND ((summary LIKE '%$c_search%') OR (description LIKE '%$c_search%') OR (steps_to_reproduce LIKE '%$c_search%') OR (additional_information LIKE '%$c_search%') OR ($g_mantis_bug_table.id LIKE '%$c_search%') OR ($g_mantis_bugnote_text_table.note LIKE '%$c_search%')) AND $g_mantis_bug_text_table.id = $g_mantis_bug_table.bug_text_id"; $t_from_clause = " FROM $g_mantis_bug_table, $g_mantis_bug_text_table LEFT JOIN $g_mantis_bugnote_table ON $g_mantis_bugnote_table.bug_id = $g_mantis_bug_table.id LEFT JOIN $g_mantis_bugnote_text_table ON $g_mantis_bugnote_text_table.id = $g_mantis_bugnote_table.bugnote_text_id "; } else { $t_columns_clause = ' *'; $t_from_clause = " FROM $g_mantis_bug_table"; } if ( is_blank( $c_sort ) ) { $c_sort='last_updated'; } $query = 'SELECT DISTINCT '.$t_columns_clause.', UNIX_TIMESTAMP(last_updated) as last_updated'; $query .= $t_from_clause; $query .= $t_where_clause; $query = $query." ORDER BY '$c_sort' $c_dir"; if ( $f_sort != 'priority' ) { $query = $query.', priority DESC'; } $query = $query." LIMIT $c_offset, $c_per_page"; # perform query $result = db_query( $query ); $row_count = db_num_rows( $result ); # for export $t_show_flag = gpc_get_int( 'show_flag', 0 ); ?>
|
|