本文整理汇总了PHP中category_get_name函数的典型用法代码示例。如果您正苦于以下问题:PHP category_get_name函数的具体用法?PHP category_get_name怎么用?PHP category_get_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了category_get_name函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: custom_function_default_roadmap_print_issue
function custom_function_default_roadmap_print_issue($p_issue_id, $p_issue_level = 0)
{
static $t_status;
$t_bug = bug_get($p_issue_id);
if (bug_is_resolved($p_issue_id)) {
$t_strike_start = '<strike>';
$t_strike_end = '</strike>';
} else {
$t_strike_start = $t_strike_end = '';
}
if ($t_bug->category_id) {
$t_category_name = category_get_name($t_bug->category_id);
} else {
$t_category_name = '';
}
$t_category = is_blank($t_category_name) ? '' : '<b>[' . string_display_line($t_category_name) . ']</b> ';
echo utf8_str_pad('', $p_issue_level * 6, ' '), '- ', $t_strike_start, string_get_bug_view_link($p_issue_id), ': ', $t_category, string_display_line_links($t_bug->summary);
if ($t_bug->handler_id != 0) {
echo ' (', prepare_user_name($t_bug->handler_id), ')';
}
if (!isset($t_status[$t_bug->status])) {
$t_status[$t_bug->status] = get_enum_element('status', $t_bug->status, auth_get_current_user_id(), $t_bug->project_id);
}
echo ' - ', $t_status[$t_bug->status], $t_strike_end, '.<br />';
}
示例2: switch
continue;
}
switch ($t_element) {
case 'reporter_id':
case 'handler_id':
$t_element_name = substr($t_element, 0, -3);
$t_element_data = user_get_name($t_value);
$writer->startElement($t_element_name);
$writer->writeAttribute('id', $t_value);
$writer->text($t_element_data);
$writer->endElement();
break;
case 'category_id':
// id for categories were introduced in 1.2
$t_element_name = 'category';
$t_element_data = category_get_name($t_value);
$writer->startElement($t_element_name);
$writer->writeAttribute('id', $t_value);
$writer->text($t_element_data);
$writer->endElement();
break;
case 'project_id':
$t_element_name = 'project';
$t_element_data = project_get_name($t_value);
$writer->startElement($t_element_name);
$writer->writeAttribute('id', $t_value);
$writer->text($t_element_data);
$writer->endElement();
break;
case 'eta':
case 'priority':
示例3: mci_category_as_array_by_id
/**
* Get a category definition.
*
* @param integer $p_category_id The id of the category to retrieve.
* @return array an array containing the id and the name of the category.
*/
function mci_category_as_array_by_id($p_category_id)
{
$t_result = array();
$t_result['id'] = $p_category_id;
$t_result['name'] = category_get_name($p_category_id);
return $t_result;
}
示例4: array
$t_data = array();
$t_ptr = 0;
$t_end = $t_interval->get_end_timestamp();
$t_start = $t_interval->get_start_timestamp();
$t_resolved = config_get('bug_resolved_status_threshold');
$t_closed = config_get('bug_closed_status_threshold');
$t_bug = array();
$t_bug_cat = array();
# save categoties or bugs to look up resolved ones.
$t_category = array();
# walk through all issues and grab their category for 'now'
$t_marker[$t_ptr] = time();
$t_data[$t_ptr] = array();
foreach ($t_rows as $t_row) {
# the following function can treat the resolved parameter as an array to match
$t_cat = category_get_name($t_row->category_id);
if ($t_cat == '') {
$t_cat = 'none';
}
if (!access_compare_level($t_row->status, $t_resolved)) {
if (in_array($t_cat, $t_category)) {
$t_data[$t_ptr][$t_cat]++;
} else {
$t_data[$t_ptr][$t_cat] = 1;
$t_category[] = $t_cat;
}
}
$t_bug[] = $t_row->id;
$t_bug_cat[$t_row->id] = $t_cat;
}
# get the history for these bugs over the interval required to offset the data
示例5: mci_get_category
/**
* Returns the category name, possibly null if no category is assigned
*
* @param integer $p_category_id A category identifier.
* @return string
*/
function mci_get_category($p_category_id)
{
if ($p_category_id == 0) {
return '';
}
return mci_null_if_empty(category_get_name($p_category_id));
}
示例6: formatBugEntry
function formatBugEntry($data)
{
lang_push(user_pref_get_language($data['handler_id']));
$p_visible_bug_data = $data;
$p_visible_bug_data['email_project'] = project_get_name($data['project_id']);
$p_visible_bug_data['email_category'] = category_get_name($data['category_id']);
$t_email_separator1 = config_get('email_separator1');
$t_email_separator2 = config_get('email_separator2');
$p_visible_bug_data['email_bug'] = $data['id'];
$p_visible_bug_data['email_status'] = get_enum_element('status', $p_visible_bug_data['status'], $data['handler_id'], $data['project_id']);
$p_visible_bug_data['email_severity'] = get_enum_element('severity', $p_visible_bug_data['severity']);
$p_visible_bug_data['email_priority'] = get_enum_element('priority', $p_visible_bug_data['priority']);
$p_visible_bug_data['email_reproducibility'] = get_enum_element('reproducibility', $p_visible_bug_data['reproducibility']);
$p_visible_bug_data['email_summary'] = $data['summary'];
$t_message = $t_email_separator1 . " \n";
$t_message .= string_get_bug_view_url_with_fqdn($data['id'], $data['handler_id']) . " \n";
$t_message .= $t_email_separator1 . " \n";
$t_message .= email_format_attribute($p_visible_bug_data, 'email_project');
$t_message .= email_format_attribute($p_visible_bug_data, 'email_bug');
$t_message .= email_format_attribute($p_visible_bug_data, 'email_category');
$t_message .= email_format_attribute($p_visible_bug_data, 'email_priority');
$t_message .= email_format_attribute($p_visible_bug_data, 'email_status');
$t_message .= $t_email_separator1 . " \n";
$t_message .= email_format_attribute($p_visible_bug_data, 'email_summary');
$t_message .= $t_email_separator1 . " \n\n\n";
return $t_message;
}
示例7: getCategoryById
function getCategoryById($p_category_id)
{
return category_get_name($p_category_id);
}
示例8: category_ensure_can_delete
/**
* Ensure category can be deleted, otherwise raise an error.
* @param string $p_category_id Category identifier.
* @return void
* @access public
*/
function category_ensure_can_delete($p_category_id)
{
if (!category_can_delete($p_category_id)) {
$t_category_name = category_get_name($p_category_id);
error_parameters($t_category_name);
trigger_error(ERROR_CATEGORY_CANNOT_DELETE_HAS_ISSUES, ERROR);
}
}
示例9: bug_get
// print_r($tab_bug_ids);
for ($i = 0; $i < count($tab_bug_ids); $i++) {
//print $tab_bug_ids[$i];
//$t_bug_id = get_bug_id_from_artas_id( $tab_bug_ids[$i]);
$t_bug = bug_get($tab_bug_ids[$i]);
print " { \"summary\" : \"" . htmlentities($t_bug->summary) . "\", ";
$query = "SELECT value FROM `mantis_custom_field_string_table` WHERE bug_id = " . $t_bug->id . " and field_id = 55";
$result = db_query($query);
$tab = db_fetch_array($result);
if ($tab['value'] == "") {
$query = "SELECT value FROM `mantis_custom_field_string_table` WHERE bug_id = " . $t_bug->id . " and field_id = 56";
$result = db_query($query);
$tab = db_fetch_array($result);
$tab['value'] = "ACP" . $tab['value'] . "-" . $t_bug->version;
} else {
$tab['value'] = "ATR" . $tab['value'] . "-" . $t_bug->version;
}
print " \"ARTASBugId\" : \"" . $tab['value'] . "\", ";
//exit;
print "\"reporterOrganisation\" : \"" . user_get_organisation($t_bug->reporter_id) . "\", ";
print "\"category\" : \"" . category_get_name($t_bug->category_id) . "\", ";
print "\"version\" : \"" . $t_bug->version . "\" } ";
if ($i < count($tab_bug_ids) - 1) {
print ",";
}
}
print "] ";
?>