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


PHP MantisEnum::getLabel方法代码示例

本文整理汇总了PHP中MantisEnum::getLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP MantisEnum::getLabel方法的具体用法?PHP MantisEnum::getLabel怎么用?PHP MantisEnum::getLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MantisEnum的用法示例。


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

示例1: print_status_option_list_plugin

function print_status_option_list_plugin($p_select_label, $p_current_value = 0, $p_allow_close = false, $p_project_id = ALL_PROJECTS)
{
    $t_current_auth = access_get_project_level($p_project_id);
    #Changement de la fonction de récupération des statuts
    $t_enum_list = get_status_option_list_plugin($t_current_auth, $p_current_value, true, $p_allow_close, $p_project_id);
    if (count($t_enum_list) > 1) {
        # resort the list into ascending order
        ksort($t_enum_list);
        reset($t_enum_list);
        echo '<select ', helper_get_tab_index(), ' name="' . $p_select_label . '">';
        foreach ($t_enum_list as $key => $val) {
            #On ne veut pas afficher la valeur @0@
            if ($val == '@0@') {
                continue;
            }
            echo '<option value="' . $key . '"';
            check_selected($key, $p_current_value, false);
            #fix 1.3.0
            echo '>' . $val . '</option>';
        }
        echo '</select>';
    } else {
        if (count($t_enum_list) == 1) {
            echo array_pop($t_enum_list);
        } else {
            echo MantisEnum::getLabel(lang_get('status_enum_string'), $p_current_value);
        }
    }
}
开发者ID:nenes25,项目名称:mantisbt_autochangestatus,代码行数:29,代码来源:functions.php

示例2: getLocalizedLabel

 /**
  * Gets the localized label corresponding to a value.  Note that this method
  * takes in the standard / localized enums so that if the value is in the localized
  * enum but not the standard one, then it returns not found.
  *
  * @param string $enumString The standard enum string.
  * @param string $localizedEnumString  The localized enum string.
  * @param integer $value  The value to lookup.
  *
  * @return the label or the decorated value to represent not found.
  */
 public static function getLocalizedLabel($enumString, $localizedEnumString, $value)
 {
     if (!MantisEnum::hasValue($enumString, $value)) {
         return MantisEnum::getLabelForUnknownValue($value);
     }
     return MantisEnum::getLabel($localizedEnumString, $value);
 }
开发者ID:kaos,项目名称:mantisbt,代码行数:18,代码来源:MantisEnum.class.php

示例3: workflow_parse

/**
 * Parse a workflow into a graph-like array of workflow transitions.
 * @param array The workflow enumeration to parse.
 * @return array The parsed workflow graph.
 */
function workflow_parse($p_enum_workflow)
{
    $t_status_arr = MantisEnum::getAssocArrayIndexedByValues(config_get('status_enum_string'));
    if (count($p_enum_workflow) == 0) {
        # workflow is not set, default it to all transitions
        foreach ($t_status_arr as $t_status => $t_label) {
            $t_temp_workflow = array();
            foreach ($t_status_arr as $t_next => $t_next_label) {
                if ($t_status != $t_next) {
                    $t_temp_workflow[] = $t_next . ':' . $t_next_label;
                }
            }
            $p_enum_workflow[$t_status] = implode(',', $t_temp_workflow);
        }
    }
    $t_entry = array();
    $t_exit = array();
    # prepopulate new bug state (bugs go from nothing to here)
    $t_submit_status_array = config_get('bug_submit_status');
    $t_new_label = MantisEnum::getLabel(lang_get('status_enum_string'), config_get('bug_submit_status'));
    if (is_array($t_submit_status_array)) {
        # @@@ (thraxisp) this is not implemented in bug_api.php
        foreach ($t_submit_status_array as $t_access => $t_status) {
            $t_entry[$t_status][0] = $t_new_label;
            $t_exit[0][$t_status] = $t_new_label;
        }
    } else {
        $t_status = $t_submit_status_array;
        $t_entry[$t_status][0] = $t_new_label;
        $t_exit[0][$t_status] = $t_new_label;
    }
    # add user defined arcs and implicit reopen arcs
    $t_reopen = config_get('bug_reopen_status');
    $t_reopen_label = MantisEnum::getLabel(lang_get('resolution_enum_string'), config_get('bug_reopen_resolution'));
    $t_resolved_status = config_get('bug_resolved_status_threshold');
    $t_default = array();
    foreach ($t_status_arr as $t_status => $t_status_label) {
        if (isset($p_enum_workflow[$t_status])) {
            $t_next_arr = MantisEnum::getAssocArrayIndexedByValues($p_enum_workflow[$t_status]);
            foreach ($t_next_arr as $t_next => $t_next_label) {
                if (!isset($t_default[$t_status])) {
                    $t_default[$t_status] = $t_next;
                }
                $t_exit[$t_status][$t_next] = '';
                $t_entry[$t_next][$t_status] = '';
            }
        } else {
            $t_exit[$t_status] = array();
        }
        if ($t_status >= $t_resolved_status) {
            $t_exit[$t_status][$t_reopen] = $t_reopen_label;
            $t_entry[$t_reopen][$t_status] = $t_reopen_label;
        }
        if (!isset($t_entry[$t_status])) {
            $t_entry[$t_status] = array();
        }
    }
    return array('entry' => $t_entry, 'exit' => $t_exit, 'default' => $t_default);
}
开发者ID:kaos,项目名称:mantisbt,代码行数:64,代码来源:workflow_api.php

