当前位置: 首页>>代码示例>>PHP>>正文


PHP Build::GetNextBuildId方法代码示例

本文整理汇总了PHP中Build::GetNextBuildId方法的典型用法代码示例。如果您正苦于以下问题:PHP Build::GetNextBuildId方法的具体用法?PHP Build::GetNextBuildId怎么用?PHP Build::GetNextBuildId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Build的用法示例。


在下文中一共展示了Build::GetNextBuildId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: qnum

$threshold = $project_array['coveragethreshold'];
if ($build_array['groupid'] > 0) {
    $row = pdo_single_row_query('SELECT coveragethreshold FROM subprojectgroup
     WHERE projectid=' . qnum($projectid) . '
     AND id=' . qnum($build_array['groupid']));
    if (!empty($row) && isset($row['coveragethreshold'])) {
        $threshold = $row['coveragethreshold'];
    }
}
$xml .= '<menu>';
$xml .= add_XML_value('back', 'index.php?project=' . urlencode($projectname) . '&date=' . get_dashboard_date_from_build_starttime($build_array['starttime'], $project_array['nightlytime']));
$build = new Build();
$build->Id = $buildid;
$previous_buildid = $build->GetPreviousBuildId();
$current_buildid = $build->GetCurrentBuildId();
$next_buildid = $build->GetNextBuildId();
if ($previous_buildid > 0) {
    $xml .= add_XML_value('previous', 'viewCoverage.php?buildid=' . $previous_buildid);
} else {
    $xml .= add_XML_value('noprevious', '1');
}
$xml .= add_XML_value('current', "viewCoverage.php?buildid={$current_buildid}");
if ($next_buildid > 0) {
    $xml .= add_XML_value('next', "viewCoverage.php?buildid={$next_buildid}");
} else {
    $xml .= add_XML_value('nonext', '1');
}
$xml .= '</menu>';
$xml .= add_XML_value('filtercount', $filtercount);
if ($filtercount > 0) {
    $xml .= add_XML_value('showfilters', 1);
开发者ID:kitware,项目名称:cdash,代码行数:31,代码来源:viewCoverage.php

示例2: echo_main_dashboard_JSON


//.........这里部分代码省略.........
    list($previousdate, $currentstarttime, $nextdate) = get_dates($date, $project_array['nightlytime']);
    // Main dashboard section
    get_dashboard_JSON($projectname, $date, $response);
    $response['displaylabels'] = $project_array['displaylabels'];
    $page_id = 'index.php';
    $response['childview'] = 0;
    if ($CDASH_USE_LOCAL_DIRECTORY && file_exists('local/models/proProject.php')) {
        include_once 'local/models/proProject.php';
        $pro = new proProject();
        $pro->ProjectId = $projectid;
        $response['proedition'] = $pro->GetEdition(1);
    }
    if ($currentstarttime > time() && !isset($_GET['parentid'])) {
        $response['error'] = 'CDash cannot predict the future (yet)';
        echo json_encode($response);
        return;
    }
    // Menu definition
    $response['menu'] = array();
    $beginning_timestamp = $currentstarttime;
    $end_timestamp = $currentstarttime + 3600 * 24;
    $beginning_UTCDate = gmdate(FMT_DATETIME, $beginning_timestamp);
    $end_UTCDate = gmdate(FMT_DATETIME, $end_timestamp);
    if ($project_instance->GetNumberOfSubProjects($end_UTCDate) > 0) {
        $response['menu']['subprojects'] = 1;
    }
    if (isset($_GET['parentid'])) {
        $page_id = 'indexchildren.php';
        $response['childview'] = 1;
        // When a parentid is specified, we should link to the next build,
        // not the next day.
        $previous_buildid = $parent_build->GetPreviousBuildId();
        $current_buildid = $parent_build->GetCurrentBuildId();
        $next_buildid = $parent_build->GetNextBuildId();
        $base_url = 'index.php?project=' . urlencode($projectname);
        if ($previous_buildid > 0) {
            $response['menu']['previous'] = "{$base_url}&parentid={$previous_buildid}";
        } else {
            $response['menu']['noprevious'] = '1';
        }
        $response['menu']['current'] = "{$base_url}&parentid={$current_buildid}";
        if ($next_buildid > 0) {
            $response['menu']['next'] = "{$base_url}&parentid={$next_buildid}";
        } else {
            $response['menu']['nonext'] = '1';
        }
    } elseif (!has_next_date($date, $currentstarttime)) {
        $response['menu']['nonext'] = 1;
    }
    // Check if a SubProject parameter was specified.
    $subproject_name = @$_GET['subproject'];
    $subprojectid = false;
    if ($subproject_name) {
        $SubProject = new SubProject();
        $subproject_name = htmlspecialchars(pdo_real_escape_string($subproject_name));
        $SubProject->SetName($subproject_name);
        $SubProject->SetProjectId($projectid);
        $subprojectid = $SubProject->GetId();
        if ($subprojectid) {
            // Add an extra URL argument for the menu
            $response['extraurl'] = '&subproject=' . urlencode($subproject_name);
            $response['subprojectname'] = $subproject_name;
            $subproject_response = array();
            $subproject_response['name'] = $SubProject->GetName();
            $dependencies = $SubProject->GetDependencies();
            if ($dependencies) {
开发者ID:kitware,项目名称:cdash,代码行数:67,代码来源:index.php

示例3: array

$filter_sql = $filterdata['sql'];
$limit_sql = '';
if ($filterdata['limit'] > 0) {
    $limit_sql = ' LIMIT ' . $filterdata['limit'];
}
$response['filterurl'] = get_filterurl();
// Menu
$menu = array();
$limit_param = '&limit=' . $filterdata['limit'];
$base_url = 'queryTests.php?project=' . urlencode($project_array['name']);
if (isset($_GET['parentid'])) {
    // When a parentid is specified, we should link to the next build,
    // not the next day.
    $previous_buildid = $parent_build->GetPreviousBuildId();
    $current_buildid = $parent_build->GetCurrentBuildId();
    $next_buildid = $parent_build->GetNextBuildId();
    $menu['back'] = 'index.php?project=' . urlencode($project_array['name']) . '&parentid=' . $_GET['parentid'];
    if ($previous_buildid > 0) {
        $menu['previous'] = "{$base_url}&parentid={$previous_buildid}" . $limit_param;
    } else {
        $menu['noprevious'] = '1';
    }
    $menu['current'] = "{$base_url}&parentid={$current_buildid}" . $limit_param;
    if ($next_buildid > 0) {
        $menu['next'] = "{$base_url}&parentid={$next_buildid}" . $limit_param;
    } else {
        $menu['nonext'] = '1';
    }
} else {
    if ($date == '') {
        $back = 'index.php?project=' . urlencode($project_array['name']);
开发者ID:kitware,项目名称:cdash,代码行数:31,代码来源:queryTests.php


注:本文中的Build::GetNextBuildId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。