.
/**
* This include file prints out the list of bugnotes attached to the bug
* $f_bug_id must be set and be set to the bug id
*
* @package MantisBT
* @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
* @copyright Copyright (C) 2002 - 2014 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*/
require_once( 'current_user_api.php' );
require_once( 'string_api.php' );
$f_bug_id = gpc_get_int( 'bug_id' );
# grab the user id currently logged in
$t_user_id = auth_get_current_user_id();
$c_bug_id = (integer)$f_bug_id;
if ( !access_has_bug_level( config_get( 'private_bugnote_threshold' ), $f_bug_id ) ) {
$t_restriction = 'AND view_state=' . VS_PUBLIC;
} else {
$t_restriction = '';
}
$t_bugnote_table = db_get_table( 'mantis_bugnote_table' );
$t_bugnote_text_table = db_get_table( 'mantis_bugnote_text_table' );
# get the bugnote data
$t_bugnote_order = current_user_get_pref( 'bugnote_order' );
$query = "SELECT *
FROM $t_bugnote_table
WHERE bug_id=" . db_param() . " $t_restriction
ORDER BY date_submitted $t_bugnote_order";
$result = db_query_bound($query, Array( $c_bug_id ) );
$num_notes = db_num_rows($result);
?>
|
|||||
|
|