本文整理匯總了PHP中Flyspray::getTags方法的典型用法代碼示例。如果您正苦於以下問題:PHP Flyspray::getTags方法的具體用法?PHP Flyspray::getTags怎麽用?PHP Flyspray::getTags使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Flyspray
的用法示例。
在下文中一共展示了Flyspray::getTags方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: GetTaskDetails
/**
* Gets all information about a task (and caches information if wanted)
* @param integer $task_id
* @param bool $cache_enabled
* @access public static
* @return mixed an array with all taskdetails or false on failure
* @version 1.0
*/
public static function GetTaskDetails($task_id, $cache_enabled = false)
{
global $db, $fs;
static $cache = array();
if (isset($cache[$task_id]) && $cache_enabled) {
return $cache[$task_id];
}
//for some reason, task_id is not here
// run away inmediately..
if (!is_numeric($task_id)) {
return false;
}
$get_details = $db->Query('SELECT t.*, p.*,
c.category_name, c.category_owner, c.lft, c.rgt, c.project_id as cproj,
o.os_name,
r.resolution_name,
tt.tasktype_name,
vr.version_name AS reported_version_name,
vd.version_name AS due_in_version_name,
uo.real_name AS opened_by_name,
ue.real_name AS last_edited_by_name,
uc.real_name AS closed_by_name,
lst.status_name AS status_name
FROM {tasks} t
LEFT JOIN {projects} p ON t.project_id = p.project_id
LEFT JOIN {list_category} c ON t.product_category = c.category_id
LEFT JOIN {list_os} o ON t.operating_system = o.os_id
LEFT JOIN {list_resolution} r ON t.resolution_reason = r.resolution_id
LEFT JOIN {list_tasktype} tt ON t.task_type = tt.tasktype_id
LEFT JOIN {list_version} vr ON t.product_version = vr.version_id
LEFT JOIN {list_version} vd ON t.closedby_version = vd.version_id
LEFT JOIN {list_status} lst ON t.item_status = lst.status_id
LEFT JOIN {users} uo ON t.opened_by = uo.user_id
LEFT JOIN {users} ue ON t.last_edited_by = ue.user_id
LEFT JOIN {users} uc ON t.closed_by = uc.user_id
WHERE t.task_id = ?', array($task_id));
if (!$db->CountRows($get_details)) {
return false;
}
if ($get_details = $db->FetchRow($get_details)) {
$get_details += array('severity_name' => $get_details['task_severity'] == 0 ? '' : $fs->severities[$get_details['task_severity']]);
$get_details += array('priority_name' => $get_details['task_priority'] == 0 ? '' : $fs->priorities[$get_details['task_priority']]);
}
$get_details['tags'] = Flyspray::getTags($task_id);
$get_details['assigned_to'] = $get_details['assigned_to_name'] = array();
if ($assignees = Flyspray::GetAssignees($task_id, true)) {
$get_details['assigned_to'] = $assignees[0];
$get_details['assigned_to_name'] = $assignees[1];
}
$cache[$task_id] = $get_details;
return $get_details;
}