本文整理汇总了PHP中version_should_show_product_version函数的典型用法代码示例。如果您正苦于以下问题:PHP version_should_show_product_version函数的具体用法?PHP version_should_show_product_version怎么用?PHP version_should_show_product_version使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了version_should_show_product_version函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: config_get
$t_fields = config_get('bug_report_page_fields');
$t_fields = columns_filter_disabled($t_fields);
$t_show_category = in_array('category_id', $t_fields);
$t_show_reproducibility = in_array('reproducibility', $t_fields);
$t_show_eta = in_array('eta', $t_fields);
$t_show_severity = in_array('severity', $t_fields);
$t_show_priority = in_array('priority', $t_fields);
$t_show_steps_to_reproduce = in_array('steps_to_reproduce', $t_fields);
$t_show_handler = in_array('handler', $t_fields) && access_has_project_level(config_get('update_bug_assign_threshold'));
$t_show_profiles = config_get('enable_profiles');
$t_show_platform = $t_show_profiles && in_array('platform', $t_fields);
$t_show_os = $t_show_profiles && in_array('os', $t_fields);
$t_show_os_version = $t_show_profiles && in_array('os_version', $t_fields);
$t_show_resolution = in_array('resolution', $t_fields);
$t_show_status = in_array('status', $t_fields);
$t_show_versions = version_should_show_product_version($t_project_id);
$t_show_product_version = $t_show_versions && in_array('product_version', $t_fields);
$t_show_product_build = $t_show_versions && in_array('product_build', $t_fields) && config_get('enable_product_build') == ON;
$t_show_target_version = $t_show_versions && in_array('target_version', $t_fields) && access_has_project_level(config_get('roadmap_update_threshold'));
$t_show_additional_info = in_array('additional_info', $t_fields);
$t_show_due_date = in_array('due_date', $t_fields) && access_has_project_level(config_get('due_date_update_threshold'), helper_get_current_project(), auth_get_current_user_id());
$t_show_attachments = in_array('attachments', $t_fields) && file_allow_bug_upload();
$t_show_view_state = in_array('view_state', $t_fields) && access_has_project_level(config_get('set_view_status_threshold'));
if ($t_show_due_date) {
require_js('jscalendar/calendar.js');
require_js('jscalendar/lang/calendar-en.js');
require_js('jscalendar/calendar-setup.js');
require_css('calendar-blue.css');
}
# don't index bug report page
html_robots_noindex();
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:31,代码来源:bug_report_page.php
示例2: filter_draw_selection_area2
/**
* Prints the filter selection area for both the bug list view screen and
* the bug list print screen. This function was an attempt to make it easier to
* add new filters and rearrange them on screen for both pages.
* @param integer $p_page_number Page number.
* @param boolean $p_for_screen Whether output is for screen view.
* @param boolean $p_expanded Whether to display expanded.
* @return void
*/
function filter_draw_selection_area2($p_page_number, $p_for_screen = true, $p_expanded = true)
{
$t_form_name_suffix = $p_expanded ? '_open' : '_closed';
$t_filter = current_user_get_bug_filter();
$t_filter = filter_ensure_valid_filter($t_filter === false ? array() : $t_filter);
$t_project_id = helper_get_current_project();
$t_page_number = (int) $p_page_number;
$t_view_type = $t_filter['_view_type'];
$t_tdclass = 'small-caption';
$t_trclass = 'row-category2';
$t_action = 'view_all_set.php?f=3';
if ($p_for_screen == false) {
$t_tdclass = 'print';
$t_trclass = '';
$t_action = 'view_all_set.php';
}
?>
<div class="filter-box">
<form method="post" name="filters<?php
echo $t_form_name_suffix;
?>
" id="filters_form<?php
echo $t_form_name_suffix;
?>
" action="<?php
echo $t_action;
?>
">
<?php
# CSRF protection not required here - form does not result in modifications
?>
<input type="hidden" name="type" value="1" />
<?php
if ($p_for_screen == false) {
echo '<input type="hidden" name="print" value="1" />';
echo '<input type="hidden" name="offset" value="0" />';
}
?>
<input type="hidden" name="page_number" value="<?php
echo $t_page_number;
?>
" />
<input type="hidden" name="view_type" value="<?php
echo $t_view_type;
?>
" />
<?php
$t_filter_cols = config_get('filter_custom_fields_per_row');
if ($p_expanded) {
?>
<table width="100%" cellspacing="1">
<?php
$t_custom_cols = $t_filter_cols;
$t_current_user_access_level = current_user_get_access_level();
$t_accessible_custom_fields_ids = array();
$t_accessible_custom_fields_names = array();
$t_accessible_custom_fields_values = array();
$t_num_custom_rows = 0;
$t_per_row = 0;
if (ON == config_get('filter_by_custom_fields')) {
$t_custom_fields = custom_field_get_linked_ids($t_project_id);
foreach ($t_custom_fields as $t_cfid) {
$t_field_info = custom_field_cache_row($t_cfid, true);
if ($t_field_info['access_level_r'] <= $t_current_user_access_level && $t_field_info['filter_by']) {
$t_accessible_custom_fields_ids[] = $t_cfid;
$t_accessible_custom_fields_names[] = $t_field_info['name'];
$t_accessible_custom_fields_types[] = $t_field_info['type'];
$t_accessible_custom_fields_values[] = custom_field_distinct_values($t_field_info);
}
}
if (count($t_accessible_custom_fields_ids) > 0) {
$t_per_row = config_get('filter_custom_fields_per_row');
$t_num_custom_rows = ceil(count($t_accessible_custom_fields_ids) / $t_per_row);
}
}
$t_filters_url = 'view_filters_page.php?for_screen=' . $p_for_screen;
if ('advanced' == $t_view_type) {
$t_filters_url = $t_filters_url . '&view_type=advanced';
}
$t_filters_url = $t_filters_url . '&target_field=';
$t_show_product_version = version_should_show_product_version($t_project_id);
$t_show_build = $t_show_product_version && config_get('enable_product_build') == ON;
# overload handler_id setting if user isn't supposed to see them (ref #6189)
if (!access_has_any_project(config_get('view_handler_threshold'))) {
$t_filter[FILTER_PROPERTY_HANDLER_ID] = array(META_FILTER_ANY);
}
$t_dynamic_filter_expander_class = config_get('use_dynamic_filters') ? ' class="dynamic-filter-expander"' : '';
?>
<tr <?php
//.........这里部分代码省略.........
开发者ID:vipjaven,项目名称:mantisbt,代码行数:101,代码来源:filter_api.php
示例3: bug_group_action_get_commands
/**
* Get a list of bug group actions available to the current user for one or
* more projects.
* @param array $p_project_ids An array containing one or more project IDs.
* @return array
*/
function bug_group_action_get_commands(array $p_project_ids = null)
{
if ($p_project_ids === null || count($p_project_ids) == 0) {
$p_project_ids = array(ALL_PROJECTS);
}
$t_commands = array();
foreach ($p_project_ids as $t_project_id) {
if (!isset($t_commands['MOVE']) && access_has_project_level(config_get('move_bug_threshold', null, null, $t_project_id), $t_project_id)) {
$t_commands['MOVE'] = lang_get('actiongroup_menu_move');
}
if (!isset($t_commands['COPY']) && access_has_any_project(config_get('report_bug_threshold', null, null, $t_project_id))) {
$t_commands['COPY'] = lang_get('actiongroup_menu_copy');
}
if (!isset($t_commands['ASSIGN']) && access_has_project_level(config_get('update_bug_assign_threshold', null, null, $t_project_id), $t_project_id)) {
if (ON == config_get('auto_set_status_to_assigned', null, null, $t_project_id) && access_has_project_level(access_get_status_threshold(config_get('bug_assigned_status', null, null, $t_project_id), $t_project_id), $t_project_id)) {
$t_commands['ASSIGN'] = lang_get('actiongroup_menu_assign');
} else {
$t_commands['ASSIGN'] = lang_get('actiongroup_menu_assign');
}
}
if (!isset($t_commands['CLOSE']) && access_has_project_level(config_get('update_bug_status_threshold', null, null, $t_project_id), $t_project_id) && (access_has_project_level(access_get_status_threshold(config_get('bug_closed_status_threshold', null, null, $t_project_id), $t_project_id), $t_project_id) || access_has_project_level(config_get('allow_reporter_close', null, null, $t_project_id), $t_project_id))) {
$t_commands['CLOSE'] = lang_get('actiongroup_menu_close');
}
if (!isset($t_commands['DELETE']) && access_has_project_level(config_get('delete_bug_threshold', null, null, $t_project_id), $t_project_id)) {
$t_commands['DELETE'] = lang_get('actiongroup_menu_delete');
}
if (!isset($t_commands['RESOLVE']) && access_has_project_level(config_get('update_bug_status_threshold', null, null, $t_project_id), $t_project_id) && access_has_project_level(access_get_status_threshold(config_get('bug_resolved_status_threshold', null, null, $t_project_id), $t_project_id), $t_project_id)) {
$t_commands['RESOLVE'] = lang_get('actiongroup_menu_resolve');
}
if (!isset($t_commands['SET_STICKY']) && access_has_project_level(config_get('set_bug_sticky_threshold', null, null, $t_project_id), $t_project_id)) {
$t_commands['SET_STICKY'] = lang_get('actiongroup_menu_set_sticky');
}
if (!isset($t_commands['UP_PRIOR']) && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) {
$t_commands['UP_PRIOR'] = lang_get('actiongroup_menu_update_priority');
}
if (!isset($t_commands['EXT_UPDATE_SEVERITY']) && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) {
$t_commands['EXT_UPDATE_SEVERITY'] = lang_get('actiongroup_menu_update_severity');
}
if (!isset($t_commands['UP_STATUS']) && access_has_project_level(config_get('update_bug_status_threshold', null, null, $t_project_id), $t_project_id)) {
$t_commands['UP_STATUS'] = lang_get('actiongroup_menu_update_status');
}
if (!isset($t_commands['UP_CATEGORY']) && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) {
$t_commands['UP_CATEGORY'] = lang_get('actiongroup_menu_update_category');
}
if (!isset($t_commands['VIEW_STATUS']) && access_has_project_level(config_get('change_view_status_threshold', null, null, $t_project_id), $t_project_id)) {
$t_commands['VIEW_STATUS'] = lang_get('actiongroup_menu_update_view_status');
}
if (!isset($t_commands['EXT_UPDATE_PRODUCT_BUILD']) && config_get('enable_product_build', null, null, $t_project_id) == ON && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) {
$t_commands['EXT_UPDATE_PRODUCT_BUILD'] = lang_get('actiongroup_menu_update_product_build');
}
if (!isset($t_commands['EXT_ADD_NOTE']) && access_has_project_level(config_get('add_bugnote_threshold', null, null, $t_project_id), $t_project_id)) {
$t_commands['EXT_ADD_NOTE'] = lang_get('actiongroup_menu_add_note');
}
if (!isset($t_commands['EXT_ATTACH_TAGS']) && access_has_project_level(config_get('tag_attach_threshold', null, null, $t_project_id), $t_project_id)) {
$t_commands['EXT_ATTACH_TAGS'] = lang_get('actiongroup_menu_attach_tags');
}
if (!isset($t_commands['UP_FIXED_IN_VERSION']) && version_should_show_product_version($t_project_id) && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) {
$t_commands['UP_FIXED_IN_VERSION'] = lang_get('actiongroup_menu_update_fixed_in_version');
}
if (!isset($t_commands['UP_TARGET_VERSION']) && version_should_show_product_version($t_project_id) && access_has_project_level(config_get('roadmap_update_threshold', null, null, $t_project_id), $t_project_id)) {
$t_commands['UP_TARGET_VERSION'] = lang_get('actiongroup_menu_update_target_version');
}
$t_custom_field_ids = custom_field_get_linked_ids($t_project_id);
foreach ($t_custom_field_ids as $t_custom_field_id) {
if (!custom_field_has_write_access_to_project($t_custom_field_id, $t_project_id)) {
continue;
}
$t_custom_field_def = custom_field_get_definition($t_custom_field_id);
$t_command_id = 'custom_field_' . $t_custom_field_id;
$t_command_caption = sprintf(lang_get('actiongroup_menu_update_field'), lang_get_defaulted($t_custom_field_def['name']));
$t_commands[$t_command_id] = string_display($t_command_caption);
}
}
$t_custom_group_actions = config_get('custom_group_actions');
foreach ($t_custom_group_actions as $t_custom_group_action) {
# use label if provided to get the localized text, otherwise fallback to action name.
if (isset($t_custom_group_action['label'])) {
$t_commands[$t_custom_group_action['action']] = lang_get_defaulted($t_custom_group_action['label']);
} else {
$t_commands[$t_custom_group_action['action']] = lang_get_defaulted($t_custom_group_action['action']);
}
}
return $t_commands;
}
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:90,代码来源:bug_group_action_api.php
示例4: in_array
$tpl_show_last_updated = in_array('last_updated', $t_fields);
$tpl_show_view_state = in_array('view_state', $t_fields);
$tpl_show_reporter = in_array('reporter', $t_fields);
$tpl_show_handler = in_array('handler', $t_fields) && access_has_bug_level(config_get('view_handler_threshold'), $f_bug_id);
$tpl_show_due_date = in_array('due_date', $t_fields) && access_has_bug_level(config_get('due_date_view_threshold'), $f_bug_id);
$tpl_show_priority = in_array('priority', $t_fields);
$tpl_show_severity = in_array('severity', $t_fields);
$tpl_show_reproducibility = in_array('reproducibility', $t_fields);
$tpl_show_platform = in_array('platform', $t_fields);
$tpl_show_os = in_array('os', $t_fields);
$tpl_show_os_version = in_array('os_version', $t_fields);
$tpl_show_status = in_array('status', $t_fields);
$tpl_show_resolution = in_array('resolution', $t_fields);
$tpl_show_projection = in_array('projection', $t_fields);
$tpl_show_eta = in_array('eta', $t_fields);
$tpl_show_versions = version_should_show_product_version($tpl_bug->project_id);
$tpl_show_product_version = $tpl_show_versions && in_array('product_version', $t_fields);
$tpl_show_product_build = $tpl_show_versions && in_array('product_build', $t_fields) && config_get('enable_product_build');
$tpl_show_fixed_in_version = $tpl_show_versions && in_array('fixed_in_version', $t_fields);
$tpl_show_target_version = $tpl_show_versions && in_array('target_version', $t_fields) && access_has_bug_level(config_get('roadmap_view_threshold'), $f_bug_id);
$tpl_show_summary = in_array('summary', $t_fields);
$tpl_show_description = in_array('description', $t_fields);
$tpl_show_steps_to_reproduce = in_array('steps_to_reproduce', $t_fields);
$tpl_show_additional_information = in_array('additional_info', $t_fields);
$tpl_show_tags = in_array('tags', $t_fields);
$tpl_show_attachments = in_array('attachments', $t_fields);
$tpl_show_history = access_has_bug_level(config_get('view_history_threshold'), $f_bug_id);
$tpl_window_title = string_display_line(config_get('window_title'));
$tpl_project_name = $tpl_show_project ? string_display_line(project_get_name($tpl_bug->project_id)) : '';
$tpl_formatted_bug_id = $tpl_show_id ? bug_format_id($f_bug_id) : '';
$tpl_category_name = $tpl_show_category ? string_display_line(category_full_name($tpl_bug->category_id)) : '';
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:31,代码来源:print_bug_page.php
示例5: print_custom_field_value
<?php
print_custom_field_value($t_def, $t_id, $f_bug_id);
?>
</td>
</tr>
<?php
}
}
# custom_field_has_read_access( $t_id, $f_bug_id ) )
}
# foreach( $t_related_custom_field_ids as $t_id )
?>
<?php
if ($f_new_status >= $t_resolved) {
if (version_should_show_product_version($t_bug->project_id) && !bug_is_readonly($f_bug_id) && access_has_bug_level(config_get('update_bug_threshold'), $f_bug_id)) {
?>
<!-- Fixed in Version -->
<tr <?php
echo helper_alternate_class();
?>
>
<td class="category">
<?php
echo lang_get('fixed_in_version');
?>
</td>
<td>
<select name="fixed_in_version">
<?php
print_version_option_list($t_bug->fixed_in_version, $t_bug->project_id, VERSION_ALL);
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:31,代码来源:bug_change_status_page.php
示例6: filter_draw_selection_area2
/**
* Prints the filter selection area for both the bug list view screen and
* the bug list print screen. This function was an attempt to make it easier to
* add new filters and rearrange them on screen for both pages.
* @param int $p_page_number
* @param bool $p_for_screen
* @param bool $p_expanded
*/
function filter_draw_selection_area2($p_page_number, $p_for_screen = true, $p_expanded = true)
{
$t_form_name_suffix = $p_expanded ? '_open' : '_closed';
$t_filter = current_user_get_bug_filter();
$t_filter = filter_ensure_valid_filter($t_filter);
$t_project_id = helper_get_current_project();
$t_page_number = (int) $p_page_number;
$t_view_type = $t_filter['_view_type'];
$t_tdclass = 'small-caption';
$t_trclass = 'row-category2';
$t_action = 'view_all_set.php?f=3';
if ($p_for_screen == false) {
$t_tdclass = 'print';
$t_trclass = '';
$t_action = 'view_all_set.php';
}
?>
<br />
<form method="post" name="filters<?php
echo $t_form_name_suffix;
?>
" id="filters_form<?php
echo $t_form_name_suffix;
?>
" action="<?php
echo $t_action;
?>
">
<?php
# CSRF protection not required here - form does not result in modifications
?>
<input type="hidden" name="type" value="1" />
<?php
if ($p_for_screen == false) {
echo '<input type="hidden" name="print" value="1" />';
echo '<input type="hidden" name="offset" value="0" />';
}
?>
<input type="hidden" name="page_number" value="<?php
echo $t_page_number;
?>
" />
<input type="hidden" name="view_type" value="<?php
echo $t_view_type;
?>
" />
<table class="width100" cellspacing="1">
<?php
$t_filter_cols = config_get('filter_custom_fields_per_row');
if ($p_expanded) {
$t_custom_cols = $t_filter_cols;
$t_current_user_access_level = current_user_get_access_level();
$t_accessible_custom_fields_ids = array();
$t_accessible_custom_fields_names = array();
$t_accessible_custom_fields_values = array();
$t_num_custom_rows = 0;
$t_per_row = 0;
if (ON == config_get('filter_by_custom_fields')) {
$t_custom_fields = custom_field_get_linked_ids($t_project_id);
foreach ($t_custom_fields as $t_cfid) {
$t_field_info = custom_field_cache_row($t_cfid, true);
if ($t_field_info['access_level_r'] <= $t_current_user_access_level && $t_field_info['filter_by']) {
$t_accessible_custom_fields_ids[] = $t_cfid;
$t_accessible_custom_fields_names[] = $t_field_info['name'];
$t_accessible_custom_fields_types[] = $t_field_info['type'];
$t_accessible_custom_fields_values[] = custom_field_distinct_values($t_field_info);
}
}
if (count($t_accessible_custom_fields_ids) > 0) {
$t_per_row = config_get('filter_custom_fields_per_row');
$t_num_custom_rows = ceil(count($t_accessible_custom_fields_ids) / $t_per_row);
}
}
$t_filters_url = 'view_filters_page.php?for_screen=' . $p_for_screen;
if ('advanced' == $t_view_type) {
$t_filters_url = $t_filters_url . '&view_type=advanced';
}
$t_filters_url = $t_filters_url . '&target_field=';
$t_show_product_version = version_should_show_product_version($t_project_id);
$t_show_build = $t_show_product_version && config_get('enable_product_build') == ON;
# overload handler_id setting if user isn't supposed to see them (ref #6189)
if (!access_has_project_level(config_get('view_handler_threshold'), $t_project_id)) {
$t_filter[FILTER_PROPERTY_HANDLER_ID] = array(META_FILTER_ANY);
}
?>
<tr <?php
echo "class=\"" . $t_trclass . "\"";
?>
>
//.........这里部分代码省略.........
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:101,代码来源:filter_api.php
注:本文中的version_should_show_product_version函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论