# # You should have received a copy of the GNU General Public License # along with MantisBT. If not, see <http://www.gnu.org/licenses/>. /** * @package MantisBT * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net * @link http://www.mantisbt.org */ /** * MantisBT Core API's */ require_once 'core.php'; plugin_require_api('core/gantt_api.php'); require_api('version_api.php'); access_ensure_project_level(config_get('view_summary_threshold')); $f_project_id = gpc_get_int('project_id', null); $f_version_id = gpc_get_int('version_id', null); $f_inherited = gpc_get_bool('inherited', true); $f_start_index = gpc_get_int('start_index', -1); $f_length = gpc_get_int('length', null); $f_slice = gpc_get_int('slice', null); if (null != $f_project_id && null != $f_version_id) { $t_metrics = gantt_create_summary($f_project_id, $f_version_id, $f_inherited, $f_start_index, $f_length); $t_gantt_chart_title = project_get_name($f_project_id); $t_gantt_chart_subtitle = version_full_name($f_version_id, $f_inherited, $f_project_id); if ($f_start_index != -1 && $f_length != null) { $t_gantt_chart_subtitle .= " (" . plugin_lang_get('part') . $f_slice . ")"; } gantt_chart($t_metrics, $t_gantt_chart_title, $t_gantt_chart_subtitle); }
*/ require_once 'core.php'; plugin_require_api('core/gantt_api.php'); require_api('version_api.php'); $f_page_number = gpc_get_int('page_number', 1); access_ensure_project_level(config_get('view_summary_threshold')); $t_bugslist = gpc_get_cookie(config_get('bug_list_cookie'), false); $t_project_id = helper_get_current_project(); if ($t_bugslist) { # gather the data for the gantt chart $t_metrics_summary = gantt_create_summary_from_bug_list($t_bugslist); $t_gantt_chart_title = project_get_name($t_project_id); $t_gantt_chart_subtitle = plugin_lang_get('filter'); $t_filter = current_user_get_bug_filter(); # NOTE: this check might be better placed in current_user_get_bug_filter() if ($t_filter === false) { $t_filter = filter_get_default(); } $t_per_page = null; $t_bug_count = null; $t_page_count = null; $rows = filter_get_bug_rows($f_page_number, $t_per_page, $t_page_count, $t_bug_count, null, null, null, true); $v_start = 0; $v_end = 0; if (count($rows) > 0) { $v_start = $t_filter[FILTER_PROPERTY_ISSUES_PER_PAGE] * ($f_page_number - 1) + 1; $v_end = $v_start + count($rows) - 1; } $t_gantt_chart_subtitle .= " ({$v_start} - {$v_end} / {$t_bug_count})"; gantt_chart($t_metrics_summary, $t_gantt_chart_title, $t_gantt_chart_subtitle); }