本文整理汇总了PHP中user_is_monitoring_bug函数的典型用法代码示例。如果您正苦于以下问题:PHP user_is_monitoring_bug函数的具体用法?PHP user_is_monitoring_bug怎么用?PHP user_is_monitoring_bug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了user_is_monitoring_bug函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: 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>';
}
开发者ID:amjadtbssm,项目名称:website,代码行数:56,代码来源:html_api.php
示例2: html_buttons_view_bug_page
/**
* Print all buttons for view bug pages
* @param int $p_bug_id
* @return null
*/
function html_buttons_view_bug_page($p_bug_id)
{
$t_resolved = config_get('bug_resolved_status_threshold');
$t_closed = config_get('bug_closed_status_threshold');
$t_status = bug_get_field($p_bug_id, 'status');
$t_readonly = bug_is_readonly($p_bug_id);
$t_sticky = config_get('set_bug_sticky_threshold');
$t_bug = bug_get($p_bug_id);
echo '<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($t_bug);
echo '</td>';
}
# Change status button/dropdown
if (!$t_readonly) {
echo '<td class="center">';
html_button_bug_change_status($t_bug);
echo '</td>';
}
# MONITOR/UNMONITOR button
if (!current_user_is_anonymous()) {
echo '<td class="center">';
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>';
}
# STICK/UNSTICK button
if (access_has_bug_level($t_sticky, $p_bug_id)) {
echo '<td class="center">';
if (!bug_get_field($p_bug_id, 'sticky')) {
html_button_bug_stick($p_bug_id);
} else {
html_button_bug_unstick($p_bug_id);
}
echo '</td>';
}
# CLONE button
if (!$t_readonly) {
echo '<td class="center">';
html_button_bug_create_child($p_bug_id);
echo '</td>';
}
# REOPEN button
echo '<td class="center">';
html_button_bug_reopen($t_bug);
echo '</td>';
# CLOSE button
echo '<td class="center">';
html_button_bug_close($t_bug);
echo '</td>';
# 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>';
}
开发者ID:nextgens,项目名称:mantisbt,代码行数:75,代码来源:html_api.php
示例3: bug_monitor_copy
/**
* Copy list of users monitoring a bug to the monitor list of a second bug
* @param int p_source_bug_id integer representing the bug ID of the source bug
* @param int p_dest_bug_id integer representing the bug ID of the destination bug
* @return bool (always true)
* @access public
* @uses database_api.php
* @uses history_api.php
* @uses user_api.php
*/
function bug_monitor_copy($p_source_bug_id, $p_dest_bug_id)
{
$c_source_bug_id = (int) $p_source_bug_id;
$c_dest_bug_id = (int) $p_dest_bug_id;
$t_bug_monitor_table = db_get_table('mantis_bug_monitor_table');
$query = 'SELECT user_id
FROM ' . $t_bug_monitor_table . '
WHERE bug_id = ' . db_param();
$result = db_query_bound($query, array($c_source_bug_id));
$t_count = db_num_rows($result);
for ($i = 0; $i < $t_count; $i++) {
$t_bug_monitor = db_fetch_array($result);
if (!user_is_monitoring_bug($t_bug_monitor['user_id'], $c_dest_bug_id)) {
$query = 'INSERT INTO ' . $t_bug_monitor_table . ' ( user_id, bug_id )
VALUES ( ' . db_param() . ', ' . db_param() . ' )';
db_query_bound($query, array($t_bug_monitor['user_id'], $c_dest_bug_id));
history_log_event_special($c_dest_bug_id, BUG_MONITOR, $t_bug_monitor['user_id']);
}
}
}
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:30,代码来源:bug_api.php
示例4: bug_monitor_copy
/**
* Copy list of users monitoring a bug to the monitor list of a second bug
* @param integer $p_source_bug_id Integer representing the bug identifier of the source bug.
* @param integer $p_dest_bug_id Integer representing the bug identifier of the destination bug.
* @return void
* @access public
* @uses database_api.php
* @uses history_api.php
* @uses user_api.php
*/
function bug_monitor_copy( $p_source_bug_id, $p_dest_bug_id ) {
$c_source_bug_id = (int)$p_source_bug_id;
$c_dest_bug_id = (int)$p_dest_bug_id;
$t_query = 'SELECT user_id FROM {bug_monitor} WHERE bug_id = ' . db_param();
$t_result = db_query( $t_query, array( $c_source_bug_id ) );
while( $t_bug_monitor = db_fetch_array( $t_result ) ) {
if( user_exists( $t_bug_monitor['user_id'] ) &&
!user_is_monitoring_bug( $t_bug_monitor['user_id'], $c_dest_bug_id ) ) {
$t_query = 'INSERT INTO {bug_monitor} ( user_id, bug_id )
VALUES ( ' . db_param() . ', ' . db_param() . ' )';
db_query( $t_query, array( $t_bug_monitor['user_id'], $c_dest_bug_id ) );
history_log_event_special( $c_dest_bug_id, BUG_MONITOR, $t_bug_monitor['user_id'] );
}
}
}
开发者ID:01-Scripts,项目名称:mantisbt,代码行数:27,代码来源:bug_api.php
示例5: bug_monitor
function bug_monitor($p_bug_id, $p_user_id)
{
$c_bug_id = db_prepare_int($p_bug_id);
$c_user_id = db_prepare_int($p_user_id);
# Make sure we aren't already monitoring this bug
if (user_is_monitoring_bug($p_user_id, $p_bug_id)) {
return true;
}
$t_bug_monitor_table = config_get('mantis_bug_monitor_table');
# Insert monitoring record
$query = "INSERT " . "INTO {$t_bug_monitor_table} " . "( user_id, bug_id ) " . "VALUES " . "( '{$c_user_id}', '{$c_bug_id}' )";
db_query($query);
# log new monitoring action
history_log_event_special($p_bug_id, BUG_MONITOR, $c_user_id);
return true;
}
开发者ID:jin255ff,项目名称:company_website,代码行数:16,代码来源:bug_api.php
示例6: html_buttons_view_bug_page
/**
* Print all buttons for view bug pages
* @param int $p_bug_id
* @return null
*/
function html_buttons_view_bug_page($p_bug_id)
{
$t_resolved = config_get('bug_resolved_status_threshold');
$t_closed = config_get('bug_closed_status_threshold');
$t_status = bug_get_field($p_bug_id, 'status');
$t_readonly = bug_is_readonly($p_bug_id);
// WK/BFE: Folgende Zeile ist eine Kopie der vorigen., LB/BFE 2015
// bug_is_readonly -> bug_is_readonly_BFE
// $t_readonly -> $t_readonly_BFE
$t_readonly_BFE = bug_is_readonly_BFE($p_bug_id);
$t_sticky = config_get('set_bug_sticky_threshold');
$t_bug = bug_get($p_bug_id);
echo '<table><tr class="vcenter">';
// WK/BFE: Bedingund von $t_readonly auf $t_readonly_BFE geändert., LB/BFE 2015
if (!$t_readonly_BFE) {
# UPDATE button
echo '<td class="center">';
html_button_bug_update($p_bug_id);
echo '</td>';
}
if (!$t_readonly) {
# ASSIGN button
echo '<td class="center">';
html_button_bug_assign_to($t_bug);
echo '</td>';
}
# Change status button/dropdown
if (!$t_readonly) {
echo '<td class="center">';
html_button_bug_change_status($t_bug);
echo '</td>';
}
# MONITOR/UNMONITOR button
if (!current_user_is_anonymous()) {
echo '<td class="center">';
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>';
}
# STICK/UNSTICK button
if (access_has_bug_level($t_sticky, $p_bug_id)) {
echo '<td class="center">';
if (!bug_get_field($p_bug_id, 'sticky')) {
html_button_bug_stick($p_bug_id);
} else {
html_button_bug_unstick($p_bug_id);
}
echo '</td>';
}
# CLONE button
if (!$t_readonly) {
echo '<td class="center">';
html_button_bug_create_child($p_bug_id);
echo '</td>';
}
# REOPEN button
echo '<td class="center">';
html_button_bug_reopen($t_bug);
echo '</td>';
# CLOSE button
# LB/BFE 2015 Schließen-Button entfernt: https://issuetracking.bfe.tv/view.php?id=18093
/*
echo '<td class="center">';
html_button_bug_close( $t_bug );
echo '</td>';
*/
# 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>';
}
开发者ID:bfekomsthoeft,项目名称:TTS_Praxisprojekt1,代码行数:85,代码来源:html_api.php
注:本文中的user_is_monitoring_bug函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论