示例4: get_status_color

/**
 * get the color string for the given status, user and project
 * @param int $p_status
 * @param int|null $p_user user id, defaults to null (all users)
 * @param int|null $p_project project id, defaults to null (all projects)
 * @return string
 */
function get_status_color($p_status, $p_user = null, $p_project = null)
{
    $t_status_label = MantisEnum::getLabel(config_get('status_enum_string', null, $p_user, $p_project), $p_status);
    $t_status_colors = config_get('status_colors', null, $p_user, $p_project);
    $t_color = '#ffffff';
    if (isset($t_status_colors[$t_status_label])) {
        $t_color = $t_status_colors[$t_status_label];
    }
    return $t_color;
}
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:17,代码来源:helper_api.php

示例5: workflow_parse

/**
 * Parse a workflow into a graph-like array of workflow transitions.
 * @param array $p_enum_workflow The workflow enumeration to parse.
 * @return array The parsed workflow graph.
 */
function workflow_parse(array $p_enum_workflow)
{
    $t_status_arr = MantisEnum::getAssocArrayIndexedByValues(config_get('status_enum_string'));
    # If workflow is not set, defaults to array(), which means that all transitions are valid
    if (!is_array($p_enum_workflow)) {
        $p_enum_workflow = array();
    }
    # If any status row is missing, it defaults to all transitions
    foreach ($t_status_arr as $t_status => $t_label) {
        if (!isset($p_enum_workflow[$t_status])) {
            $t_temp_workflow = array();
            foreach ($t_status_arr as $t_next => $t_next_label) {
                if ($t_status != $t_next) {
                    $t_temp_workflow[] = $t_next . ':' . $t_next_label;
                }
            }
            $p_enum_workflow[$t_status] = implode(',', $t_temp_workflow);
        }
    }
    $t_entry = array();
    $t_exit = array();
    # prepopulate new bug state (bugs go from nothing to here)
    $t_submit_status_array = config_get('bug_submit_status');
    $t_new_label = MantisEnum::getLabel(lang_get('status_enum_string'), config_get('bug_submit_status'));
    if (is_array($t_submit_status_array)) {
        # @@@ (thraxisp) this is not implemented in bug_api.php
        foreach ($t_submit_status_array as $t_access => $t_status) {
            $t_entry[$t_status][0] = $t_new_label;
            $t_exit[0][$t_status] = $t_new_label;
        }
    } else {
        $t_status = $t_submit_status_array;
        $t_entry[$t_status][0] = $t_new_label;
        $t_exit[0][$t_status] = $t_new_label;
    }
    # add user defined arcs
    $t_default = array();
    foreach ($t_status_arr as $t_status => $t_status_label) {
        $t_exit[$t_status] = array();
        if (isset($p_enum_workflow[$t_status])) {
            $t_next_arr = MantisEnum::getAssocArrayIndexedByValues($p_enum_workflow[$t_status]);
            foreach ($t_next_arr as $t_next => $t_next_label) {
                if (!isset($t_default[$t_status])) {
                    $t_default[$t_status] = $t_next;
                }
                $t_exit[$t_status][$t_next] = '';
                $t_entry[$t_next][$t_status] = '';
            }
        }
        if (!isset($t_entry[$t_status])) {
            $t_entry[$t_status] = array();
        }
    }
    return array('entry' => $t_entry, 'exit' => $t_exit, 'default' => $t_default);
}
开发者ID:spring,项目名称:spring-website,代码行数:60,代码来源:workflow_api.php

