Exemplo n.º 1
0
/**
 * Returns the record of the specified bug
 * @param int p_bug_id integer representing bug id
 * @return array
 * @access public
 */
function bug_get_row($p_bug_id)
{
    return bug_cache_row($p_bug_id);
}
Exemplo n.º 2
0
<?php

# Copyright (c) 2012 John Reese
# Licensed under the MIT license
access_ensure_global_level(plugin_config_get('view_threshold'));
$t_can_update = access_has_project_level(plugin_config_get('update_threshold'));
require_once config_get('plugin_path') . 'Source/Source.ViewAPI.php';
$f_changeset_id = gpc_get_int('id');
$f_offset = gpc_get_int('offset', 0);
$t_changeset = SourceChangeset::load($f_changeset_id);
$t_changeset->load_files();
$t_changeset->load_bugs();
bug_cache_array_rows($t_changeset->bugs);
$t_bug_rows = array();
foreach ($t_changeset->bugs as $t_bug_id) {
    $t_bug_row = bug_cache_row($t_bug_id, false);
    if (false === $t_bug_row) {
        continue;
    }
    $t_bug_rows[$t_bug_id] = $t_bug_row;
}
$t_affected_rowspan = count($t_bug_rows) + ($t_can_update ? 1 : 0);
$t_repos = SourceRepo::load_by_changesets($t_changeset);
if (count($t_repos) < 1) {
    trigger_error(ERROR_GENERIC, ERROR);
}
$t_repo = array_shift($t_repos);
$t_repo->load_branches();
if ($t_changeset->parent) {
    $t_changeset_parent = SourceChangeset::load_by_revision($t_repo, $t_changeset->parent);
} else {