Пример #1
0
 * @package MantisBT
 * @copyright Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
 * @copyright Copyright (C) 2002 - 2013  MantisBT Team - mantisbt-dev@lists.sourceforge.net
 * @link http://www.mantisbt.org
 */
/**
 * MantisBT Core API's
 */
require_once 'core.php';
require_once 'Period.php';
require_once 'graph_api.php';
access_ensure_project_level(config_get('view_summary_threshold'));
$f_width = gpc_get_int('width', 600);
$t_ar = plugin_config_get('bar_aspect');
$t_interval = new Period();
$t_interval->set_period_from_selector('interval');
$f_show_as_table = gpc_get_bool('show_table', FALSE);
$f_summary = gpc_get_bool('summary', FALSE);
$t_interval_days = $t_interval->get_elapsed_days();
if ($t_interval_days <= 14) {
    $t_incr = 60 * 60;
    // less than 14 days, use hourly
} else {
    if ($t_interval_days <= 92) {
        $t_incr = 24 * 60 * 60;
        // less than three months, use daily
    } else {
        $t_incr = 7 * 24 * 60 * 60;
        // otherwise weekly
    }
}