本文整理汇总了PHP中Build::GetCurrentBuildId方法的典型用法代码示例。如果您正苦于以下问题:PHP Build::GetCurrentBuildId方法的具体用法?PHP Build::GetCurrentBuildId怎么用?PHP Build::GetCurrentBuildId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Build
的用法示例。
在下文中一共展示了Build::GetCurrentBuildId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
示例2: qnum
$starttime = $build_array['starttime'];
$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) {