示例6: getLocalizedLabel

 /**
  * Gets the localized label corresponding to a value.  Note that this method
  * takes in the standard / localized enums so that if the value is in the localized
  * enum but not the standard one, then it returns not found.
  *
  * @param string  $p_enum_string           The standard enum string.
  * @param string  $p_localized_enum_string The localized enum string.
  * @param integer $p_value                 The value to lookup.
  *
  * @return string the label or the decorated value to represent not found.
  */
 public static function getLocalizedLabel($p_enum_string, $p_localized_enum_string, $p_value)
 {
     if (!MantisEnum::hasValue($p_enum_string, $p_value)) {
         return MantisEnum::getLabelForUnknownValue($p_value);
     }
     $t_assoc_array = MantisEnum::getAssocArrayIndexedByValues($p_localized_enum_string);
     if (isset($t_assoc_array[(int) $p_value])) {
         return $t_assoc_array[(int) $p_value];
     }
     return MantisEnum::getLabel($p_enum_string, $p_value);
 }
开发者ID:gtn,项目名称:mantisbt,代码行数:22,代码来源:MantisEnum.class.php

示例7: get_section_begin_apr

function get_section_begin_apr($p_section_name)
{
    $t_access_levels = MantisEnum::getValues(config_get('access_levels_enum_string'));
    $t_output = '<table class="width100">';
    $t_output .= '<tr><td class="form-title-caps" colspan="' . (count($t_access_levels) + 1) . '">' . $p_section_name . '</td></tr>' . "\n";
    $t_output .= '<tr><td class="form-title" width="40%">' . lang_get('perm_rpt_capability') . '</td>';
    foreach ($t_access_levels as $t_access_level) {
        $t_output .= '<td class="form-title" style="text-align:center">&#160;' . MantisEnum::getLabel(lang_get('access_levels_enum_string'), $t_access_level) . '&#160;</td>';
    }
    $t_output .= '</tr>' . "\n";
    return $t_output;
}
开发者ID:Tarendai,项目名称:spring-website,代码行数:12,代码来源:adm_permissions_report.php

示例8: get_capability_enum

/**
 * Get enumeration row
 * @param string  $p_caption           Caption.
 * @param string  $p_threshold         Threshold.
 * @param string  $p_enum              Enumeration.
 * @param boolean $p_all_projects_only All projects only.
 * @return void
 */
function get_capability_enum($p_caption, $p_threshold, $p_enum, $p_all_projects_only = false)
{
    global $g_user, $g_project_id, $t_show_submit, $g_access_levels;
    $t_file = config_get_global($p_threshold);
    $t_global = config_get($p_threshold, null, null, ALL_PROJECTS);
    $t_project = config_get($p_threshold);
    $t_can_change = access_has_project_level(config_get_access($p_threshold), $g_project_id, $g_user) && (ALL_PROJECTS == $g_project_id || !$p_all_projects_only);
    echo '<tr>' . "\n";
    echo "\t" . '<td>' . string_display($p_caption) . '</td>' . "\n";
    # Value
    $t_color = set_color($p_threshold, $t_file, $t_global, $t_project, $t_can_change);
    echo "\t" . '<td class="left" colspan="3"' . $t_color . '>';
    if ($t_can_change) {
        echo '<select name="flag_' . $p_threshold . '">';
        print_enum_string_option_list($p_enum, config_get($p_threshold));
        echo '</select>';
        $t_show_submit = true;
    } else {
        $t_value = MantisEnum::getLabel(lang_get($p_enum . '_enum_string'), config_get($p_threshold)) . '&#160;';
        echo $t_value;
    }
    echo '</td>' . "\n\t" . '<td colspan="' . (count($g_access_levels) - 3) . '"></td>' . "\n";
    print_who_can_change($p_threshold, $t_can_change);
    echo '</tr>' . "\n";
}
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:33,代码来源:manage_config_work_threshold_page.php

