コード例 #1
0
    if (!filter_is_cookie_valid()) {
        print_header_redirect('view_all_set.php?type=0&print=1');
    }
    $t_setting_arr = explode('#', $t_cookie_value, 2);
    $t_filter_cookie_arr = unserialize($t_setting_arr[1]);
    $f_highlight_changed = $t_filter_cookie_arr[FILTER_PROPERTY_HIGHLIGHT_CHANGED];
    $f_sort = $t_filter_cookie_arr[FILTER_PROPERTY_SORT_FIELD_NAME];
    $f_dir = $t_filter_cookie_arr[FILTER_PROPERTY_SORT_DIRECTION];
    $t_project_id = helper_get_current_project();
}
# This replaces the actual search that used to be here
$f_page_number = gpc_get_int('page_number', 1);
$t_per_page = -1;
$t_bug_count = null;
$t_page_count = null;
$result = filter_get_bug_rows($f_page_number, $t_per_page, $t_page_count, $t_bug_count);
$row_count = count($result);
# pre-cache custom column data
columns_plugin_cache_issue_data($result);
# for export
$t_show_flag = gpc_get_int('show_flag', 0);
html_page_top1();
html_head_end();
html_body_begin();
?>

<table class="width100"><tr><td class="form-title">
	<div class="center">
		<?php 
echo string_display(config_get('window_title')) . ' - ' . string_display(project_get_name($t_project_id));
?>
コード例 #2
0
ファイル: mc_project_api.php プロジェクト: kaos/mantisbt
function mc_project_get_issue_headers($p_username, $p_password, $p_project_id, $p_page_number, $p_per_page)
{
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return mci_soap_fault_login_failed();
    }
    if (!project_exists($p_project_id)) {
        return new soap_fault('Client', '', "Project '{$p_project_id}' does not exist.");
    }
    if (!mci_has_readonly_access($t_user_id, $p_project_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    $t_page_count = 0;
    $t_bug_count = 0;
    $t_rows = filter_get_bug_rows($p_page_number, $p_per_page, $t_page_count, $t_bug_count, null, $p_project_id);
    $t_result = array();
    foreach ($t_rows as $t_issue_data) {
        $t_id = $t_issue_data->id;
        $t_issue = array();
        $t_issue['id'] = $t_id;
        $t_issue['view_state'] = $t_issue_data->view_state;
        $t_issue['last_updated'] = timestamp_to_iso8601($t_issue_data->last_updated);
        $t_issue['project'] = $t_issue_data->project_id;
        $t_issue['category'] = mci_get_category($t_issue_data->category_id);
        $t_issue['priority'] = $t_issue_data->priority;
        $t_issue['severity'] = $t_issue_data->severity;
        $t_issue['status'] = $t_issue_data->status;
        $t_issue['reporter'] = $t_issue_data->reporter_id;
        $t_issue['summary'] = $t_issue_data->summary;
        if (!empty($t_issue_data->handler_id)) {
            $t_issue['handler'] = $t_issue_data->handler_id;
        }
        $t_issue['resolution'] = $t_issue_data->resolution;
        $t_issue['attachments_count'] = count(mci_issue_get_attachments($t_issue_data->id));
        $t_issue['notes_count'] = count(mci_issue_get_notes($t_issue_data->id));
        $t_result[] = $t_issue;
    }
    return $t_result;
}
コード例 #3
0
        $t_incr = 24 * 60 * 60;
        // less than three months, use daily
    } else {
        $t_incr = 7 * 24 * 60 * 60;
        // otherwise weekly
    }
}
$f_page_number = 1;
$t_per_page = -1;
$t_bug_count = null;
$t_page_count = 0;
$t_filter = current_user_get_bug_filter();
$t_filter['_view_type'] = 'advanced';
$t_filter['show_status'] = array(META_FILTER_ANY);
$t_filter['sort'] = '';
$rows = filter_get_bug_rows($f_page_number, $t_per_page, $t_page_count, $t_bug_count, $t_filter, null, null, true);
if (count($rows) == 0) {
    // no data to graph
    exit;
}
$t_bug_table = db_get_table('mantis_bug_table');
$t_bug_hist_table = db_get_table('mantis_bug_history_table');
$t_marker = array();
$t_data = array();
$t_ptr = 0;
$t_end = $t_interval->get_end_timestamp();
$t_start = $t_interval->get_start_timestamp();
if ($t_end == false || $t_start == false) {
    return;
}
// grab all status levels
コード例 #4
0
ファイル: csv_export.php プロジェクト: rombert/mantisbt
require_api( 'print_api.php' );

