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


PHP bugnote_format_id函数代码示例

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


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

示例1: config_get

$t_normal_date_format = config_get('normal_date_format');
$t_total_time = 0;
$t_bugnote_user_edit_threshold = config_get('bugnote_user_edit_threshold');
$t_bugnote_user_delete_threshold = config_get('bugnote_user_delete_threshold');
$t_bugnote_user_change_view_state_threshold = config_get('bugnote_user_change_view_state_threshold');
$t_can_edit_all_bugnotes = access_has_bug_level(config_get('update_bugnote_threshold'), $f_bug_id);
$t_can_delete_all_bugnotes = access_has_bug_level(config_get('delete_bugnote_threshold'), $f_bug_id);
$t_can_change_view_state_all_bugnotes = $t_can_edit_all_bugnotes && access_has_bug_level(config_get('change_view_status_threshold'), $f_bug_id);
for ($i = 0; $i < $num_notes; $i++) {
    $t_bugnote = $t_bugnotes[$i];
    if ($t_bugnote->date_submitted != $t_bugnote->last_modified) {
        $t_bugnote_modified = true;
    } else {
        $t_bugnote_modified = false;
    }
    $t_bugnote_id_formatted = bugnote_format_id($t_bugnote->id);
    if (0 != $t_bugnote->time_tracking) {
        $t_time_tracking_hhmm = db_minutes_to_hhmm($t_bugnote->time_tracking);
        $t_bugnote->note_type = TIME_TRACKING;
        // for older entries that didn't set the type @@@PLR FIXME
        $t_total_time += $t_bugnote->time_tracking;
    } else {
        $t_time_tracking_hhmm = '';
    }
    if (VS_PRIVATE == $t_bugnote->view_state) {
        $t_bugnote_css = 'bugnote-private';
    } else {
        $t_bugnote_css = 'bugnote-public';
    }
    if (TIME_TRACKING == $t_bugnote->note_type) {
        $t_bugnote_css .= ' bugnote-time-tracking';
开发者ID:nextgens,项目名称:mantisbt,代码行数:31,代码来源:bugnote_view_inc.php

示例2: bug_revision_drop

/**
 * Remove one or more bug revisions from the bug history.
 * @param int $p_revision_id Revision ID, or array of revision IDs
 * @return null
 */
function bug_revision_drop( $p_revision_id ) {
	$t_bug_rev_table = db_get_table( 'bug_revision' );

	if ( is_array( $p_revision_id ) ) {
		$t_revisions = array();
		$t_first = true;
		$t_query = "DELETE FROM $t_bug_rev_table WHERE id IN ( ";

		# TODO: Fetch bug revisions in one query (and cache them)
		foreach( $p_revision_id as $t_rev_id ) {
			$t_query .= ( $t_first ? db_param() : ', ' . db_param() );
			$t_revisions[$t_rev_id] = bug_revision_get( $t_rev_id );
		}

		$t_query .= ' )';
		db_query_bound( $t_query, $p_revision_id );
		foreach( $p_revision_id as $t_rev_id ) {
			if ( $t_revisions[$t_rev_id]['type'] == REV_BUGNOTE ) {
				history_log_event_special( $t_revisions[$t_rev_id]['bug_id'], BUGNOTE_REVISION_DROPPED, bugnote_format_id( $t_rev_id ), $t_revisions[$t_rev_id]['bugnote_id'] );
			} else {
				history_log_event_special( $t_revisions[$t_rev_id]['bug_id'], BUG_REVISION_DROPPED, bugnote_format_id( $t_rev_id ), $t_revisions[$t_rev_id]['type'] );
			}
		}
	} else {
		$t_revision = bug_revision_get( $p_revision_id );
		$t_query = "DELETE FROM $t_bug_rev_table WHERE id=" . db_param();
		db_query_bound( $t_query, array( $p_revision_id ) );
		if ( $t_revision['type'] == REV_BUGNOTE ) {
			history_log_event_special( $t_revision['bug_id'], BUGNOTE_REVISION_DROPPED, bugnote_format_id( $p_revision_id ), $t_revision['bugnote_id'] );
		} else {
			history_log_event_special( $t_revision['bug_id'], BUG_REVISION_DROPPED, bugnote_format_id( $p_revision_id ), $t_revision['type'] );
		}
	}
}
开发者ID:rombert,项目名称:mantisbt,代码行数:39,代码来源:bug_revision_api.php

示例3: db_result

        $v3_note = db_result($result2, 0, 0);
        $v3_bugnote_text_id = db_result($result2, 0, 1);
        $v3_note = string_display_links($v3_note);
        ?>
<tr>
	<td class="print-spacer" colspan="2">
		<hr size="1" />
	</td>
</tr>
<tr>
	<td class="nopad" valign="top" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(<?php 
        echo bugnote_format_id($v3_id);
        ?>
)
			</td>
		</tr>
		<tr>
			<td class="print">
				<?php 
        echo print_user($v3_reporter_id);
        ?>
&nbsp;&nbsp;&nbsp;
			</td>
		</tr>
		<tr>
			<td class="print">
				<?php 
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:print_bugnote_inc.php

示例4: db_result

        $t_note = db_result($t_result2, 0, 0);
        $t_bugnote_text_id = db_result($t_result2, 0, 1);
        $t_note = string_display_links($t_note);
        ?>
	<tr>
		<td class="print-spacer" colspan="2">
			<hr />
		</td>
	</tr>
	<tr>
		<td class="nopad" width="20%">
			<table class="hide" cellspacing="1">
				<tr>
					<td class="print">
						(<?php 
        echo bugnote_format_id($t_row['id']);
        ?>
)
					</td>
				</tr>
				<tr>
					<td class="print">
						<?php 
        print_user($t_row['reporter_id']);
        ?>
&#160;&#160;&#160;
					</td>
				</tr>
				<tr>
					<td class="print">
						<?php 
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:31,代码来源:print_bugnote_inc.php

示例5: string_get_bugnote_view_link

/**
 * return an href anchor that links to a bug VIEW page for the given bug
 * account for the user preference and site override
 * @param integer $p_bug_id      A bug identifier.
 * @param integer $p_bugnote_id  A bugnote identifier.
 * @param integer $p_user_id     A valid user identifier.
 * @param boolean $p_detail_info Whether to include more detailed information (e.g. title attribute / project) in the returned string.
 * @param boolean $p_fqdn        Whether to return an absolute or relative link.
 * @return string
 */
function string_get_bugnote_view_link($p_bug_id, $p_bugnote_id, $p_user_id = null, $p_detail_info = true, $p_fqdn = false)
{
    $t_bug_id = (int) $p_bug_id;
    if (bug_exists($t_bug_id) && bugnote_exists($p_bugnote_id)) {
        $t_link = '<a href="';
        if ($p_fqdn) {
            $t_link .= config_get_global('path');
        } else {
            $t_link .= config_get_global('short_path');
        }
        $t_link .= string_get_bugnote_view_url($p_bug_id, $p_bugnote_id, $p_user_id) . '"';
        if ($p_detail_info) {
            $t_reporter = string_attribute(user_get_name(bugnote_get_field($p_bugnote_id, 'reporter_id')));
            $t_update_date = string_attribute(date(config_get('normal_date_format'), bugnote_get_field($p_bugnote_id, 'last_modified')));
            $t_link .= ' title="' . bug_format_id($t_bug_id) . ': [' . $t_update_date . '] ' . $t_reporter . '"';
        }
        $t_link .= '>' . bug_format_id($t_bug_id) . ':' . bugnote_format_id($p_bugnote_id) . '</a>';
    } else {
        $t_link = bugnote_format_id($t_bug_id) . ':' . bugnote_format_id($p_bugnote_id);
    }
    return $t_link;
}
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:32,代码来源:string_api.php

示例6: bugnote_set_view_state

/**
 * Set the view state of the bugnote
 * @param int $p_bugnote_id bugnote id
 * @param bool $p_private
 * @return bool
 * @access public
 */
function bugnote_set_view_state($p_bugnote_id, $p_private)
{
    $c_bugnote_id = db_prepare_int($p_bugnote_id);
    $t_bug_id = bugnote_get_field($p_bugnote_id, 'bug_id');
    if ($p_private) {
        $t_view_state = VS_PRIVATE;
    } else {
        $t_view_state = VS_PUBLIC;
    }
    $t_bugnote_table = db_get_table('mantis_bugnote_table');
    $query = "UPDATE {$t_bugnote_table}\n\t\t          \tSET view_state=" . db_param() . "\n\t\t          \tWHERE id=" . db_param();
    db_query_bound($query, array($t_view_state, $c_bugnote_id));
    history_log_event_special($t_bug_id, BUGNOTE_STATE_CHANGED, $t_view_state, bugnote_format_id($p_bugnote_id));
    return true;
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:22,代码来源:bugnote_api.php

示例7: bugnote_set_view_state

/**
 * Set the view state of the bugnote
 * @param integer $p_bugnote_id A bugnote identifier.
 * @param boolean $p_private    Whether bugnote should be set to private status.
 * @return boolean
 * @access public
 */
function bugnote_set_view_state($p_bugnote_id, $p_private)
{
    $t_bug_id = bugnote_get_field($p_bugnote_id, 'bug_id');
    if ($p_private) {
        $t_view_state = VS_PRIVATE;
    } else {
        $t_view_state = VS_PUBLIC;
    }
    $t_query = 'UPDATE {bugnote} SET view_state=' . db_param() . ' WHERE id=' . db_param();
    db_query($t_query, array($t_view_state, $p_bugnote_id));
    history_log_event_special($t_bug_id, BUGNOTE_STATE_CHANGED, $t_view_state, bugnote_format_id($p_bugnote_id));
    return true;
}
开发者ID:spidgorny,项目名称:mantisbt,代码行数:20,代码来源:bugnote_api.php

示例8: date

                $t_last_modified = date($t_date_format, $t_bugnote->last_modified);
                # grab the bugnote text and id and prefix with v3_
                $t_note = string_display_links($t_bugnote->note);
                ?>
<tr>
	<td class="print-spacer" colspan="2">
		<hr />
	</td>
</tr>
<tr>
	<td class="nopad" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(<?php 
                echo bugnote_format_id($t_bugnote->id);
                ?>
)
			</td>
		</tr>
		<tr>
			<td class="print">
				<?php 
                print_user($t_bugnote->reporter_id);
                ?>
&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				<?php 
开发者ID:spring,项目名称:spring-website,代码行数:31,代码来源:print_all_bug_page_word.php

示例9: gen_del_bugnote_msg

/**
 * Gen delete bugnote message.
 */
function gen_del_bugnote_msg($user_id, $bug_id, $bugnote_id)
{
    $send_msg = plugin_lang_get('msg_call') . ' ' . get_username($user_id) . '! ' . plugin_lang_get('msg_action_bugnote_del') . "\n" . plugin_lang_get('msg_bug_id') . ' ' . bug_format_id($bug_id, 'category_id') . "\n" . plugin_lang_get('msg_proj_id') . ' ' . project_get_name(bug_get_field($bug_id, 'project_id')) . "\n" . plugin_lang_get('msg_state') . ' ' . get_enum_element('status', bug_get_field($bug_id, 'status')) . "\n" . plugin_lang_get('msg_header') . ' ' . bug_get_field($bug_id, 'summary') . "\n" . plugin_lang_get('separator') . "\n" . plugin_lang_get('msg_note_id') . bugnote_format_id($bugnote_id) . "\n" . plugin_lang_get('msg_initiator') . ' ' . get_auth_username() . "\n" . plugin_lang_get('separator') . "\n" . plugin_lang_get('msg_link_bug') . ' ' . get_bug_link($bug_id);
    return $send_msg;
}
开发者ID:JeromyK,项目名称:jabber-notify,代码行数:8,代码来源:JabberNotifierSystem_API.php

示例10: db_fetch_array

        $row = db_fetch_array($result);
        extract($row, EXTR_PREFIX_ALL, 'v3');
        if (db_unixtimestamp($v3_date_submitted) != db_unixtimestamp($v3_last_modified)) {
            $t_bugnote_modified = true;
        } else {
            $t_bugnote_modified = false;
        }
        $v3_date_submitted = date(config_get('normal_date_format'), db_unixtimestamp($v3_date_submitted));
        $v3_last_modified = date(config_get('normal_date_format'), db_unixtimestamp($v3_last_modified));
        # grab the bugnote text and id and prefix with v3_
        $query = "SELECT note\n\t\t\t\tFROM {$t_bugnote_text_table}\n\t\t\t\tWHERE id='{$v3_bugnote_text_id}'";
        $result2 = db_query($query);
        $row = db_fetch_array($result2);
        $v3_note = $row['note'];
        $v3_note = string_display_links($v3_note);
        $t_bugnote_id_formatted = bugnote_format_id($v3_id);
        if (VS_PRIVATE == $v3_view_state) {
            $t_bugnote_css = 'bugnote-private';
            $t_bugnote_note_css = 'bugnote-note-private';
        } else {
            $t_bugnote_css = 'bugnote-public';
            $t_bugnote_note_css = 'bugnote-note-public';
        }
        ?>
<tr class="bugnote" name="<?php 
        echo $v3_id;
        ?>
" id="<?php 
        echo $v3_id;
        ?>
">
开发者ID:centaurustech,项目名称:BenFund,代码行数:31,代码来源:bugnote_view_inc.php

示例11: bugnote_set_view_state

function bugnote_set_view_state($p_bugnote_id, $p_private)
{
    $c_bugnote_id = db_prepare_int($p_bugnote_id);
    $t_bug_id = bugnote_get_field($p_bugnote_id, 'bug_id');
    if ($p_private) {
        $t_view_state = VS_PRIVATE;
    } else {
        $t_view_state = VS_PUBLIC;
    }
    $t_bugnote_table = config_get('mantis_bugnote_table');
    # update view_state
    $query = "UPDATE {$t_bugnote_table}\r\n\t\t          \tSET view_state='{$t_view_state}'\r\n\t\t          \tWHERE id='{$c_bugnote_id}'";
    db_query($query);
    history_log_event_special($t_bug_id, BUGNOTE_STATE_CHANGED, bugnote_format_id($t_view_state), $p_bugnote_id);
    return true;
}
开发者ID:amjadtbssm,项目名称:website,代码行数:16,代码来源:bugnote_api.php

示例12: db_result

		$v3_note = db_result( $result2, 0, 0 );
		$v3_bugnote_text_id = db_result( $result2, 0, 1 );

		$v3_note = string_display_links( $v3_note );
?>
<tr>
	<td class="print-spacer" colspan="2">
		<hr />
	</td>
</tr>
<tr>
	<td class="nopad" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(<?php echo bugnote_format_id( $v3_id ) ?>)
			</td>
		</tr>
		<tr>
			<td class="print">
				<?php
				echo print_user( $v3_reporter_id );
				?>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				<?php echo $v3_date_submitted ?>&#160;&#160;&#160;
				<?php if ( $v3_date_submitted != $v3_last_modified ) {
					echo '<br />(' . lang_get( 'last_edited') . lang_get( 'word_separator' ) . $v3_last_modified . ')';
				} ?>
开发者ID:rombert,项目名称:mantisbt,代码行数:31,代码来源:print_bugnote_inc.php

示例13: bugnote_format_id

        } else {
            $t_time = '';
        }
        ?>
	<tr>
		<td class="print-spacer" colspan="2">
			<hr />
		</td>
	</tr>
	<tr>
		<td class="nopad" width="20%">
			<table class="hide" cellspacing="1">
				<tr>
					<td class="print">
						(<?php 
        echo bugnote_format_id($t_row->id);
        ?>
)
					</td>
				</tr>
				<tr>
					<td class="print">
						<?php 
        print_user($t_row->reporter_id);
        ?>
&#160;&#160;&#160;
					</td>
				</tr>
				<tr>
					<td class="print">
						<?php 
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:print_bugnote_inc.php

示例14: date

			$t_last_modified = date( $t_date_format, $t_bugnote->last_modified );

			# grab the bugnote text and id and prefix with v3_
			$t_note = string_display_links( $t_bugnote->note );
	?>
<tr>
	<td class="print-spacer" colspan="2">
		<hr />
	</td>
</tr>
<tr>
	<td class="nopad" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(<?php echo bugnote_format_id( $t_bugnote->id ) ?>)
			</td>
		</tr>
		<tr>
			<td class="print">
				<?php print_user( $t_bugnote->reporter_id ) ?>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				<?php echo $t_date_submitted ?>&#160;&#160;&#160;
				<?php if ( $t_bugnote->date_submitted != $t_bugnote->last_modified ) {
					echo '<br />(' . lang_get( 'last_edited') . lang_get( 'word_separator' ) . $t_last_modified . ')';
				} ?>
			</td>
		</tr>
开发者ID:rombert,项目名称:mantisbt,代码行数:31,代码来源:print_all_bug_page_word.php


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