当前位置: 首页>>代码示例>>PHP>>正文


PHP lang_get_defaulted函数代码示例

本文整理汇总了PHP中lang_get_defaulted函数的典型用法代码示例。如果您正苦于以下问题:PHP lang_get_defaulted函数的具体用法?PHP lang_get_defaulted怎么用?PHP lang_get_defaulted使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了lang_get_defaulted函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: kanban_ajax_request_bug_update_status

/**
 * updates the status field
 * @return bool 
 * @access public
 * @see bug_update.php
 */
function kanban_ajax_request_bug_update_status()
{
    $p_bug_id = gpc_get_int('id');
    $p_new_status = gpc_get_int('new_status');
    $t_project_id = gpc_get_int('project_id');
    $c_bug_id = (int) $p_bug_id;
    $f_new_status = (int) $p_new_status;
    $t_bug_data = bug_get($c_bug_id, true);
    $f_update_mode = gpc_get_bool('update_mode', FALSE);
    # set if called from generic update page
    if (!(access_has_bug_level(access_get_status_threshold($f_new_status, $t_project_id), $c_bug_id) || access_has_bug_level(config_get('update_bug_threshold'), $c_bug_id) || bug_get_field($c_bug_id, 'reporter_id') == auth_get_current_user_id() && (ON == config_get('allow_reporter_reopen') || ON == config_get('allow_reporter_close')))) {
        access_denied();
    }
    # extract current extended information
    $t_old_bug_status = $t_bug_data->status;
    log_event(LOG_AJAX, "Old bug status {$t_old_bug_status} - trying update to new status {$f_new_status}...");
    $t_bug_data->reporter_id = gpc_get_int('reporter_id', $t_bug_data->reporter_id);
    $t_bug_data->handler_id = gpc_get_int('handler_id', $t_bug_data->handler_id);
    $t_bug_data->duplicate_id = gpc_get_int('duplicate_id', $t_bug_data->duplicate_id);
    $t_bug_data->priority = gpc_get_int('priority', $t_bug_data->priority);
    $t_bug_data->severity = gpc_get_int('severity', $t_bug_data->severity);
    $t_bug_data->reproducibility = gpc_get_int('reproducibility', $t_bug_data->reproducibility);
    $t_bug_data->status = gpc_get_int('new_status', $t_bug_data->status);
    $t_bug_data->resolution = gpc_get_int('resolution', $t_bug_data->resolution);
    $t_bug_data->projection = gpc_get_int('projection', $t_bug_data->projection);
    $t_bug_data->category_id = gpc_get_int('category_id', $t_bug_data->category_id);
    $t_bug_data->eta = gpc_get_int('eta', $t_bug_data->eta);
    $t_bug_data->os = gpc_get_string('os', $t_bug_data->os);
    $t_bug_data->os_build = gpc_get_string('os_build', $t_bug_data->os_build);
    $t_bug_data->platform = gpc_get_string('platform', $t_bug_data->platform);
    $t_bug_data->version = gpc_get_string('version', $t_bug_data->version);
    $t_bug_data->build = gpc_get_string('build', $t_bug_data->build);
    $t_bug_data->fixed_in_version = gpc_get_string('fixed_in_version', $t_bug_data->fixed_in_version);
    $t_bug_data->view_state = gpc_get_int('view_state', $t_bug_data->view_state);
    $t_bug_data->summary = gpc_get_string('summary', $t_bug_data->summary);
    $t_due_date = gpc_get_string('due_date', null);
    if (access_has_project_level(config_get('roadmap_update_threshold'), $t_bug_data->project_id)) {
        $t_bug_data->target_version = gpc_get_string('target_version', $t_bug_data->target_version);
    }
    if ($t_due_date !== null) {
        if (is_blank($t_due_date)) {
            $t_bug_data->due_date = 1;
        } else {
            $t_bug_data->due_date = strtotime($t_due_date);
        }
    }
    $t_bug_data->description = gpc_get_string('description', $t_bug_data->description);
    $t_bug_data->steps_to_reproduce = gpc_get_string('steps_to_reproduce', $t_bug_data->steps_to_reproduce);
    $t_bug_data->additional_information = gpc_get_string('additional_information', $t_bug_data->additional_information);
    $f_private = gpc_get_bool('private');
    $f_bugnote_text = gpc_get_string('bugnote_text', '');
    $f_time_tracking = gpc_get_string('time_tracking', '0:00');
    $f_close_now = gpc_get_string('close_now', false);
    # Handle auto-assigning
    if (config_get('bug_submit_status') == $t_bug_data->status && $t_bug_data->status == $t_old_bug_status && 0 != $t_bug_data->handler_id && ON == config_get('auto_set_status_to_assigned')) {
        $t_bug_data->status = config_get('bug_assigned_status');
    }
    helper_call_custom_function('issue_update_validate', array($c_bug_id, $t_bug_data, $f_bugnote_text));
    $t_resolved = config_get('bug_resolved_status_threshold');
    $t_closed = config_get('bug_closed_status_threshold');
    $t_custom_status_label = "update";
    # default info to check
    if ($t_bug_data->status == $t_resolved) {
        $t_custom_status_label = "resolved";
    }
    if ($t_bug_data->status == $t_closed) {
        $t_custom_status_label = "closed";
    }
    $t_related_custom_field_ids = custom_field_get_linked_ids($t_bug_data->project_id);
    foreach ($t_related_custom_field_ids as $t_id) {
        $t_def = custom_field_get_definition($t_id);
        # Only update the field if it would have been display for editing
        if (!(!$f_update_mode && $t_def['require_' . $t_custom_status_label] || !$f_update_mode && $t_def['display_' . $t_custom_status_label] && in_array($t_custom_status_label, array("resolved", "closed")) || $f_update_mode && $t_def['display_update'] || $f_update_mode && $t_def['require_update'])) {
            continue;
        }
        # Do not set custom field value if user has no write access.
        if (!custom_field_has_write_access($t_id, $c_bug_id)) {
            continue;
        }
        if ($t_def['require_' . $t_custom_status_label] && !gpc_isset_custom_field($t_id, $t_def['type'])) {
            error_parameters(lang_get_defaulted(custom_field_get_field($t_id, 'name')));
            trigger_error(ERROR_EMPTY_FIELD, ERROR);
        }
        # Only update the field if it is posted,
        #	or if it is empty, and the current value isn't the default
        if (!gpc_isset_custom_field($t_id, $t_def['type']) && custom_field_get_value($t_id, $c_bug_id) == $t_def['default_value']) {
            continue;
        }
        if (!custom_field_set_value($t_id, $c_bug_id, gpc_get_custom_field("custom_field_{$t_id}", $t_def['type'], NULL))) {
            error_parameters(lang_get_defaulted(custom_field_get_field($t_id, 'name')));
            log_event(LOG_AJAX, "Error setting new status: " . ERROR_CUSTOM_FIELD_INVALID_VALUE . "\nBugdata: " . print_r($t_bug_data, true) . " Line: " . __LINE__);
            trigger_error(ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR);
        }
    }
//.........这里部分代码省略.........
开发者ID:aberad,项目名称:MantisKanban,代码行数:101,代码来源:kanban_ajax_api.php

示例2: print_filter_show_sort

/**
 * Print sort fields
 * @return void
 */
function print_filter_show_sort()
{
    global $g_filter;
    # get all of the displayed fields for sort, then drop ones that
    #  are not appropriate and translate the rest
    $t_fields = helper_get_columns_to_view();
    $t_n_fields = count($t_fields);
    $t_shown_fields[''] = '';
    for ($i = 0; $i < $t_n_fields; $i++) {
        if (!in_array($t_fields[$i], array('selection', 'edit', 'bugnotes_count', 'attachment_count'))) {
            if (strpos($t_fields[$i], 'custom_') === 0) {
                $t_field_name = string_display(lang_get_defaulted(utf8_substr($t_fields[$i], utf8_strlen('custom_'))));
            } else {
                $t_field_name = string_get_field_name($t_fields[$i]);
            }
            $t_shown_fields[$t_fields[$i]] = $t_field_name;
        }
    }
    $t_shown_dirs[''] = '';
    $t_shown_dirs['ASC'] = lang_get('bugnote_order_asc');
    $t_shown_dirs['DESC'] = lang_get('bugnote_order_desc');
    # get default values from filter structure
    $t_sort_fields = explode(',', $g_filter[FILTER_PROPERTY_SORT_FIELD_NAME]);
    $t_dir_fields = explode(',', $g_filter[FILTER_PROPERTY_SORT_DIRECTION]);
    if (!isset($t_sort_fields[1])) {
        $t_sort_fields[1] = '';
        $t_dir_fields[1] = '';
    }
    # if there are fields to display, show the dropdowns
    if (count($t_fields) > 0) {
        # display a primary and secondary sort fields
        echo '<select name="', FILTER_PROPERTY_SORT_FIELD_NAME, '_0">';
        foreach ($t_shown_fields as $t_key => $t_val) {
            echo '<option value="' . $t_key . '"';
            check_selected($t_key, $t_sort_fields[0]);
            echo '>' . $t_val . '</option>';
        }
        echo '</select>';
        echo '<select name="', FILTER_PROPERTY_SORT_DIRECTION, '_0">';
        foreach ($t_shown_dirs as $t_key => $t_val) {
            echo '<option value="' . $t_key . '"';
            check_selected($t_key, $t_dir_fields[0]);
            echo '>' . $t_val . '</option>';
        }
        echo '</select>';
        echo ', ';
        # for secondary sort
        echo '<select name="', FILTER_PROPERTY_SORT_FIELD_NAME, '_1">';
        foreach ($t_shown_fields as $t_key => $t_val) {
            echo '<option value="' . $t_key . '"';
            check_selected($t_key, $t_sort_fields[1]);
            echo '>' . $t_val . '</option>';
        }
        echo '</select>';
        echo '<select name="', FILTER_PROPERTY_SORT_DIRECTION, '_1">';
        foreach ($t_shown_dirs as $t_key => $t_val) {
            echo '<option value="' . $t_key . '"';
            check_selected($t_key, $t_dir_fields[1]);
            echo '>' . $t_val . '</option>';
        }
        echo '</select>';
    } else {
        echo lang_get_defaulted('last_updated') . lang_get('bugnote_order_desc');
        echo '<input type="hidden" name="', FILTER_PROPERTY_SORT_FIELD_NAME, '_1" value="last_updated" />';
        echo '<input type="hidden" name="', FILTER_PROPERTY_SORT_DIRECTION, '_1" value="DESC" />';
    }
}
开发者ID:vipjaven,项目名称:mantisbt,代码行数:71,代码来源:filter_api.php

示例3: config_get

        }
    }
    echo '</tr>';
}
$t_resolved = config_get('bug_resolved_status_threshold');
$t_closed = config_get('bug_closed_status_threshold');
$t_bin_count = $t_ptr;
$t_labels = array();
$i = 0;
if ($f_summary) {
    $t_labels[++$i] = $t_label_strings[0];
    $t_labels[++$i] = $t_label_strings[1];
    $t_labels[++$i] = $t_label_strings[2];
} else {
    foreach ($t_view_status as $t_status => $t_label) {
        $t_labels[++$i] = isset($t_status_labels[$t_status]) ? $t_status_labels[$t_status] : lang_get_defaulted($t_label);
    }
}
$t_label_count = $i;
// reverse the array and consolidate the data, if necessary
$t_metrics = array();
for ($t_ptr = 0; $t_ptr < $t_bin_count; $t_ptr++) {
    $t = $t_bin_count - $t_ptr;
    $t_metrics[0][$t_ptr] = $t_marker[$t];
    if ($f_summary) {
        $t_metrics[1][$t_ptr] = 0;
        $t_metrics[2][$t_ptr] = 0;
        $t_metrics[3][$t_ptr] = 0;
        foreach ($t_view_status as $t_status => $t_label) {
            if (isset($t_data[$t][$t_status])) {
                if ($t_status < $t_resolved) {
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:31,代码来源:bug_graph_bystatus.php

示例4: custom_field_get_linked_ids

    }
    echo '<td class="print" colspan="', $t_spacer, '">&#160;</td>';
    echo '</tr>';
}
#
# Custom Fields
#
$t_related_custom_field_ids = custom_field_get_linked_ids($t_bug->project_id);
foreach ($t_related_custom_field_ids as $t_id) {
    # Don't display the field if user does not have read access to it
    if (!custom_field_has_read_access_by_project_id($t_id, $t_bug->project_id)) {
        continue;
    }
    $t_def = custom_field_get_definition($t_id);
    echo '<tr class="print">';
    echo '<th class="print-category">', string_display_line(lang_get_defaulted($t_def['name'])), '</th>';
    echo '<td class="print" colspan="4">';
    print_custom_field_value($t_def, $t_id, $f_bug_id);
    echo '</td>';
    echo '</tr>';
}
# foreach
echo '<tr><td class="print-spacer" colspan="6"><hr /></td></tr>';
if ($t_show_summary) {
    echo '<tr class="print">';
    echo '<th class="print-category">', lang_get('summary'), '</th>';
    echo '<td class="print" colspan="5">', $t_summary, '</td>';
    echo '</tr>';
}
if ($t_show_description) {
    echo '<tr class="print">';
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:31,代码来源:print_bug_page.php

示例5: config_get

	<?php 
    # -- Custom Field Searching --
    ?>
	<?php 
    if (sizeof($t_accessible_custom_fields_ids) > 0) {
        $t_per_row = config_get('filter_custom_fields_per_row');
        $t_num_rows = ceil(sizeof($t_accessible_custom_fields_ids) / $t_per_row);
        $t_base = 0;
        for ($i = 0; $i < $t_num_rows; $i++) {
            ?>
			<tr class="row-category2">
			<?php 
            for ($j = 0; $j < $t_per_row; $j++) {
                echo '<td class="small-caption" colspan="' . 1 * $t_filter_cols . '">';
                if (isset($t_accessible_custom_fields_names[$t_base + $j])) {
                    echo string_display(lang_get_defaulted($t_accessible_custom_fields_names[$t_base + $j]));
                } else {
                    echo '&nbsp;';
                }
                echo '</td>';
            }
            ?>
			</tr>
			<tr class="row-2">
			<?php 
            for ($j = 0; $j < $t_per_row; $j++) {
                echo '<td colspan="' . 1 * $t_filter_cols . '">';
                if (isset($t_accessible_custom_fields_ids[$t_base + $j])) {
                    print_filter_custom_field($t_accessible_custom_fields_ids[$t_base + $j]);
                } else {
                    echo '&nbsp;';
开发者ID:renemilk,项目名称:spring-website,代码行数:31,代码来源:view_filters_page.php

示例6: lang_get

        $t_button_title = lang_get('view_status_group_bugs_button');
        $t_form = 'view_status';
        break;
    case 'UP_FIXED_IN_VERSION':
        $t_question_title = lang_get('fixed_in_version_bugs_conf_msg');
        $t_button_title = lang_get('fixed_in_version_group_bugs_button');
        $t_form = 'fixed_in_version';
        break;
    case 'UP_TARGET_VERSION':
        $t_question_title = lang_get('target_version_bugs_conf_msg');
        $t_button_title = lang_get('target_version_group_bugs_button');
        $t_form = 'target_version';
        break;
    case 'CUSTOM':
        $t_custom_field_def = custom_field_get_definition($t_custom_field_id);
        $t_question_title = sprintf(lang_get('actiongroup_menu_update_field'), lang_get_defaulted($t_custom_field_def['name']));
        $t_button_title = $t_question_title;
        $t_form = "custom_field_{$t_custom_field_id}";
        break;
    default:
        trigger_error(ERROR_GENERIC, ERROR);
}
bug_group_action_print_top();
if ($t_multiple_projects) {
    echo '<p class="bold">' . lang_get('multiple_projects') . '</p>';
}
?>

<br />

<div align="center">
开发者ID:renemilk,项目名称:spring-website,代码行数:31,代码来源:bug_actiongroup_page.php

示例7: html_button_wiki

function html_button_wiki($p_bug_id)
{
    if (ON == config_get('wiki_enable')) {
        if (access_has_bug_level(config_get('update_bug_threshold'), $p_bug_id)) {
            html_button('wiki.php', lang_get_defaulted('Wiki'), array('id' => $p_bug_id, 'type' => 'issue'), 'get');
        }
    }
}
开发者ID:amjadtbssm,项目名称:website,代码行数:8,代码来源:html_api.php

示例8: print_custom_field_input

		<?php 
        print_custom_field_input($t_def, $f_bug_id);
        ?>
	</td>
</tr>
<?php 
    } else {
        if (custom_field_has_read_access($t_id, $f_bug_id)) {
            ?>
	<tr <?php 
            echo helper_alternate_class();
            ?>
>
		<th class="category">
			<?php 
            echo lang_get_defaulted($t_def['name']);
            ?>
		</th>
		<td>
			<?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 )
?>
开发者ID:kaos,项目名称:mantisbt,代码行数:31,代码来源:bug_change_status_page.php

示例9: print_filter_show_sort

function print_filter_show_sort()
{
    global $t_filter;
    # get all of the displayed fields for sort, then drop ones that
    #  are not appropriate and translate the rest
    $t_fields = helper_get_columns_to_view();
    $t_n_fields = count($t_fields);
    $t_shown_fields[""] = "";
    for ($i = 0; $i < $t_n_fields; $i++) {
        if (!in_array($t_fields[$i], array('selection', 'edit', 'bugnotes_count', 'attachment'))) {
            if (strpos($t_fields[$i], 'custom_') === 0) {
                $t_field_name = string_display(lang_get_defaulted(substr($t_fields[$i], strlen('custom_'))));
            } else {
                $t_field_name = string_get_field_name($t_fields[$i]);
            }
            $t_shown_fields[$t_fields[$i]] = $t_field_name;
        }
    }
    $t_shown_dirs[""] = "";
    $t_shown_dirs["ASC"] = lang_get('bugnote_order_asc');
    $t_shown_dirs["DESC"] = lang_get('bugnote_order_desc');
    # get default values from filter structure
    $t_sort_fields = split(',', $t_filter['sort']);
    $t_dir_fields = split(',', $t_filter['dir']);
    if (!isset($t_sort_fields[1])) {
        $t_sort_fields[1] = '';
        $t_dir_fields[1] = '';
    }
    # if there are fields to display, show the dropdowns
    if (count($t_fields) > 0) {
        # display a primary and secondary sort fields
        echo '<select name="sort_0">';
        foreach ($t_shown_fields as $key => $val) {
            echo "<option value=\"{$key}\"";
            check_selected($key, $t_sort_fields[0]);
            echo ">{$val}</option>";
        }
        echo '</select>';
        echo '<select name="dir_0">';
        foreach ($t_shown_dirs as $key => $val) {
            echo "<option value=\"{$key}\"";
            check_selected($key, $t_dir_fields[0]);
            echo ">{$val}</option>";
        }
        echo '</select>';
        echo ', ';
        # for secondary sort
        echo '<select name="sort_1">';
        foreach ($t_shown_fields as $key => $val) {
            echo "<option value=\"{$key}\"";
            check_selected($key, $t_sort_fields[1]);
            echo ">{$val}</option>";
        }
        echo '</select>';
        echo '<select name="dir_1">';
        foreach ($t_shown_dirs as $key => $val) {
            echo "<option value=\"{$key}\"";
            check_selected($key, $t_dir_fields[1]);
            echo ">{$val}</option>";
        }
        echo '</select>';
    } else {
        echo lang_get_defaulted('last_updated') . lang_get('bugnote_order_desc');
        echo "<input type=\"hidden\" name=\"sort_1\" value=\"last_updated\" />";
        echo "<input type=\"hidden\" name=\"dir_1\" value=\"DESC\" />";
    }
}
开发者ID:amjadtbssm,项目名称:website,代码行数:67,代码来源:filter_api.php

示例10: custom_field_get_linked_ids

	</td>
	<td class="print" colspan="2">&#160;</td>
</tr>
<?php 
        $t_related_custom_field_ids = custom_field_get_linked_ids($t_bug->project_id);
        foreach ($t_related_custom_field_ids as $t_custom_field_id) {
            # Don't display the field if user does not have read access to it
            if (!custom_field_has_read_access_by_project_id($t_custom_field_id, $t_bug->project_id)) {
                continue;
            }
            $t_def = custom_field_get_definition($t_custom_field_id);
            ?>
<tr class="print">
	<td class="print-category">
		<?php 
            echo string_display_line(sprintf(lang_get('label'), lang_get_defaulted($t_def['name'])));
            ?>
	</td>
	<td class="print" colspan="5">
		<?php 
            print_custom_field_value($t_def, $t_custom_field_id, $t_id);
            ?>
	</td>
</tr>
<?php 
        }
        # foreach
        ?>
<tr>
	<td class="print-spacer" colspan="6">
		<hr />
开发者ID:spring,项目名称:spring-website,代码行数:31,代码来源:print_all_bug_page_word.php

示例11: excel_get_titles_row

/**
 * Gets an Xml Row that contains all column titles.
 * @returns The xml row.
 */
function excel_get_titles_row()
{
    $t_columns = excel_get_columns();
    $t_ret = '<Row>';
    foreach ($t_columns as $t_column) {
        $t_custom_field = column_get_custom_field_name($t_column);
        if ($t_custom_field !== null) {
            $t_ret .= excel_format_column_title(lang_get_defaulted($t_custom_field));
        } else {
            $t_column_title = column_get_title($t_column);
            $t_ret .= excel_format_column_title($t_column_title);
        }
    }
    $t_ret .= '</Row>';
    return $t_ret;
}
开发者ID:kaos,项目名称:mantisbt,代码行数:20,代码来源:excel_api.php

示例12: 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>';
    }
}
开发者ID:mikemol,项目名称:EmailReporting,代码行数:14,代码来源:config_api.php

示例13: custom_field_get_linked_ids

$t_custom_fields_found = false;
$t_related_custom_field_ids = custom_field_get_linked_ids($t_bug->project_id);
foreach ($t_related_custom_field_ids as $t_id) {
    $t_def = custom_field_get_definition($t_id);
    if (($t_def['display_update'] || $t_def['require_update']) && custom_field_has_write_access($t_id, $t_bug_id)) {
        $t_custom_fields_found = true;
        $t_required_class = $t_def['require_update'] ? ' class="required" ' : '';
        if ($t_def['type'] != CUSTOM_FIELD_TYPE_RADIO && $t_def['type'] != CUSTOM_FIELD_TYPE_CHECKBOX) {
            $t_label_for = ' for="custom_field_' . string_attribute($t_def['id']) . '" ';
        } else {
            $t_label_for = '';
        }
        echo '<tr>';
        echo '<td class="category">';
        echo '<label', $t_required_class, $t_label_for, '>';
        echo '<span>', string_display(lang_get_defaulted($t_def['name'])), '</span>';
        echo '</label>';
        echo '</td><td colspan="5">';
        print_custom_field_input($t_def, $t_bug_id);
        echo '</td></tr>';
    }
}
# foreach( $t_related_custom_field_ids as $t_id )
if ($t_custom_fields_found) {
    # spacer
    echo '<tr class="spacer"><td colspan="6"></td></tr>';
    echo '<tr class="hidden"></tr>';
}
# Bugnote Text Box
echo '<tr>';
echo '<th class="category"><label for="bugnote_text">' . lang_get('add_bugnote_title') . '</label></th>';
开发者ID:spring,项目名称:spring-website,代码行数:31,代码来源:bug_update_page.php

示例14: print_all_bug_action_option_list

function print_all_bug_action_option_list()
{
    $commands = array('MOVE' => lang_get('actiongroup_menu_move'), 'COPY' => lang_get('actiongroup_menu_copy'), 'ASSIGN' => lang_get('actiongroup_menu_assign'), 'CLOSE' => lang_get('actiongroup_menu_close'), 'DELETE' => lang_get('actiongroup_menu_delete'), 'RESOLVE' => lang_get('actiongroup_menu_resolve'), 'SET_STICKY' => lang_get('actiongroup_menu_set_sticky'), 'UP_PRIOR' => lang_get('actiongroup_menu_update_priority'), 'UP_STATUS' => lang_get('actiongroup_menu_update_status'), 'UP_CATEGORY' => lang_get('actiongroup_menu_update_category'), 'VIEW_STATUS' => lang_get('actiongroup_menu_update_view_status'), 'EXT_ADD_NOTE' => lang_get('actiongroup_menu_add_note'), 'EXT_ATTACH_TAGS' => lang_get('actiongroup_menu_attach_tags'));
    $t_project_id = helper_get_current_project();
    if (ALL_PROJECTS != $t_project_id) {
        $t_user_id = auth_get_current_user_id();
        if (access_has_project_level(config_get('update_bug_threshold'), $t_project_id)) {
            $commands['UP_FIXED_IN_VERSION'] = lang_get('actiongroup_menu_update_fixed_in_version');
        }
        if (access_has_project_level(config_get('roadmap_update_threshold'), $t_project_id)) {
            $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 user has not access right to modify the field, then there is no
            # point in showing it.
            if (!custom_field_has_write_access_to_project($t_custom_field_id, $t_project_id, $t_user_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']));
            $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'])) {
            $commands[$t_custom_group_action['action']] = lang_get_defaulted($t_custom_group_action['label']);
        } else {
            $commands[$t_custom_group_action['action']] = lang_get_defaulted($t_custom_group_action['action']);
        }
    }
    while (list($key, $val) = each($commands)) {
        print "<option value=\"" . $key . "\">" . $val . "</option>";
    }
}
开发者ID:jin255ff,项目名称:company_website,代码行数:38,代码来源:print_api.php

示例15: form_security_field

	<form method="post" action="manage_proj_custom_field_add_existing.php">
		<fieldset>
			<?php 
        echo form_security_field('manage_proj_custom_field_add_existing');
        ?>
			<input type="hidden" name="project_id" value="<?php 
        echo $f_project_id;
        ?>
" />
			<select name="field_id">
				<?php 
        $t_custom_fields = custom_field_get_ids();
        foreach ($t_custom_fields as $t_field_id) {
            if (!custom_field_is_linked($t_field_id, $f_project_id)) {
                $t_desc = custom_field_get_definition($t_field_id);
                echo "<option value=\"{$t_field_id}\">" . string_attribute(lang_get_defaulted($t_desc['name'])) . '</option>';
            }
        }
        ?>
			</select>
			<input type="submit" class="button" value="<?php 
        echo lang_get('add_existing_custom_field');
        ?>
" />
		</fieldset>
	</form><?php 
    }
    ?>
</div><?php 
}
event_signal('EVENT_MANAGE_PROJECT_PAGE', array($f_project_id));
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:31,代码来源:manage_proj_edit_page.php


注:本文中的lang_get_defaulted函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。