本文整理汇总了PHP中bug_get_field函数的典型用法代码示例。如果您正苦于以下问题:PHP bug_get_field函数的具体用法?PHP bug_get_field怎么用?PHP bug_get_field使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bug_get_field函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wiki_xwiki_get_page_id_for_issue
function wiki_xwiki_get_page_id_for_issue($p_issue_id)
{
$t_project_id = project_get_name(bug_get_field($p_issue_id, 'project_id'));
$c_issue_id = db_prepare_int($p_issue_id);
return $c_issue_id;
return $t_project_id . '/' . $c_issue_id;
}
示例2: kanban_ajax_button_bug_change_status
/**
* Print Change Status to: AJAXified button
* This code is similar to button_bug_change_status except that the
* button is AJAXified.
* Uses projax.php
*
* @param int $p_bug_id
* @param int $t_project_id
* @param int $t_user_id
* @return null
*/
function kanban_ajax_button_bug_change_status($p_bug_id, $t_project_id, $t_user_id)
{
global $g_projax;
$t_bug_project_id = bug_get_field($p_bug_id, 'project_id');
$t_bug_current_state = bug_get_field($p_bug_id, 'status');
$t_current_access = access_get_project_level($t_bug_project_id);
$t_enum_list = get_status_option_list($t_current_access, $t_bug_current_state, false, bug_get_field($p_bug_id, 'reporter_id') == auth_get_current_user_id() && ON == config_get('allow_reporter_close'), $t_bug_project_id);
if (count($t_enum_list) > 0) {
# resort the list into ascending order after noting the key from the first element (the default)
$t_default_arr = each($t_enum_list);
$t_default = $t_default_arr['key'];
ksort($t_enum_list);
reset($t_enum_list);
echo "<div id=\"ajax_statuschange\"><form method=\"post\" id=\"ajax_status_form\" action=\"xmlhttprequest.php\">";
# CSRF protection not required here - form does not result in modifications
echo "<input type=\"hidden\" name=\"project_id\" id=\"project_id\" value=\"{$t_project_id}\" />";
echo "<input type=\"hidden\" name=\"user_id\" id=\"user_id\" value=\"{$t_user_id}\" />";
echo "<input type=\"hidden\" name=\"entrypoint\" id=\"entrypoint\" value=\"bug_update_status\" />";
$t_button_text = lang_get('bug_status_to_button');
// AJAX button options
$options = array('url' => plugin_page('kanban_ajax_request'), 'with' => true, 'confirm' => lang_get('confirm_change_status'), 'success' => 'location.reload()', 'failure' => 'alert("Error: " ' + request . status + ')');
echo $g_projax->submit_to_remote('ajax_status', $t_button_text, $options);
echo " <select name=\"new_status\">";
# space at beginning of line is important
foreach ($t_enum_list as $key => $val) {
echo "<option value=\"{$key}\" ";
check_selected($key, $t_default);
echo ">{$val}</option>";
}
echo '</select>';
$t_bug_id = string_attribute($p_bug_id);
echo "<input type=\"hidden\" name=\"id\" value=\"{$t_bug_id}\" />\n";
echo "</form></div>\n";
}
}
示例3: bug_group_action_print_bug_list
/**
* Print the list of selected issues and the legend for the status colors.
*
* @param $p_bug_ids_array An array of issue ids.
*/
function bug_group_action_print_bug_list($p_bug_ids_array)
{
$t_legend_position = config_get('status_legend_position');
if (STATUS_LEGEND_POSITION_TOP == $t_legend_position) {
html_status_legend();
echo '<br />';
}
echo '<div align="center">';
echo '<table class="width75" cellspacing="1">';
echo '<tr class="row-1">';
echo '<td class="category" colspan="2">';
echo lang_get('actiongroup_bugs');
echo '</td>';
echo '</tr>';
$t_i = 1;
foreach ($p_bug_ids_array as $t_bug_id) {
$t_class = sprintf("row-%d", $t_i++ % 2 + 1);
echo sprintf("<tr bgcolor=\"%s\"> <td>%s</td> <td>%s</td> </tr>\n", get_status_color(bug_get_field($t_bug_id, 'status')), string_get_bug_view_link($t_bug_id), string_attribute(bug_get_field($t_bug_id, 'summary')));
}
echo '</table>';
echo '</form>';
echo '</div>';
if (STATUS_LEGEND_POSITION_BOTTOM == $t_legend_position) {
echo '<br />';
html_status_legend();
}
}
示例4: xmlhttprequest_issue_reporter_combobox
function xmlhttprequest_issue_reporter_combobox()
{
$f_bug_id = gpc_get_int('issue_id');
access_ensure_bug_level(config_get('update_bug_threshold'), $f_bug_id);
$t_reporter_id = bug_get_field($f_bug_id, 'reporter_id');
$t_project_id = bug_get_field($f_bug_id, 'project_id');
echo '<select name="reporter_id">';
print_reporter_option_list($t_reporter_id, $t_project_id);
echo '</select>';
}
示例5: wiki_dokuwiki_get_page_id_for_issue
function wiki_dokuwiki_get_page_id_for_issue($p_issue_id)
{
$c_issue_id = db_prepare_int($p_issue_id);
$t_project_id = bug_get_field($p_issue_id, 'project_id');
$t_project_name = project_get_name($t_project_id);
# create a namespace for the project to contain all project documentation.
# create within it a namespace for issues. This is to allow the creation of a _template.txt
# file to act as the template for issues belonging to this project.
return $t_project_name . ':issue:' . $c_issue_id;
}
示例6: get
public function get($request)
{
/*
* Returns a Response with a representation of the note list.
*
* @param $request - The Request we're responding to
*/
$this->bug_id = BugnoteList::get_bug_id_from_url($request->url);
# Access checking and note gathering is based on Mantis's
# email_build_visible_bug_data().
$project_id = bug_get_field($this->bug_id, 'project_id');
$user_id = auth_get_current_user_id();
$access_level = user_get_access_level($user_id, $project_id);
if (!access_has_bug_level(VIEWER, $this->bug_id)) {
throw new HTTPException(403, "Access denied");
}
$visible_notes = bugnote_get_all_visible_bugnotes($this->bug_id, $access_level, 'ASC', 0);
$visible_note_ids = array();
foreach ($visible_notes as $n) {
$visible_note_ids[] = (int) $n->id;
}
# Apply conditions and sorts
$sql_to_add = $this->_build_sql_from_querystring($request->query);
$note_ids = array();
if ($sql_to_add) {
$mantis_bugnote_table = config_get('mantis_bugnote_table');
$query = "SELECT n.id FROM {$mantis_bugnote_table} n {$sql_to_add};";
$result = db_query($query);
foreach ($result as $r) {
if (in_array((int) $r[0], $visible_note_ids)) {
$note_ids[] = (int) $r[0];
}
}
} else {
$note_ids = $visible_note_ids;
}
$this->rsrc_data = array();
$this->rsrc_data['results'] = array();
foreach ($note_ids as $n) {
$config = get_config();
$this->rsrc_data['results'][] = Bugnote::get_url_from_mantis_id($n);
}
$resp = new Response();
$resp->status = 200;
$resp->body = $this->_repr($request);
return $resp;
}
示例7: display_bug
function display_bug($p_event, $p_bug_id)
{
require_once 'Source.ViewAPI.php';
$t_project_id = bug_get_field($p_bug_id, 'project_id');
$t_view_threshold = config_get('plugin_Source_view_threshold');
if (!access_has_project_level($t_view_threshold, $t_project_id)) {
return;
}
$t_changesets = $this->changesets;
if (count($t_changesets) < 1) {
return;
}
collapse_open('Source');
?>
<br/>
<a name="changesets"/>
<table class="width100" cellspacing="1">
<tr>
<td class="form-title"><?php
collapse_icon('Source');
echo plugin_lang_get('related_changesets', 'Source');
?>
</td>
</tr>
<?php
Source_View_Changesets($t_changesets);
?>
</table>
<?php
collapse_closed('Source');
?>
<br/>
<table class="width100" cellspacing="1">
<tr>
<td class="form-title"><?php
collapse_icon('Source');
echo plugin_lang_get('related_changesets', 'Source');
?>
</td>
</tr>
</table>
<?php
collapse_end('Source');
}
示例8: custom_function_default_format_issue_summary
function custom_function_default_format_issue_summary($p_issue_id, $p_context = 0)
{
switch ($p_context) {
case SUMMARY_CAPTION:
$t_string = bug_format_id($p_issue_id) . ': ' . string_attribute(bug_get_field($p_issue_id, 'summary'));
break;
case SUMMARY_FIELD:
$t_string = bug_format_id($p_issue_id) . ': ' . string_attribute(bug_get_field($p_issue_id, 'summary'));
break;
case SUMMARY_EMAIL:
$t_string = bug_format_id($p_issue_id) . ': ' . string_attribute(bug_get_field($p_issue_id, 'summary'));
break;
default:
$t_string = string_attribute(bug_get_field($p_issue_id, 'summary'));
break;
}
return $t_string;
}
示例9: load
/**
* Load an existing TimecardBug object from the database.
* @param int Bug ID
* @return object TimecardBug object
*/
static function load($p_bug_id, $p_load_updates = true)
{
$t_estimate_table = plugin_table('estimate', 'Timecard');
$t_query = "SELECT * FROM {$t_estimate_table} WHERE bug_id=" . db_param();
$t_result = db_query_bound($t_query, array($p_bug_id));
if (db_num_rows($t_result) < 1) {
$t_project = TimecardProject::load(bug_get_field($p_bug_id, 'project_id'));
return new TimecardBug($p_bug_id, $t_project->timecard, -1);
}
$t_row = db_fetch_array($t_result);
$t_estimate = new TimecardBug($t_row['bug_id'], $t_row['timecard'], $t_row['estimate']);
$t_estimate->timestamp = $t_row['timestamp'];
$t_estimate->new = false;
if ($p_load_updates) {
$t_estimate->load_updates();
}
return $t_estimate;
}
示例10: print_tbody
/**
* Print table body
* @param $status_cols
*/
function print_tbody($status_cols)
{
$storyboard_db_api = new storyboard_db_api();
$project_spec_bug_ids = $storyboard_db_api->get_bugarray_by_project(helper_get_current_project());
$types = $storyboard_db_api->select_all_types();
echo '<tbody>';
foreach ($types as $type) {
echo '<tr>';
echo '<td class="category">' . $type[1] . '</td>';
foreach ($status_cols as $status_col) {
echo '<td class="story_baord">';
foreach ($project_spec_bug_ids as $project_spec_bug_id) {
$card = $storyboard_db_api->select_story_card($project_spec_bug_id);
if ($card[2] == $type[0]) {
$bug_status = bug_get_field($project_spec_bug_id, 'status');
if ($bug_status == $status_col) {
echo '<a href="' . string_get_bug_view_url($project_spec_bug_id) . '" class="rcv_tooltip">';
echo '<div class="story_card">';
echo string_display_line(bug_format_id($project_spec_bug_id));
echo '<span>';
print_story_card_title($project_spec_bug_id);
print_story_card_info('summary', bug_get_field($project_spec_bug_id, 'summary'), false);
print_story_card_info('description', bug_get_text_field($project_spec_bug_id, 'description'), false);
print_story_card_info('card_risk', $card[3], true);
print_story_card_info('card_story_pt', $card[4], true);
print_story_card_info('card_story_pt_post', $card[5], true);
print_story_card_info('card_acc_crit', $card[6], true);
echo '</span>';
echo '</div>';
echo '</a><br/><br/><br/>';
}
}
}
echo '</td>';
}
echo '</tr>';
}
echo '</tbody>';
}
示例11: timeline_get_affected_issues
/**
* Get list of affected issues between a given time period
* @param integer $p_start_time Timestamp representing start time of the period.
* @param integer $p_end_time Timestamp representing end time of the period.
* @return array
*/
function timeline_get_affected_issues($p_start_time, $p_end_time)
{
$t_query = 'SELECT DISTINCT(bug_id) from {bug_history} WHERE date_modified >= ' . db_param() . ' AND date_modified < ' . db_param();
$t_result = db_query($t_query, array($p_start_time, $p_end_time));
$t_current_project = helper_get_current_project();
$t_all_issue_ids = array();
while (($t_row = db_fetch_array($t_result)) !== false) {
$t_all_issue_ids[] = $t_row['bug_id'];
}
bug_cache_array_rows($t_all_issue_ids);
$t_issue_ids = array();
foreach ($t_all_issue_ids as $t_issue_id) {
if ($t_current_project != ALL_PROJECTS && $t_current_project != bug_get_field($t_issue_id, 'project_id')) {
continue;
}
if (!access_has_bug_level(config_get('view_bug_threshold'), $t_issue_id)) {
continue;
}
$t_issue_ids[] = $t_issue_id;
}
return $t_issue_ids;
}
示例12: trigger_error
trigger_error(ERROR_GENERIC, ERROR);
}
/** @todo we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) ); */
$t_form_var = "custom_field_{$f_custom_field_id}";
$t_custom_field_value = gpc_get_custom_field($t_form_var, $t_custom_field_def['type'], null);
custom_field_set_value($f_custom_field_id, $t_bug_id, $t_custom_field_value);
bug_update_date($t_bug_id);
helper_call_custom_function('issue_update_notify', array($t_bug_id));
break;
default:
trigger_error(ERROR_GENERIC, ERROR);
}
// Bug Action Event
event_signal('EVENT_BUG_ACTION', array($f_action, $t_bug_id));
}
form_security_purge($t_form_name);
$t_redirect_url = 'view_all_bug_page.php';
if (count($t_failed_ids) > 0) {
html_page_top();
echo '<div align="center"><br />';
echo '<table class="width75">';
foreach ($t_failed_ids as $t_id => $t_reason) {
printf("<tr><td width=\"50%%\">%s: %s</td><td>%s</td></tr>\n", string_get_bug_view_link($t_id), bug_get_field($t_id, 'summary'), $t_reason);
}
echo '</table><br />';
print_bracket_link($t_redirect_url, lang_get('proceed'));
echo '</div>';
html_page_bottom();
} else {
print_header_redirect($t_redirect_url);
}
示例13: config_get
?>
" size="4" />
<input type="text" name="amount" value="<?php
echo config_get('minimum_sponsorship_amount');
?>
" size="4" />
<input type="submit" class="button" name="sponsor" value="<?php
echo lang_get('sponsor_verb');
?>
" />
</form>
</td>
</tr>
<?php
}
$t_total_sponsorship = bug_get_field($f_bug_id, 'sponsorship_total');
if ($t_total_sponsorship > 0) {
?>
<tr class="row-2">
<th class="category" width="15%"><?php
echo lang_get('sponsors_list');
?>
</th>
<td>
<?php
echo sprintf(lang_get('total_sponsorship_amount'), sponsorship_format_amount($t_total_sponsorship));
if (access_has_bug_level(config_get('view_sponsorship_details_threshold'), $f_bug_id)) {
echo '<br /><br />';
$i = 0;
foreach ($t_sponsorship_ids as $id) {
$t_sponsorship = sponsorship_get($id);
示例14: summary_print_by_age
/**
* Print list of bugs opened from the longest time
* @return void
*/
function summary_print_by_age()
{
$t_project_id = helper_get_current_project();
$t_resolved = config_get('bug_resolved_status_threshold');
$t_specific_where = helper_project_specific_where($t_project_id);
if (' 1<>1' == $t_specific_where) {
return;
}
$t_query = 'SELECT * FROM {bug}
WHERE status < ' . db_param() . '
AND ' . $t_specific_where . '
ORDER BY date_submitted ASC, priority DESC';
$t_result = db_query($t_query, array($t_resolved));
$t_count = 0;
$t_private_bug_threshold = config_get('private_bug_threshold');
while ($t_row = db_fetch_array($t_result)) {
# as we select all from bug_table, inject into the cache.
bug_cache_database_result($t_row);
# Skip private bugs unless user has proper permissions
if (VS_PRIVATE == bug_get_field($t_row['id'], 'view_state') && false == access_has_bug_level($t_private_bug_threshold, $t_row['id'])) {
continue;
}
if ($t_count++ == 10) {
break;
}
$t_bugid = string_get_bug_view_link($t_row['id']);
$t_summary = string_display_line($t_row['summary']);
$t_days_open = intval((time() - $t_row['date_submitted']) / SECONDS_PER_DAY);
echo '<tr>' . "\n";
echo '<td class="small">' . $t_bugid . ' - ' . $t_summary . '</td><td class="right">' . $t_days_open . '</td>' . "\n";
echo '</tr>' . "\n";
}
}
示例15: html_buttons_view_bug_page
function html_buttons_view_bug_page($p_bug_id)
{
$t_resolved = config_get('bug_resolved_status_threshold');
$t_status = bug_get_field($p_bug_id, 'status');
$t_readonly = bug_is_readonly($p_bug_id);
print '<table><tr class="vcenter">';
if (!$t_readonly) {
# UPDATE button
echo '<td class="center">';
html_button_bug_update($p_bug_id);
echo '</td>';
# ASSIGN button
echo '<td class="center">';
html_button_bug_assign_to($p_bug_id);
echo '</td>';
# Change State button
echo '<td class="center">';
html_button_bug_change_status($p_bug_id);
echo '</td>';
}
# MONITOR/UNMONITOR button
echo '<td class="center">';
if (!current_user_is_anonymous()) {
if (user_is_monitoring_bug(auth_get_current_user_id(), $p_bug_id)) {
html_button_bug_unmonitor($p_bug_id);
} else {
html_button_bug_monitor($p_bug_id);
}
}
echo '</td>';
if (!$t_readonly) {
# CREATE CHILD button
echo '<td class="center">';
html_button_bug_create_child($p_bug_id);
echo '</td>';
}
if ($t_resolved <= $t_status) {
# resolved is not the same as readonly
print '<td class="center">';
# REOPEN button
html_button_bug_reopen($p_bug_id);
print '</td>';
}
if (!$t_readonly) {
# MOVE button
echo '<td class="center">';
html_button_bug_move($p_bug_id);
echo '</td>';
# DELETE button
echo '<td class="center">';
html_button_bug_delete($p_bug_id);
echo '</td>';
}
helper_call_custom_function('print_bug_view_page_custom_buttons', array($p_bug_id));
echo '</tr></table>';
}