本文整理汇总了PHP中project_get_id_by_name函数的典型用法代码示例。如果您正苦于以下问题:PHP project_get_id_by_name函数的具体用法?PHP project_get_id_by_name怎么用?PHP project_get_id_by_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了project_get_id_by_name函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMantisBugByProjectName
function getMantisBugByProjectName($project_name, $status = "")
{
$project_id = project_get_id_by_name($project_name);
if ($project_id == 0) {
return 0;
}
return getMantisBugByProjectId($project_id, $status);
}
示例2: ensure_project_exists
function ensure_project_exists($p_name, $p_description)
{
$t_project_id = project_get_id_by_name($p_name);
if ($t_project_id !== false) {
return $t_project_id;
}
return project_create('MantisBT', 'Mantis Bug Tracker', 50);
}
示例3: mci_get_project_id
function mci_get_project_id($p_project)
{
if ((int) $p_project['id'] != 0) {
$t_project_id = (int) $p_project['id'];
} else {
$t_project_id = project_get_id_by_name($p_project['name']);
}
return $t_project_id;
}
示例4: mci_get_project_id
function mci_get_project_id($p_project)
{
if (isset($p_project['id']) && (int) $p_project['id'] != 0) {
$t_project_id = (int) $p_project['id'];
} else {
if (isset($p_project['name']) && !is_blank($p_project['name'])) {
$t_project_id = project_get_id_by_name($p_project['name']);
} else {
$t_project_id = ALL_PROJECTS;
}
}
return $t_project_id;
}
示例5: getProject
public function getProject($proj)
{
if (MANTIS_LOCAL) {
$ret = new StdClass();
$ret->id = project_get_id_by_name($proj);
} else {
$projects = $this->client->mc_projects_get_user_accessible(MANTIS_USER, MANTIS_PWD);
foreach ($projects as $p) {
if ($p->name == $proj) {
$ret = $p;
}
}
}
return $ret;
}
示例6: print_project_header_changelog
/**
* Print header for the specified project
* @param string $p_project_name project name to display
* @return null
*/
function print_project_header_changelog($p_project_name)
{
echo '<br /><span class="pagetitle">', string_display_line($p_project_name), ' - ', lang_get('changelog'), '</span><br />';
echo '<tt>';
}
$t_user_id = auth_get_current_user_id();
$f_project = gpc_get_string('project', '');
if (is_blank($f_project)) {
$f_project_id = gpc_get_int('project_id', -1);
} else {
$f_project_id = project_get_id_by_name($f_project);
if ($f_project_id === 0) {
trigger_error(ERROR_PROJECT_NOT_FOUND, ERROR);
}
}
$f_version = gpc_get_string('version', '');
if (is_blank($f_version)) {
$f_version_id = gpc_get_int('version_id', -1);
# If both version_id and project_id parameters are supplied, then version_id take precedence.
if ($f_version_id == -1) {
if ($f_project_id == -1) {
$t_project_id = helper_get_current_project();
} else {
$t_project_id = $f_project_id;
}
} else {
示例7: mc_project_get_id_from_name
/**
* Get the id of a project via the project's name.
*
* @param string $p_username The name of the user trying to access the versions.
* @param string $p_password The password of the user.
* @param string $p_project_name The name of the project to retrieve.
* @return int The id of the project with the given name, 0 if there is no such project.
*/
function mc_project_get_id_from_name($p_username, $p_password, $p_project_name)
{
$t_user_id = mci_check_login($p_username, $p_password);
if ($t_user_id === false) {
return mci_soap_fault_login_failed();
}
return project_get_id_by_name($p_project_name);
}