本文整理汇总了PHP中custom_field_get_ids函数的典型用法代码示例。如果您正苦于以下问题:PHP custom_field_get_ids函数的具体用法?PHP custom_field_get_ids怎么用?PHP custom_field_get_ids使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了custom_field_get_ids函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: html_button
</center></td></tr>
<!-- move database project files to disk -->
<tr bgcolor="#ffffff"><td>Move project files stored in database schema to disk.</td><td><center>
<?php
html_button('move_db2disk.php', 'Move Project Files to Disk', array('doc' => 'project'));
?>
</center></td></tr>
<!-- move custom field content to standard field -->
<tr bgcolor="#ffffff"><td>Copy Custom Field to Standard Field.</td><td><center>
<form method="post" action="copy_field.php">
From
<SELECT name="source_id">
<?php
$t_custom_ids = custom_field_get_ids();
foreach ($t_custom_ids as $t_id) {
printf("<OPTION VALUE=\"%d\">%s", $t_id, custom_field_get_field($t_id, 'name'));
}
?>
</SELECT> to
<SELECT name="dest_id">
<?php
# @@@ should be expanded and configurable
# list matches exact field name from database
$t_dest_ids = array('fixed_in_version');
foreach ($t_dest_ids as $t_id) {
printf("<OPTION VALUE=\"%s\">%s", $t_id, $t_id);
}
?>
</SELECT>
示例2: filter_ensure_valid_filter
//.........这里部分代码省略.........
$p_filter_arr[FILTER_PROPERTY_TAG_SELECT] = gpc_get_string(FILTER_PROPERTY_TAG_SELECT, '');
}
if (!isset($p_filter_arr[FILTER_PROPERTY_MATCH_TYPE])) {
$p_filter_arr[FILTER_PROPERTY_MATCH_TYPE] = gpc_get_int(FILTER_PROPERTY_MATCH_TYPE, FILTER_MATCH_ALL);
}
# initialize plugin filters
$t_plugin_filters = filter_get_plugin_filters();
foreach ($t_plugin_filters as $t_field_name => $t_filter_object) {
if (!isset($p_filter_arr[$t_field_name])) {
switch ($t_filter_object->type) {
case FILTER_TYPE_STRING:
$p_filter_arr[$t_field_name] = gpc_get_string($t_field_name, $t_filter_object->default);
break;
case FILTER_TYPE_INT:
$p_filter_arr[$t_field_name] = gpc_get_int($t_field_name, (int) $t_filter_object->default);
break;
case FILTER_TYPE_BOOLEAN:
$p_filter_arr[$t_field_name] = gpc_get_bool($t_field_name, (bool) $t_filter_object->default);
break;
case FILTER_TYPE_MULTI_STRING:
$p_filter_arr[$t_field_name] = gpc_get_string_array($t_field_name, array(0 => (string) META_FILTER_ANY));
break;
case FILTER_TYPE_MULTI_INT:
$p_filter_arr[$t_field_name] = gpc_get_int_array($t_field_name, array(0 => META_FILTER_ANY));
break;
default:
$p_filter_arr[$t_field_name] = (string) META_FILTER_ANY;
}
}
if (!$t_filter_object->validate($p_filter_arr[$t_field_name])) {
$p_filter_arr[$t_field_name] = $t_filter_object->default;
}
}
$t_custom_fields = custom_field_get_ids();
# @@@ (thraxisp) This should really be the linked ids, but we don't know the project
$f_custom_fields_data = array();
if (is_array($t_custom_fields) && count($t_custom_fields) > 0) {
foreach ($t_custom_fields as $t_cfid) {
if (is_array(gpc_get('custom_field_' . $t_cfid, null))) {
$f_custom_fields_data[$t_cfid] = gpc_get_string_array('custom_field_' . $t_cfid, array(META_FILTER_ANY));
} else {
$f_custom_fields_data[$t_cfid] = gpc_get_string('custom_field_' . $t_cfid, (string) META_FILTER_ANY);
$f_custom_fields_data[$t_cfid] = array($f_custom_fields_data[$t_cfid]);
}
}
}
# validate sorting
$t_fields = helper_get_columns_to_view();
$t_n_fields = count($t_fields);
for ($i = 0; $i < $t_n_fields; $i++) {
if (isset($t_fields[$i]) && in_array($t_fields[$i], array('selection', 'edit', 'bugnotes_count', 'attachment_count'))) {
unset($t_fields[$i]);
}
}
# Make sure array is no longer than 2 elements
$t_sort_fields = explode(',', $p_filter_arr['sort']);
if (count($t_sort_fields) > 2) {
$t_sort_fields = array_slice($t_sort_fields, 0, 2);
}
# Make sure array is no longer than 2 elements
$t_dir_fields = explode(',', $p_filter_arr['dir']);
if (count($t_dir_fields) > 2) {
$t_dir_fields = array_slice($t_dir_fields, 0, 2);
}
# Validate the max of two segments for $t_sort_fields and $t_dir_fields
for ($i = 0; $i < 2; $i++) {
示例3: ERP_custom_function_print_custom_fields
function ERP_custom_function_print_custom_fields($p_name, $p_sel_value)
{
# Custom Fields
$t_custom_fields = custom_field_get_ids();
foreach ($t_custom_fields as $t_field_id) {
$t_def = custom_field_get_definition($t_field_id);
echo '<tr ' . helper_alternate_class() . '><td class="category">';
ERP_print_documentation_link($p_name);
echo ': ' . string_display(lang_get_defaulted($t_def['name'])) . '</td>';
echo '<td class="center" colspan="2">';
ERP_print_custom_field_input(is_array($p_sel_value) && isset($p_sel_value[$t_field_id]) ? $p_sel_value[$t_field_id] : NULL, $t_def);
echo '</td></tr>';
}
}
示例4: filter_ensure_valid_filter
function filter_ensure_valid_filter($p_filter_arr)
{
# extend current filter to add information passed via POST
if (!isset($p_filter_arr['_version'])) {
$p_filter_arr['_version'] = config_get('cookie_version');
}
$t_cookie_vers = (int) substr($p_filter_arr['_version'], 1);
if (substr(config_get('cookie_version'), 1) > $t_cookie_vers) {
# if the version is old, update it
$p_filter_arr['_version'] = config_get('cookie_version');
}
if (!isset($p_filter_arr['_view_type'])) {
$p_filter_arr['_view_type'] = gpc_get_string('view_type', 'simple');
}
if (!isset($p_filter_arr['per_page'])) {
$p_filter_arr['per_page'] = gpc_get_int('per_page', config_get('default_limit_view'));
}
if (!isset($p_filter_arr['highlight_changed'])) {
$p_filter_arr['highlight_changed'] = config_get('default_show_changed');
}
if (!isset($p_filter_arr['sticky_issues'])) {
$p_filter_arr['sticky_issues'] = config_get('show_sticky_issues');
}
if (!isset($p_filter_arr['sort'])) {
$p_filter_arr['sort'] = "last_updated";
}
if (!isset($p_filter_arr['dir'])) {
$p_filter_arr['dir'] = "DESC";
}
if (!isset($p_filter_arr['platform'])) {
$p_filter_arr['platform'] = array(0 => META_FILTER_ANY);
}
if (!isset($p_filter_arr['os'])) {
$p_filter_arr['os'] = array(0 => META_FILTER_ANY);
}
if (!isset($p_filter_arr['os_build'])) {
$p_filter_arr['os_build'] = array(0 => META_FILTER_ANY);
}
if (!isset($p_filter_arr['project_id'])) {
$p_filter_arr['project_id'] = array(0 => META_FILTER_CURRENT);
}
if (!isset($p_filter_arr['start_month'])) {
$p_filter_arr['start_month'] = gpc_get_string('start_month', date('m'));
}
if (!isset($p_filter_arr['start_day'])) {
$p_filter_arr['start_day'] = gpc_get_string('start_day', 1);
}
if (!isset($p_filter_arr['start_year'])) {
$p_filter_arr['start_year'] = gpc_get_string('start_year', date('Y'));
}
if (!isset($p_filter_arr['end_month'])) {
$p_filter_arr['end_month'] = gpc_get_string('end_month', date('m'));
}
if (!isset($p_filter_arr['end_day'])) {
$p_filter_arr['end_day'] = gpc_get_string('end_day', date('d'));
}
if (!isset($p_filter_arr['end_year'])) {
$p_filter_arr['end_year'] = gpc_get_string('end_year', date('Y'));
}
if (!isset($p_filter_arr['search'])) {
$p_filter_arr['search'] = '';
}
if (!isset($p_filter_arr['and_not_assigned'])) {
$p_filter_arr['and_not_assigned'] = gpc_get_bool('and_not_assigned', false);
}
if (!isset($p_filter_arr['do_filter_by_date'])) {
$p_filter_arr['do_filter_by_date'] = gpc_get_bool('do_filter_by_date', false);
}
if (!isset($p_filter_arr['view_state'])) {
$p_filter_arr['view_state'] = gpc_get('view_state', '');
} else {
if ($p_filter_arr['view_state'] == 'any' || $p_filter_arr['view_state'] == 0) {
$p_filter_arr['view_state'] = META_FILTER_ANY;
}
}
if (!isset($p_filter_arr['relationship_type'])) {
$p_filter_arr['relationship_type'] = gpc_get_int('relationship_type', -1);
}
if (!isset($p_filter_arr['relationship_bug'])) {
$p_filter_arr['relationship_bug'] = gpc_get_int('relationship_bug', 0);
}
if (!isset($p_filter_arr['target_version'])) {
$p_filter_arr['target_version'] = META_FILTER_ANY;
}
if (!isset($p_filter_arr['tag_string'])) {
$p_filter_arr['tag_string'] = gpc_get_string('tag_string', '');
}
if (!isset($p_filter_arr['tag_select'])) {
$p_filter_arr['tag_select'] = gpc_get_string('tag_select', '');
}
$t_custom_fields = custom_field_get_ids();
# @@@ (thraxisp) This should really be the linked ids, but we don't know the project
$f_custom_fields_data = array();
if (is_array($t_custom_fields) && sizeof($t_custom_fields) > 0) {
foreach ($t_custom_fields as $t_cfid) {
if (is_array(gpc_get('custom_field_' . $t_cfid, null))) {
$f_custom_fields_data[$t_cfid] = gpc_get_string_array('custom_field_' . $t_cfid, META_FILTER_ANY);
} else {
$f_custom_fields_data[$t_cfid] = gpc_get_string('custom_field_' . $t_cfid, META_FILTER_ANY);
$f_custom_fields_data[$t_cfid] = array($f_custom_fields_data[$t_cfid]);
//.........这里部分代码省略.........
示例5: array
log_event( LOG_FILTERING, 'view_all_set.php: Generalise the filter' );
$t_setting_arr[ FILTER_PROPERTY_CATEGORY_ID ] = array( META_FILTER_ANY );
$t_setting_arr[ FILTER_PROPERTY_REPORTER_ID ] = array( META_FILTER_ANY );
$t_setting_arr[ FILTER_PROPERTY_HANDLER_ID ] = array( META_FILTER_ANY );
$t_setting_arr[ FILTER_PROPERTY_BUILD ] = array( META_FILTER_ANY );
$t_setting_arr[ FILTER_PROPERTY_VERSION ] = array( META_FILTER_ANY );
$t_setting_arr[ FILTER_PROPERTY_PRIORITY ] = array( META_FILTER_ANY );
$t_setting_arr[ FILTER_PROPERTY_FIXED_IN_VERSION ] = array( META_FILTER_ANY );
$t_setting_arr[ FILTER_PROPERTY_TARGET_VERSION ] = array( META_FILTER_ANY );
$t_setting_arr[ FILTER_PROPERTY_MONITOR_USER_ID ] = array( META_FILTER_ANY );
$t_setting_arr[ FILTER_PROPERTY_NOTE_USER_ID ] = array( META_FILTER_ANY );
$t_setting_arr[ FILTER_PROPERTY_RELATIONSHIP_TYPE ] = -1;
$t_setting_arr[ FILTER_PROPERTY_RELATIONSHIP_BUG ] = 0;
$t_custom_fields = custom_field_get_ids(); # @@@ (thraxisp) This should really be the linked ids, but we don't know the project
$t_custom_fields_data = array();
if ( is_array( $t_custom_fields ) && ( count( $t_custom_fields ) > 0 ) ) {
foreach( $t_custom_fields as $t_cfid ) {
$t_custom_fields_data[$t_cfid] = array( META_FILTER_ANY );
}
}
$t_setting_arr['custom_fields'] = $t_custom_fields_data;
break;
# Just set the search string value
case '5':
log_event( LOG_FILTERING, 'view_all_set.php: Search Text' );
$t_setting_arr[ FILTER_PROPERTY_SEARCH ] = $f_search;
break;