auth_ensure_user_authenticated();

helper_begin_long_process();

$t_page_number = 1;
$t_per_page = -1;
$t_bug_count = null;
$t_page_count = null;

$t_nl = csv_get_newline();
$t_sep = csv_get_separator();

# Get bug rows according to the current filter
$t_rows = filter_get_bug_rows( $t_page_number, $t_per_page, $t_page_count, $t_bug_count );
if ( $t_rows === false ) {
	print_header_redirect( 'view_all_set.php?type=0' );
}

$t_filename = csv_get_default_filename();

# Send headers to browser to activate mime loading

# Make sure that IE can download the attachments under https.
header( 'Pragma: public' );

header( 'Content-Type: text/plain; name=' . urlencode( file_clean_name( $t_filename ) ) );
header( 'Content-Transfer-Encoding: BASE64;' );

# Added Quotes (") around file name.
コード例 #5
0
} else {
    $t_user_id = user_get_id_by_name(config_get('anonymous_account'));
}
$t_show_sticky = null;
if ($f_filter_id == 0) {
    $t_custom_filter = filter_get_default();
    $t_custom_filter['sort'] = $c_sort_field;
} else {
    # null will be returned if the user doesn't have access right to access the filter.
    $t_custom_filter = filter_db_get_filter($f_filter_id, $t_user_id);
    if (null === $t_custom_filter) {
        access_denied();
    }
    $t_custom_filter = filter_deserialize($t_custom_filter);
}
$t_issues = filter_get_bug_rows($t_page_number, $t_issues_per_page, $t_page_count, $t_issues_count, $t_custom_filter, $t_project_id, $t_user_id, $t_show_sticky);
$t_issues_count = count($t_issues);
# Loop through results
for ($i = 0; $i < $t_issues_count; $i++) {
    $t_bug = $t_issues[$i];
    $about = $link = $t_path . "view.php?id=" . $t_bug->id;
    $title = bug_format_id($t_bug->id) . ': ' . $t_bug->summary;
    if ($t_bug->view_state == VS_PRIVATE) {
        $title .= ' [' . lang_get('private') . ']';
    }
    $description = string_rss_links($t_bug->description);
    # subject is category.
    $subject = category_full_name($t_bug->category_id, false);
    # optional DC value
    $date = $t_bug->last_updated;
    # author of item
コード例 #6
0
/**
 * Get all issue rows matching the custom filter.
 *
 * @param integer               $p_user_id          The user id.
 * @param FilterSearchData      $p_filter_search    The custom filter.
 * @param integer               $p_page_number      Start with the given page number (zero-based).
 * @param integer               $p_per_page         Number of issues to display per page.
 * @return array of issue rows
 */
function mci_filter_search_get_rows($p_user_id, $p_filter_search, $p_page_number, $p_per_page)
{
    global $g_soap_api_to_filter_names;
    // object to array
    if (is_object($p_filter_search)) {
        $p_filter_search = get_object_vars($p_filter_search);
    }
    $t_project_id = array();
    if (isset($p_filter_search['project_id'])) {
        // check access right to all projects
        foreach ($p_filter_search['project_id'] as $t_id) {
            if (mci_has_readonly_access($p_user_id, $t_id)) {
                $t_project_id[] = $t_id;
            } else {
                error_log('User: '******' has not access right to project: ' . $t_id . '.');
            }
        }
        // user has not access right to any project
        if (count($t_project_id) < 1) {
            return mci_soap_fault_access_denied($p_user_id);
        }
    } else {
        if (!mci_has_readonly_access($p_user_id, ALL_PROJECTS)) {
            return mci_soap_fault_access_denied($p_user_id);
        }
        $t_project_id = array(ALL_PROJECTS);
    }
    $t_filter = array('_view_type' => 'advanced');
    $t_filter['project_id'] = $t_project_id;
    // default fields
    foreach ($g_soap_api_to_filter_names as $t_soap_name => $t_filter_name) {
        if (isset($p_filter_search[$t_soap_name])) {
            $t_value = $p_filter_search[$t_soap_name];
            $t_filter[$t_filter_name] = $t_value;
        }
    }
    // custom fields
    if (isset($p_filter_search['custom_fields'])) {
        foreach ($p_filter_search['custom_fields'] as $t_custom_field) {
            // object to array
            if (is_object($t_custom_field)) {
                $t_custom_field = get_object_vars($t_custom_field);
            }
            $t_field = $t_custom_field['field'];
            if (is_object($t_field)) {
                $t_field = get_object_vars($t_field);
            }
            // if is set custom_field's id, use it primary
            if (isset($t_field['id'])) {
                $t_custom_field_id = $t_field['id'];
            } else {
                $t_custom_field_id = custom_field_get_id_from_name($t_field['name']);
            }
            $t_value = $t_custom_field['value'];
            $t_filter['custom_fields'][$t_custom_field_id] = $t_value;
        }
    }
    $t_filter = filter_ensure_valid_filter($t_filter);
    $t_result = array();
    $t_page_number = $p_page_number < 1 ? 1 : $p_page_number;
    $t_page_count = 0;
    $t_bug_count = 0;
    return filter_get_bug_rows($t_page_number, $p_per_page, $t_page_count, $t_bug_count, $t_filter);
}
コード例 #7
0
ファイル: mc_issue_api.php プロジェクト: elmarculino/mantisbt
/**
 * Get the biggest issue id currently used.
 *
 * @param string  $p_username   The name of the user trying to retrieve the information.
 * @param string  $p_password   The password of the user.
 * @param integer $p_project_id	One of -1 default project, 0 for all projects, otherwise project id.
 * @return integer The biggest used issue id.
 */
function mc_issue_get_biggest_id($p_username, $p_password, $p_project_id)
{
    global $g_project_override;
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return mci_soap_fault_login_failed();
    }
    $t_any = defined('META_FILTER_ANY') ? META_FILTER_ANY : 'any';
    $t_none = defined('META_FILTER_NONE') ? META_FILTER_NONE : 'none';
    $t_filter = array('category_id' => array('0' => $t_any), 'severity' => array('0' => $t_any), 'status' => array('0' => $t_any), 'highlight_changed' => 0, 'reporter_id' => array('0' => $t_any), 'handler_id' => array('0' => $t_any), 'resolution' => array('0' => $t_any), 'build' => array('0' => $t_any), 'version' => array('0' => $t_any), 'hide_status' => array('0' => $t_none), 'monitor_user_id' => array('0' => $t_any), 'dir' => 'DESC', 'sort' => 'id');
    $t_page_number = 1;
    $t_per_page = 1;
    $t_bug_count = 0;
    $t_page_count = 0;
    # Get project id, if -1, then retrieve the current which will be the default since there is no cookie.
    $t_project_id = $p_project_id;
    if ($t_project_id == -1) {
        $t_project_id = helper_get_current_project();
    }
    $g_project_override = $t_project_id;
    if ($t_project_id > 0 && !project_exists($t_project_id)) {
        return SoapObjectsFactory::newSoapFault('Client', 'Project \'' . $t_project_id . '\' does not exist.');
    }
    if (!mci_has_readonly_access($t_user_id, $t_project_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    $t_rows = filter_get_bug_rows($t_page_number, $t_per_page, $t_page_count, $t_bug_count, $t_filter, $t_project_id, $t_user_id);
    if (count($t_rows) == 0) {
        return 0;
    } else {
        return $t_rows[0]->id;
    }
}
コード例 #8
0
/**
 * Get Issue Headers
 * @param string  $p_username    The name of the user trying to access the versions.
 * @param string  $p_password    The password of the user.
 * @param integer $p_project_id  The id of the project to retrieve the attachments for.
 * @param integer $p_page_number Page number.
 * @param integer $p_per_page    Per page.
 * @return mixed
 */
function mc_project_get_issue_headers($p_username, $p_password, $p_project_id, $p_page_number, $p_per_page)
{
    global $g_project_override;
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return mci_soap_fault_login_failed();
    }
    if ($p_project_id != ALL_PROJECTS && !project_exists($p_project_id)) {
        return SoapObjectsFactory::newSoapFault('Client', 'Project \'' . $p_project_id . '\' does not exist.');
    }
    $g_project_override = $p_project_id;
    if (!mci_has_readonly_access($t_user_id, $p_project_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    $t_orig_page_number = $p_page_number < 1 ? 1 : $p_page_number;
    $t_page_count = 0;
    $t_bug_count = 0;
    $t_rows = filter_get_bug_rows($p_page_number, $p_per_page, $t_page_count, $t_bug_count, null, $p_project_id);
    $t_result = array();
    # the page number was moved back, so we have exceeded the actual page number, see bug #12991
    if ($t_orig_page_number > $p_page_number) {
        return $t_result;
    }
    foreach ($t_rows as $t_issue_data) {
        $t_result[] = mci_issue_data_as_header_array($t_issue_data);
    }
    return $t_result;
}
コード例 #9
0
$url_link_parameters['assigned'] = 'handler_id=' . $t_current_user_id . '&amp;hide_status=' . $t_bug_resolved_status_threshold;
$c_filter['recent_mod'] = array('show_category' => array('0' => META_FILTER_ANY), 'show_severity' => array('0' => META_FILTER_ANY), 'show_status' => array('0' => META_FILTER_ANY), 'highlight_changed' => $t_default_show_changed, 'reporter_id' => array('0' => META_FILTER_ANY), 'handler_id' => array('0' => META_FILTER_ANY), 'show_resolution' => array('0' => META_FILTER_ANY), 'show_build' => array('0' => META_FILTER_ANY), 'show_version' => array('0' => META_FILTER_ANY), 'hide_status' => array('0' => META_FILTER_NONE), 'user_monitor' => array('0' => META_FILTER_ANY));
$url_link_parameters['recent_mod'] = 'hide_status=none';
$c_filter['reported'] = array('show_category' => array('0' => META_FILTER_ANY), 'show_severity' => array('0' => META_FILTER_ANY), 'show_status' => array('0' => META_FILTER_ANY), 'highlight_changed' => $t_default_show_changed, 'reporter_id' => array('0' => $t_current_user_id), 'handler_id' => array('0' => META_FILTER_ANY), 'sort' => 'last_updated', 'show_resolution' => array('0' => META_FILTER_ANY), 'show_build' => array('0' => META_FILTER_ANY), 'show_version' => array('0' => META_FILTER_ANY), 'hide_status' => array('0' => $t_hide_status_default), 'user_monitor' => array('0' => META_FILTER_ANY));
$url_link_parameters['reported'] = 'reporter_id=' . $t_current_user_id . '&amp;hide_status=' . $t_hide_status_default;
$c_filter['resolved'] = array('show_category' => array('0' => META_FILTER_ANY), 'show_severity' => array('0' => META_FILTER_ANY), 'show_status' => array('0' => $t_bug_resolved_status_threshold), 'highlight_changed' => $t_default_show_changed, 'reporter_id' => array('0' => META_FILTER_ANY), 'handler_id' => array('0' => META_FILTER_ANY), 'show_resolution' => array('0' => META_FILTER_ANY), 'show_build' => array('0' => META_FILTER_ANY), 'show_version' => array('0' => META_FILTER_ANY), 'hide_status' => array('0' => $t_hide_status_default), 'user_monitor' => array('0' => META_FILTER_ANY));
$url_link_parameters['resolved'] = 'show_status=' . $t_bug_resolved_status_threshold . '&amp;hide_status=' . $t_bug_resolved_status_threshold;
$c_filter['unassigned'] = array('show_category' => array('0' => META_FILTER_ANY), 'show_severity' => array('0' => META_FILTER_ANY), 'show_status' => array('0' => META_FILTER_ANY), 'highlight_changed' => $t_default_show_changed, 'reporter_id' => array('0' => META_FILTER_ANY), 'handler_id' => array('0' => META_FILTER_NONE), 'show_resolution' => array('0' => META_FILTER_ANY), 'show_build' => array('0' => META_FILTER_ANY), 'show_version' => array('0' => META_FILTER_ANY), 'hide_status' => array('0' => $t_hide_status_default), 'user_monitor' => array('0' => META_FILTER_ANY));
$url_link_parameters['unassigned'] = 'handler_id=[none]' . '&amp;hide_status=' . $t_hide_status_default;
$c_filter['monitored'] = array('show_category' => array('0' => META_FILTER_ANY), 'show_severity' => array('0' => META_FILTER_ANY), 'show_status' => array('0' => META_FILTER_ANY), 'highlight_changed' => $t_default_show_changed, 'reporter_id' => array('0' => META_FILTER_ANY), 'handler_id' => array('0' => META_FILTER_ANY), 'show_resolution' => array('0' => META_FILTER_ANY), 'show_build' => array('0' => META_FILTER_ANY), 'show_version' => array('0' => META_FILTER_ANY), 'hide_status' => array('0' => $t_hide_status_default), 'user_monitor' => array('0' => $t_current_user_id));
$url_link_parameters['monitored'] = 'user_monitor=' . $t_current_user_id . '&amp;hide_status=' . $t_hide_status_default;
$c_filter['feedback'] = array('show_category' => array('0' => META_FILTER_ANY), 'show_severity' => array('0' => META_FILTER_ANY), 'show_status' => array('0' => FEEDBACK), 'highlight_changed' => $t_default_show_changed, 'reporter_id' => array('0' => $t_current_user_id), 'handler_id' => array('0' => META_FILTER_ANY), 'show_resolution' => array('0' => META_FILTER_ANY), 'show_build' => array('0' => META_FILTER_ANY), 'show_version' => array('0' => META_FILTER_ANY), 'hide_status' => array('0' => $t_hide_status_default), 'user_monitor' => array('0' => META_FILTER_ANY));
$url_link_parameters['feedback'] = 'reporter_id=' . $t_current_user_id . '&amp;show_status=' . FEEDBACK . '&amp;hide_status=' . $t_hide_status_default;
$c_filter['verify'] = array('show_category' => array('0' => META_FILTER_ANY), 'show_severity' => array('0' => META_FILTER_ANY), 'show_status' => array('0' => $t_bug_resolved_status_threshold), 'highlight_changed' => $t_default_show_changed, 'reporter_id' => array('0' => $t_current_user_id), 'handler_id' => array('0' => META_FILTER_ANY), 'show_resolution' => array('0' => META_FILTER_ANY), 'show_build' => array('0' => META_FILTER_ANY), 'show_version' => array('0' => META_FILTER_ANY), 'hide_status' => array('0' => $t_hide_status_default), 'user_monitor' => array('0' => META_FILTER_ANY));
$url_link_parameters['verify'] = 'reporter_id=' . $t_current_user_id . '&amp;show_status=' . $t_bug_resolved_status_threshold;
$rows = filter_get_bug_rows($f_page_number, $t_per_page, $t_page_count, $t_bug_count, $c_filter[$t_box_title]);
$t_filter = array_merge($c_filter[$t_box_title], $t_filter);
$box_title = lang_get('my_view_title_' . $t_box_title);
?>


<?php 
# -- ====================== BUG LIST ========================= --
?>

<table class="width100" cellspacing="1">
<?php 
# -- Navigation header row --
?>
<tr>
	<?php 
コード例 #10
0
/**
 * Get the issue headers that match the specified filter and paging details.
 *
 * @param string $p_username  The name of the user trying to access the filters.
 * @param string $p_password  The password of the user.
 * @param integer $p_filter_id  The id of the filter to apply.
 * @param integer $p_page_number  Start with the given page number (zero-based)
 * @param integer $p_per_page  Number of issues to display per page
 * @return Array that represents an IssueDataArray structure
 */
function mc_filter_get_issue_headers($p_username, $p_password, $p_project_id, $p_filter_id, $p_page_number, $p_per_page)
{
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return mci_soap_fault_login_failed();
    }
    if (!mci_has_readonly_access($t_user_id, $p_project_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    $t_orig_page_number = $p_page_number < 1 ? 1 : $p_page_number;
    $t_page_count = 0;
    $t_bug_count = 0;
    $t_filter = filter_db_get_filter($p_filter_id);
    $t_filter_detail = explode('#', $t_filter, 2);
    if (!isset($t_filter_detail[1])) {
        return SoapObjectsFactory::newSoapFault('Server', 'Invalid Filter');
    }
    $t_filter = unserialize($t_filter_detail[1]);
    $t_filter = filter_ensure_valid_filter($t_filter);
    $t_result = array();
    $t_rows = filter_get_bug_rows($p_page_number, $p_per_page, $t_page_count, $t_bug_count, $t_filter, $p_project_id);
    // the page number was moved back, so we have exceeded the actual page number, see bug #12991
    if ($t_orig_page_number > $p_page_number) {
        return $t_result;
    }
    foreach ($t_rows as $t_issue_data) {
        $t_result[] = mci_issue_data_as_header_array($t_issue_data);
    }
    return $t_result;
}
コード例 #11
0
ファイル: mc_filter_api.php プロジェクト: kaos/mantisbt
/**
 * Get the issue headers that match the specified filter and paging details.
 *
 * @param string $p_username  The name of the user trying to access the filters.
 * @param string $p_password  The password of the user.
 * @param integer $p_filter_id  The id of the filter to apply.
 * @param integer $p_page_number  Start with the given page number (zero-based)
 * @param integer $p_per_page  Number of issues to display per page
 * @return Array that represents an IssueDataArray structure
 */
function mc_filter_get_issue_headers($p_username, $p_password, $p_project_id, $p_filter_id, $p_page_number, $p_per_page)
{
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return mci_soap_fault_login_failed();
    }
    if (!mci_has_readonly_access($t_user_id, $p_project_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    $t_page_count = 0;
    $t_bug_count = 0;
    $t_filter = filter_db_get_filter($p_filter_id);
    $t_filter_detail = explode('#', $t_filter, 2);
    if (!isset($t_filter_detail[1])) {
        return new soap_fault('Server', '', 'Invalid Filter');
    }
    $t_filter = unserialize($t_filter_detail[1]);
    $t_filter = filter_ensure_valid_filter($t_filter);
    $t_result = array();
    $t_rows = filter_get_bug_rows($p_page_number, $p_per_page, $t_page_count, $t_bug_count, $t_filter, $p_project_id);
    foreach ($t_rows as $t_issue_data) {
        $t_id = $t_issue_data->id;
        $t_issue = array();
        $t_issue['id'] = $t_id;
        $t_issue['view_state'] = $t_issue_data->view_state;
        $t_issue['last_updated'] = timestamp_to_iso8601($t_issue_data->last_updated);
        $t_issue['project'] = $t_issue_data->project_id;
        $t_issue['category'] = mci_get_category($t_issue_data->category_id);
        $t_issue['priority'] = $t_issue_data->priority;
        $t_issue['severity'] = $t_issue_data->severity;
        $t_issue['status'] = $t_issue_data->status;
        $t_issue['reporter'] = $t_issue_data->reporter_id;
        $t_issue['summary'] = $t_issue_data->summary;
        if (!empty($t_issue_data->handler_id)) {
            $t_issue['handler'] = $t_issue_data->handler_id;
        }
        $t_issue['resolution'] = $t_issue_data->resolution;
        $t_issue['attachments_count'] = count(mci_issue_get_attachments($t_issue_data->id));
        $t_issue['notes_count'] = count(mci_issue_get_notes($t_issue_data->id));
        $t_result[] = $t_issue;
    }
    return $t_result;
}
コード例 #12
0
/**
 * Get the biggest issue id currently used.
 *
 * @param string $p_username  The name of the user trying to retrieve the information
 * @param string $p_password  The password of the user.
 * @param int    $p_project_id	-1 default project, 0 for all projects, otherwise project id.
 * @return integer  The biggest used issue id.
 */
function mc_issue_get_biggest_id($p_username, $p_password, $p_project_id)
{
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return new soap_fault('Client', '', 'Access Denied');
    }
    $t_any = defined('META_FILTER_ANY') ? META_FILTER_ANY : 'any';
    $t_none = defined('META_FILTER_NONE') ? META_FILTER_NONE : 'none';
    $t_filter = array('show_category' => array('0' => $t_any), 'show_severity' => array('0' => $t_any), 'show_status' => array('0' => $t_any), 'highlight_changed' => 0, 'reporter_id' => array('0' => $t_any), 'handler_id' => array('0' => $t_any), 'show_resolution' => array('0' => $t_any), 'show_build' => array('0' => $t_any), 'show_version' => array('0' => $t_any), 'hide_status' => array('0' => $t_none), 'user_monitor' => array('0' => $t_any), 'dir' => 'DESC', 'sort' => 'date_submitted');
    $t_page_number = 1;
    $t_per_page = 1;
    $t_bug_count = 0;
    # Get project id, if -1, then retrieve the current which will be the default since there is no cookie.
    $t_project_id = $p_project_id;
    if ($t_project_id == -1) {
        $t_project_id = helper_get_current_project();
    }
    if ($t_project_id > 0 && !project_exists($t_project_id)) {
        return new soap_fault('Client', '', "Project '{$t_project_id}' does not exist.");
    }
    if (!mci_has_readonly_access($t_user_id, $t_project_id)) {
        return new soap_fault('Client', '', 'Access Denied');
    }
    $t_rows = filter_get_bug_rows($t_page_number, $t_per_page, $t_page_count, $t_bug_count, $t_filter, $t_project_id, $t_user_id);
    if (count($t_rows) == 0) {
        return 0;
    } else {
        return $t_rows[0]['id'];
    }
}
コード例 #13
0
ファイル: kanban_page.php プロジェクト: aberad/MantisKanban
    echo project_get_name($curr_project_id);
    ?>
</h1>
        </td>
    </tr>
    <tr>
<?php 
    foreach ($columns as $title => $column) {
        if ($column['status'][0] > 79) {
            $t_per_page = 50;
        } else {
            $t_per_page = -1;
        }
        // set custom filters, partially using the global filters defined by user
        $filter_array = array('show_status' => $column['status'], 'sort' => $f_sort_by, 'dir' => 'DESC', '_view_type' => 'advanced', 'show_category' => $t_filter['show_category'], 'show_priority' => $t_filter['show_priority'], 'handler_id' => $t_filter['handler_id']);
        $rows = filter_get_bug_rows($f_page_number, $t_per_page, $t_page_count, $t_bug_count, $filter_array, $curr_project_id);
        if (!count($rows)) {
            ?>
<td valign="top" style="border-color:<?php 
            echo $column['color'];
            ?>
" id="<?php 
            echo $column['status'][0];
            ?>
" class="kanbanColumn kanbanColumn<?php 
            echo $column['status'][0];
            ?>
">
                <h2 style="background-color:<?php 
            echo $column['color'];
            ?>
コード例 #14
-1
ファイル: mantishelper.php プロジェクト: n2i/xvnkb
function getMantisBugByProjectID($project_id, $status = "")
{
    $page_number = 0;
    $per_page = 20;
    $page_count = 0;
    $bug_count = 20;
    $result = filter_get_bug_rows($page_number, $per_page, $page_count, $bug_count, "", $project_id);
    $bugs = array();
    foreach ($result as $r) {
        $bugs[] = addExtraBugData($r);
    }
    if (count($bugs) == 0) {
        return $project_id;
    }
    return $bugs;
}