示例9: html_get_status_css_class

/**
 * get the css class name for the given status, user and project
 * @param int $p_status
 * @return string
 */
function html_get_status_css_class($p_status, $p_user = null, $p_project = null)
{
    return string_attribute(MantisEnum::getLabel(config_get('status_enum_string', null, $p_user, $p_project), $p_status) . '-color');
}
开发者ID:nextgens,项目名称:mantisbt,代码行数:9,代码来源:html_api.php

示例10: foreach

$i = 1;
#row class selector
$t_time_sum = 0;
foreach ($t_all_projects as $t_all_project) {
    $t_query = "SELECT * FROM {$t_bug_table}\n\t\t\tWHERE project_id=" . db_param();
    $t_result = db_query_bound($t_query, array($t_all_project));
    while ($t_row = db_fetch_array($t_result)) {
        $t_timecard = TimecardBug::load($t_row['id']);
        $t_timecard->summary = $t_row['summary'];
        $t_timecard->assigned = user_get_name($t_row['handler_id']);
        $t_timecard->calculate();
        if ('user0' == $t_timecard->assigned) {
            # When bug not assigned don't print user0
            $t_timecard->assigned = '';
        }
        $t_timecard->status = MantisEnum::getLabel(config_get('status_enum_string'), $t_row['status']);
        $t_timecard->diff = time_get_diff($t_timecard->timestamp);
        if ($t_timecard->estimate < 0) {
            $t_timecard->estimate = plugin_lang_get('estimate_zero');
            $row_class = 'negative';
        } else {
            $t_time_sum += $t_timecard->estimate;
            $row_class = "row-{$i}";
        }
        echo "<tr class='{$row_class}'>\n\t\t\t\t<td>", print_bug_link($t_timecard->bug_id), '</td>' . '
				<td class="max_width">' . $t_timecard->summary . '</td>
				<td>' . $t_timecard->status . '</td>
				<td>' . $t_timecard->assigned . '</td>';
        if (plugin_config_get('use_timecard')) {
            echo '<td class="center">' . $t_timecard->timecard . '</td>';
        }
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:31,代码来源:view_timecard.php

示例11: update


//.........这里部分代码省略.........
     # Update all fields
     # Ignore date_submitted and last_updated since they are pulled out
     #  as unix timestamps which could confuse the history log and they
     #  shouldn't get updated like this anyway.  If you really need to change
     #  them use bug_set_field()
     $query = "UPDATE {$t_bug_table}\n\t\t\t\t\tSET project_id=" . db_param() . ', reporter_id=' . db_param() . ",\n\t\t\t\t\t\thandler_id=" . db_param() . ', duplicate_id=' . db_param() . ",\n\t\t\t\t\t\tpriority=" . db_param() . ', severity=' . db_param() . ",\n\t\t\t\t\t\treproducibility=" . db_param() . ', status=' . db_param() . ",\n\t\t\t\t\t\tresolution=" . db_param() . ', projection=' . db_param() . ",\n\t\t\t\t\t\tcategory_id=" . db_param() . ', eta=' . db_param() . ",\n\t\t\t\t\t\tos=" . db_param() . ', os_build=' . db_param() . ",\n\t\t\t\t\t\tplatform=" . db_param() . ', version=' . db_param() . ",\n\t\t\t\t\t\tbuild=" . db_param() . ', fixed_in_version=' . db_param() . ',';
     $t_fields = array($this->project_id, $this->reporter_id, $this->handler_id, $this->duplicate_id, $this->priority, $this->severity, $this->reproducibility, $this->status, $this->resolution, $this->projection, $this->category_id, $this->eta, $this->os, $this->os_build, $this->platform, $this->version, $this->build, $this->fixed_in_version);
     $t_roadmap_updated = false;
     if (access_has_project_level(config_get('roadmap_update_threshold'))) {
         $query .= "\n\t\t\t\t\t\ttarget_version=" . db_param() . ",";
         $t_fields[] = $this->target_version;
         $t_roadmap_updated = true;
     }
     $query .= "\n\t\t\t\t\t\tview_state=" . db_param() . ",\n\t\t\t\t\t\tsummary=" . db_param() . ",\n\t\t\t\t\t\tsponsorship_total=" . db_param() . ",\n\t\t\t\t\t\tsticky=" . db_param() . ",\n\t\t\t\t\t\tdue_date=" . db_param() . "\n\t\t\t\t\tWHERE id=" . db_param();
     $t_fields[] = $this->view_state;
     $t_fields[] = $this->summary;
     $t_fields[] = $this->sponsorship_total;
     $t_fields[] = (bool) $this->sticky;
     $t_fields[] = $this->due_date;
     $t_fields[] = $this->id;
     db_query_bound($query, $t_fields);
     bug_clear_cache($this->id);
     # log changes
     history_log_event_direct($c_bug_id, 'project_id', $t_old_data->project_id, $this->project_id);
     history_log_event_direct($c_bug_id, 'reporter_id', $t_old_data->reporter_id, $this->reporter_id);
     history_log_event_direct($c_bug_id, 'handler_id', $t_old_data->handler_id, $this->handler_id);
     history_log_event_direct($c_bug_id, 'priority', $t_old_data->priority, $this->priority);
     history_log_event_direct($c_bug_id, 'severity', $t_old_data->severity, $this->severity);
     history_log_event_direct($c_bug_id, 'reproducibility', $t_old_data->reproducibility, $this->reproducibility);
     history_log_event_direct($c_bug_id, 'status', $t_old_data->status, $this->status);
     history_log_event_direct($c_bug_id, 'resolution', $t_old_data->resolution, $this->resolution);
     history_log_event_direct($c_bug_id, 'projection', $t_old_data->projection, $this->projection);
     history_log_event_direct($c_bug_id, 'category', category_full_name($t_old_data->category_id, false), category_full_name($this->category_id, false));
     history_log_event_direct($c_bug_id, 'eta', $t_old_data->eta, $this->eta);
     history_log_event_direct($c_bug_id, 'os', $t_old_data->os, $this->os);
     history_log_event_direct($c_bug_id, 'os_build', $t_old_data->os_build, $this->os_build);
     history_log_event_direct($c_bug_id, 'platform', $t_old_data->platform, $this->platform);
     history_log_event_direct($c_bug_id, 'version', $t_old_data->version, $this->version);
     history_log_event_direct($c_bug_id, 'build', $t_old_data->build, $this->build);
     history_log_event_direct($c_bug_id, 'fixed_in_version', $t_old_data->fixed_in_version, $this->fixed_in_version);
     if ($t_roadmap_updated) {
         history_log_event_direct($c_bug_id, 'target_version', $t_old_data->target_version, $this->target_version);
     }
     history_log_event_direct($c_bug_id, 'view_state', $t_old_data->view_state, $this->view_state);
     history_log_event_direct($c_bug_id, 'summary', $t_old_data->summary, $this->summary);
     history_log_event_direct($c_bug_id, 'sponsorship_total', $t_old_data->sponsorship_total, $this->sponsorship_total);
     history_log_event_direct($c_bug_id, 'sticky', $t_old_data->sticky, $this->sticky);
     history_log_event_direct($c_bug_id, 'due_date', $t_old_data->due_date != date_get_null() ? $t_old_data->due_date : null, $this->due_date != date_get_null() ? $this->due_date : null);
     # Update extended info if requested
     if ($p_update_extended) {
         $t_bug_text_table = db_get_table('mantis_bug_text_table');
         $t_bug_text_id = bug_get_field($c_bug_id, 'bug_text_id');
         $query = "UPDATE {$t_bug_text_table}\n\t\t\t\t\t\t\tSET description=" . db_param() . ",\n\t\t\t\t\t\t\t\tsteps_to_reproduce=" . db_param() . ",\n\t\t\t\t\t\t\t\tadditional_information=" . db_param() . "\n\t\t\t\t\t\t\tWHERE id=" . db_param();
         db_query_bound($query, array($this->description, $this->steps_to_reproduce, $this->additional_information, $t_bug_text_id));
         bug_text_clear_cache($c_bug_id);
         $t_current_user = auth_get_current_user_id();
         if ($t_old_data->description != $this->description) {
             if (bug_revision_count($c_bug_id, REV_DESCRIPTION) < 1) {
                 $t_revision_id = bug_revision_add($c_bug_id, $t_old_data->reporter_id, REV_DESCRIPTION, $t_old_data->description, 0, $t_old_data->date_submitted);
             }
             $t_revision_id = bug_revision_add($c_bug_id, $t_current_user, REV_DESCRIPTION, $this->description);
             history_log_event_special($c_bug_id, DESCRIPTION_UPDATED, $t_revision_id);
         }
         if ($t_old_data->steps_to_reproduce != $this->steps_to_reproduce) {
             if (bug_revision_count($c_bug_id, REV_STEPS_TO_REPRODUCE) < 1) {
                 $t_revision_id = bug_revision_add($c_bug_id, $t_old_data->reporter_id, REV_STEPS_TO_REPRODUCE, $t_old_data->steps_to_reproduce, 0, $t_old_data->date_submitted);
             }
             $t_revision_id = bug_revision_add($c_bug_id, $t_current_user, REV_STEPS_TO_REPRODUCE, $this->steps_to_reproduce);
             history_log_event_special($c_bug_id, STEP_TO_REPRODUCE_UPDATED, $t_revision_id);
         }
         if ($t_old_data->additional_information != $this->additional_information) {
             if (bug_revision_count($c_bug_id, REV_ADDITIONAL_INFO) < 1) {
                 $t_revision_id = bug_revision_add($c_bug_id, $t_old_data->reporter_id, REV_ADDITIONAL_INFO, $t_old_data->additional_information, 0, $t_old_data->date_submitted);
             }
             $t_revision_id = bug_revision_add($c_bug_id, $t_current_user, REV_ADDITIONAL_INFO, $this->additional_information);
             history_log_event_special($c_bug_id, ADDITIONAL_INFO_UPDATED, $t_revision_id);
         }
     }
     # Update the last update date
     bug_update_date($c_bug_id);
     # allow bypass if user is sending mail separately
     if (false == $p_bypass_mail) {
         # bug assigned
         if ($t_old_data->handler_id != $this->handler_id) {
             email_generic($c_bug_id, 'owner', 'email_notification_title_for_action_bug_assigned');
             return true;
         }
         # status changed
         if ($t_old_data->status != $this->status) {
             $t_status = MantisEnum::getLabel(config_get('status_enum_string'), $this->status);
             $t_status = str_replace(' ', '_', $t_status);
             email_generic($c_bug_id, $t_status, 'email_notification_title_for_status_bug_' . $t_status);
             return true;
         }
         # @todo handle priority change if it requires special handling
         # generic update notification
         email_generic($c_bug_id, 'updated', 'email_notification_title_for_action_bug_updated');
     }
     return true;
 }
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:101,代码来源:bug_api.php

示例12: email_resolved

if ($t_resolve_issue) {
    email_resolved($f_bug_id);
    email_relationship_child_resolved($f_bug_id);
} else {
    if ($t_close_issue) {
        email_close($f_bug_id);
        email_relationship_child_closed($f_bug_id);
    } else {
        if ($t_reopen_issue) {
            email_reopen($f_bug_id);
        } else {
            if ($t_existing_bug->handler_id === NO_USER && $t_updated_bug->handler_id !== NO_USER) {
                email_assign($f_bug_id);
            } else {
                if ($t_existing_bug->status !== $t_updated_bug->status) {
                    $t_new_status_label = MantisEnum::getLabel(config_get('status_enum_string'), $t_updated_bug->status);
                    $t_new_status_label = str_replace(' ', '_', $t_new_status_label);
                    email_generic($f_bug_id, $t_new_status_label, 'email_notification_title_for_status_bug_' . $t_new_status_label);
                } else {
                    email_generic($f_bug_id, 'updated', 'email_notification_title_for_action_bug_updated');
                }
            }
        }
    }
}
# Twitter notification of bug update.
if ($t_resolve_issue && $t_updated_bug->resolution >= config_get('bug_resolution_fixed_threshold') && $t_updated_bug->resolution < config_get('bug_resolution_not_fixed_threshold')) {
    twitter_issue_resolved($f_bug_id);
}
form_security_purge('bug_update');
print_successful_redirect_to_bug($f_bug_id);
开发者ID:Kirill,项目名称:mantisbt,代码行数:31,代码来源:bug_update.php

示例13: html_get_status_css_class

/**
 * get the css class name for the given status
 * @param int $p_status
 * @return string
 */
function html_get_status_css_class( $p_status ) {
	return string_attribute( MantisEnum::getLabel( config_get('status_enum_string' ), $p_status ) . '-color' );
}
开发者ID:rombert,项目名称:mantisbt,代码行数:8,代码来源:html_api.php

示例14: get_status_color

/**
 * get the color string for the given status
 * @param int $p_status
 * @return string
 */
function get_status_color($p_status)
{
    $t_status_label = MantisEnum::getLabel(config_get('status_enum_string'), $p_status);
    $t_status_colors = config_get('status_colors');
    $t_color = '#ffffff';
    if (isset($t_status_colors[$t_status_label])) {
        $t_color = $t_status_colors[$t_status_label];
    }
    return $t_color;
}
开发者ID:rasperen,项目名称:mantisbt,代码行数:15,代码来源:helper_api.php

示例15: get_capability_enum

function get_capability_enum($p_caption, $p_threshold, $p_enum, $p_all_projects_only = false)
{
    global $t_user, $t_project_id, $t_show_submit, $t_access_levels, $t_colour_project, $t_colour_global;
    $t_file = config_get_global($p_threshold);
    $t_global = config_get($p_threshold, null, null, ALL_PROJECTS);
    $t_project = config_get($p_threshold);
    $t_can_change = access_has_project_level(config_get_access($p_threshold), $t_project_id, $t_user) && (ALL_PROJECTS == $t_project_id || !$p_all_projects_only);
    $t_colour = '';
    if ($t_global != $t_file) {
        $t_colour = ' bgcolor="' . $t_colour_global . '" ';
        # all projects override
        if ($t_can_change) {
            set_overrides($p_threshold);
        }
    }
    if ($t_project != $t_global) {
        $t_colour = ' bgcolor="' . $t_colour_project . '" ';
        # project overrides
        if ($t_can_change) {
            set_overrides($p_threshold);
        }
    }
    echo '<tr ' . helper_alternate_class() . '><td>' . string_display($p_caption) . '</td>';
    if ($t_can_change) {
        echo '<td class="left" colspan="3"' . $t_colour . '><select name="flag_' . $p_threshold . '">';
        print_enum_string_option_list($p_enum, config_get($p_threshold));
        echo '</select></td><td colspan="' . (count($t_access_levels) - 3) . '"></td>';
        $t_show_submit = true;
    } else {
        $t_value = MantisEnum::getLabel(lang_get($p_enum . '_enum_string'), config_get($p_threshold)) . '&nbsp;';
        echo '<td class="left" colspan="3"' . $t_colour . '>' . $t_value . '</td><td colspan="' . (count($t_access_levels) - 3) . '"></td>';
    }
    if ($t_can_change) {
        echo '<td><select name="access_' . $p_threshold . '">';
        print_enum_string_option_list('access_levels', config_get_access($p_threshold));
        echo '</select> </td>';
    } else {
        echo '<td>' . MantisEnum::getLabel(lang_get('access_levels_enum_string'), config_get_access($p_threshold)) . '&nbsp;</td>';
    }
    echo '</tr>' . "\n";
}
开发者ID:kaos,项目名称:mantisbt,代码行数:41,代码来源:manage_config_work_threshold_page.php


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