本文整理汇总了PHP中relationship_get_description_for_history函数的典型用法代码示例。如果您正苦于以下问题:PHP relationship_get_description_for_history函数的具体用法?PHP relationship_get_description_for_history怎么用?PHP relationship_get_description_for_history使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了relationship_get_description_for_history函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: filter_draw_selection_area2
//.........这里部分代码省略.........
}
}
echo ' - ';
$t_time = mktime(0, 0, 0, $t_filter[FILTER_PROPERTY_END_MONTH], $t_filter[FILTER_PROPERTY_END_DAY], $t_filter[FILTER_PROPERTY_END_YEAR]);
foreach ($t_chars as $t_char) {
if (strcasecmp($t_char, 'M') == 0) {
echo ' ';
echo date('F', $t_time);
}
if (strcasecmp($t_char, 'D') == 0) {
echo ' ';
echo date('d', $t_time);
}
if (strcasecmp($t_char, 'Y') == 0) {
echo ' ';
echo date('Y', $t_time);
}
}
} else {
echo lang_get('no');
}
?>
</td>
<td class="small-caption" colspan="2" id="relationship_type_filter_target">
<?php
echo '<input type="hidden" name="', FILTER_PROPERTY_RELATIONSHIP_TYPE, '" value="', string_attribute($t_filter[FILTER_PROPERTY_RELATIONSHIP_TYPE]), '" />';
echo '<input type="hidden" name="', FILTER_PROPERTY_RELATIONSHIP_BUG, '" value="', string_attribute($t_filter[FILTER_PROPERTY_RELATIONSHIP_BUG]), '" />';
$c_rel_type = $t_filter[FILTER_PROPERTY_RELATIONSHIP_TYPE];
$c_rel_bug = $t_filter[FILTER_PROPERTY_RELATIONSHIP_BUG];
if (-1 == $c_rel_type || 0 == $c_rel_bug) {
echo lang_get('any');
} else {
echo relationship_get_description_for_history($c_rel_type) . ' ' . $c_rel_bug;
}
?>
</td>
<?php
if ($t_filter_cols > 8) {
echo '<td class="small-caption" colspan="' . ($t_filter_cols - 8) . '"> </td>';
}
?>
</tr>
<tr <?php
echo 'class="' . $t_trclass . '"';
?>
>
<td class="small-caption">
<?php
if (ON == config_get('enable_profiles')) {
?>
<a href="<?php
echo $t_filters_url . FILTER_PROPERTY_PLATFORM;
?>
" id="platform_filter"<?php
echo $t_dynamic_filter_expander_class;
?>
><?php
echo lang_get('platform_label');
?>
</a>
<?php
}
?>
</td>
<td class="small-caption">
示例2: history_localize_item
//.........这里部分代码省略.........
$t_change = '<a href="bug_revision_view_page.php?rev_id=' . $t_old_value . '#r' . $t_old_value . '">' . lang_get('view_revisions') . '</a>';
$t_raw = false;
}
break;
case STEP_TO_REPRODUCE_UPDATED:
$t_note = lang_get('steps_to_reproduce_updated');
$t_old_value = (int) $p_old_value;
if ($p_linkify && bug_revision_exists($t_old_value)) {
$t_change = '<a href="bug_revision_view_page.php?rev_id=' . $t_old_value . '#r' . $t_old_value . '">' . lang_get('view_revisions') . '</a>';
$t_raw = false;
}
break;
case FILE_ADDED:
$t_note = lang_get('file_added') . ': ' . $p_old_value;
break;
case FILE_DELETED:
$t_note = lang_get('file_deleted') . ': ' . $p_old_value;
break;
case BUGNOTE_STATE_CHANGED:
$p_old_value = get_enum_element('view_state', $p_old_value);
$t_note = lang_get('bugnote_view_state') . ': ' . $p_new_value . ': ' . $p_old_value;
break;
case BUG_MONITOR:
$p_old_value = user_get_name($p_old_value);
$t_note = lang_get('bug_monitor') . ': ' . $p_old_value;
break;
case BUG_UNMONITOR:
if ($p_old_value !== '') {
$p_old_value = user_get_name($p_old_value);
}
$t_note = lang_get('bug_end_monitor') . ': ' . $p_old_value;
break;
case BUG_DELETED:
$t_note = lang_get('bug_deleted') . ': ' . $p_old_value;
break;
case BUG_ADD_SPONSORSHIP:
$t_note = lang_get('sponsorship_added');
$t_change = user_get_name($p_old_value) . ': ' . sponsorship_format_amount($p_new_value);
break;
case BUG_UPDATE_SPONSORSHIP:
$t_note = lang_get('sponsorship_updated');
$t_change = user_get_name($p_old_value) . ': ' . sponsorship_format_amount($p_new_value);
break;
case BUG_DELETE_SPONSORSHIP:
$t_note = lang_get('sponsorship_deleted');
$t_change = user_get_name($p_old_value) . ': ' . sponsorship_format_amount($p_new_value);
break;
case BUG_PAID_SPONSORSHIP:
$t_note = lang_get('sponsorship_paid');
$t_change = user_get_name($p_old_value) . ': ' . get_enum_element('sponsorship', $p_new_value);
break;
case BUG_ADD_RELATIONSHIP:
$t_note = lang_get('relationship_added');
$t_change = relationship_get_description_for_history($p_old_value) . ' ' . bug_format_id($p_new_value);
break;
case BUG_REPLACE_RELATIONSHIP:
$t_note = lang_get('relationship_replaced');
$t_change = relationship_get_description_for_history($p_old_value) . ' ' . bug_format_id($p_new_value);
break;
case BUG_DEL_RELATIONSHIP:
$t_note = lang_get('relationship_deleted');
# Fix for #7846: There are some cases where old value is empty, this may be due to an old bug.
if (!is_blank($p_old_value) && $p_old_value > 0) {
$t_change = relationship_get_description_for_history($p_old_value) . ' ' . bug_format_id($p_new_value);
} else {
$t_change = bug_format_id($p_new_value);
}
break;
case BUG_CLONED_TO:
$t_note = lang_get('bug_cloned_to') . ': ' . bug_format_id($p_new_value);
break;
case BUG_CREATED_FROM:
$t_note = lang_get('bug_created_from') . ': ' . bug_format_id($p_new_value);
break;
case TAG_ATTACHED:
$t_note = lang_get('tag_history_attached') . ': ' . $p_old_value;
break;
case TAG_DETACHED:
$t_note = lang_get('tag_history_detached') . ': ' . $p_old_value;
break;
case TAG_RENAMED:
$t_note = lang_get('tag_history_renamed');
$t_change = $p_old_value . ' => ' . $p_new_value;
break;
case BUG_REVISION_DROPPED:
$t_note = lang_get('bug_revision_dropped_history') . ': ' . bug_revision_get_type_name($p_new_value) . ': ' . $p_old_value;
break;
case BUGNOTE_REVISION_DROPPED:
$t_note = lang_get('bugnote_revision_dropped_history') . ': ' . $p_new_value . ': ' . $p_old_value;
break;
}
}
# output special cases
if (NORMAL_TYPE == $p_type) {
$t_note = $t_field_localized;
$t_change = $p_old_value . ' => ' . $p_new_value;
}
# end if DEFAULT
return array('note' => $t_note, 'change' => $t_change, 'raw' => $t_raw);
}
示例3: filter_draw_selection_area2
//.........这里部分代码省略.........
}
}
echo ' - ';
$t_time = mktime(0, 0, 0, $t_filter[FILTER_PROPERTY_END_MONTH], $t_filter[FILTER_PROPERTY_END_DAY], $t_filter[FILTER_PROPERTY_END_YEAR]);
foreach ($t_chars as $t_char) {
if (strcasecmp($t_char, "M") == 0) {
echo ' ';
echo date('F', $t_time);
}
if (strcasecmp($t_char, "D") == 0) {
echo ' ';
echo date('d', $t_time);
}
if (strcasecmp($t_char, "Y") == 0) {
echo ' ';
echo date('Y', $t_time);
}
}
} else {
echo lang_get('no');
}
?>
</td>
<td class="small-caption" valign="top" colspan="2" id="relationship_type_filter_target">
<?php
echo '<input type="hidden" name="', FILTER_PROPERTY_RELATIONSHIP_TYPE, '" value="', string_attribute($t_filter[FILTER_PROPERTY_RELATIONSHIP_TYPE]), '" />';
echo '<input type="hidden" name="', FILTER_PROPERTY_RELATIONSHIP_BUG, '" value="', string_attribute($t_filter[FILTER_PROPERTY_RELATIONSHIP_BUG]), '" />';
$c_rel_type = $t_filter[FILTER_PROPERTY_RELATIONSHIP_TYPE];
$c_rel_bug = $t_filter[FILTER_PROPERTY_RELATIONSHIP_BUG];
if (-1 == $c_rel_type || 0 == $c_rel_bug) {
echo lang_get('any');
} else {
echo relationship_get_description_for_history($c_rel_type) . ' ' . $c_rel_bug;
}
?>
</td>
<?php
if ($t_filter_cols > 8) {
echo '<td class="small-caption" valign="top" colspan="' . ($t_filter_cols - 8) . '"> </td>';
}
?>
</tr>
<tr <?php
echo "class=\"" . $t_trclass . "\"";
?>
>
<td class="small-caption" valign="top">
<?php
if (ON == config_get('enable_profiles')) {
?>
<a href="<?php
echo $t_filters_url . FILTER_PROPERTY_PLATFORM;
?>
" id="platform_filter"><?php
echo lang_get('platform');
?>
:</a>
<?php
}
?>
</td>
<td class="small-caption" valign="top">
<?php
if (ON == config_get('enable_profiles')) {
?>
示例4: filter_draw_selection_area2
//.........这里部分代码省略.........
print ' ';
print date('F', $t_time);
}
if (strcasecmp($t_char, "D") == 0) {
print ' ';
print date('d', $t_time);
}
if (strcasecmp($t_char, "Y") == 0) {
print ' ';
print date('Y', $t_time);
}
}
} else {
print lang_get('no');
}
?>
</td>
<td class="small-caption" valign="top" colspan="2" id="relationship_type_filter_target">
<input type="hidden" name="relationship_type" value="<?php
echo $t_filter['relationship_type'];
?>
" />
<input type="hidden" name="relationship_bug" value="<?php
echo $t_filter['relationship_bug'];
?>
" />
<?php
$c_rel_type = $t_filter['relationship_type'];
$c_rel_bug = $t_filter['relationship_bug'];
if (-1 == $c_rel_type || 0 == $c_rel_bug) {
print lang_get('any');
} else {
print relationship_get_description_for_history($c_rel_type) . ' ' . $c_rel_bug;
}
?>
</td>
<?php
if ($t_filter_cols > 8) {
echo '<td class="small-caption" valign="top" colspan="' . ($t_filter_cols - 8) . '"> </td>';
}
?>
</tr>
<tr <?php
print "class=\"" . $t_trclass . "\"";
?>
>
<td class="small-caption" valign="top">
<a href="<?php
echo $t_filters_url . 'platform';
?>
" id="platform_filter"><?php
echo lang_get('platform');
?>
:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php
print $t_filters_url . 'os';
?>
" id="os_filter"><?php
echo lang_get('os');
?>
:</a>
</td>
<td class="small-caption" valign="top">
示例5: history_localize_item
//.........这里部分代码省略.........
$t_cf_type = custom_field_type($t_field_id);
if ('' != $p_old_value) {
$p_old_value = string_custom_field_value_for_email($p_old_value, $t_cf_type);
}
$p_new_value = string_custom_field_value_for_email($p_new_value, $t_cf_type);
}
}
if (NORMAL_TYPE != $p_type) {
switch ($p_type) {
case NEW_BUG:
$t_note = lang_get('new_bug');
break;
case BUGNOTE_ADDED:
$t_note = lang_get('bugnote_added') . ": " . $p_old_value;
break;
case BUGNOTE_UPDATED:
$t_note = lang_get('bugnote_edited') . ": " . $p_old_value;
break;
case BUGNOTE_DELETED:
$t_note = lang_get('bugnote_deleted') . ": " . $p_old_value;
break;
case DESCRIPTION_UPDATED:
$t_note = lang_get('description_updated');
break;
case ADDITIONAL_INFO_UPDATED:
$t_note = lang_get('additional_information_updated');
break;
case STEP_TO_REPRODUCE_UPDATED:
$t_note = lang_get('steps_to_reproduce_updated');
break;
case FILE_ADDED:
$t_note = lang_get('file_added') . ": " . $p_old_value;
break;
case FILE_DELETED:
$t_note = lang_get('file_deleted') . ": " . $p_old_value;
break;
case BUGNOTE_STATE_CHANGED:
$p_old_value = get_enum_element('view_state', $p_old_value);
$t_note = lang_get('bugnote_view_state') . ": " . $p_old_value . ": " . $p_new_value;
break;
case BUG_MONITOR:
$p_old_value = user_get_name($p_old_value);
$t_note = lang_get('bug_monitor') . ": " . $p_old_value;
break;
case BUG_UNMONITOR:
$p_old_value = user_get_name($p_old_value);
$t_note = lang_get('bug_end_monitor') . ": " . $p_old_value;
break;
case BUG_DELETED:
$t_note = lang_get('bug_deleted') . ": " . $p_old_value;
break;
case BUG_ADD_SPONSORSHIP:
$t_note = lang_get('sponsorship_added');
$t_change = user_get_name($p_old_value) . ': ' . sponsorship_format_amount($p_new_value);
break;
case BUG_UPDATE_SPONSORSHIP:
$t_note = lang_get('sponsorship_updated');
$t_change = user_get_name($p_old_value) . ': ' . sponsorship_format_amount($p_new_value);
break;
case BUG_DELETE_SPONSORSHIP:
$t_note = lang_get('sponsorship_deleted');
$t_change = user_get_name($p_old_value) . ': ' . sponsorship_format_amount($p_new_value);
break;
case BUG_PAID_SPONSORSHIP:
$t_note = lang_get('sponsorship_paid');
$t_change = user_get_name($p_old_value) . ': ' . get_enum_element('sponsorship', $p_new_value);
break;
case BUG_ADD_RELATIONSHIP:
$t_note = lang_get('relationship_added');
$t_change = relationship_get_description_for_history($p_old_value) . ' ' . bug_format_id($p_new_value);
break;
case BUG_REPLACE_RELATIONSHIP:
$t_note = lang_get('relationship_replaced');
$t_change = relationship_get_description_for_history($p_old_value) . ' ' . bug_format_id($p_new_value);
break;
case BUG_DEL_RELATIONSHIP:
$t_note = lang_get('relationship_deleted');
$t_change = relationship_get_description_for_history($p_old_value) . ' ' . bug_format_id($p_new_value);
break;
case BUG_CLONED_TO:
$t_note = lang_get('bug_cloned_to');
$t_change = bug_format_id($p_new_value);
break;
case BUG_CREATED_FROM:
$t_note = lang_get('bug_created_from');
$t_change = bug_format_id($p_new_value);
break;
case CHECKIN:
$t_note = lang_get('checkin');
break;
}
}
# output special cases
if (NORMAL_TYPE == $p_type) {
$t_note = $t_field_localized;
$t_change = $p_old_value . ' => ' . $p_new_value;
}
# end if DEFAULT
return array('note' => $t_note, 'change' => $t_change);
}