本文整理汇总了PHP中access_can_reopen_bug函数的典型用法代码示例。如果您正苦于以下问题:PHP access_can_reopen_bug函数的具体用法?PHP access_can_reopen_bug怎么用?PHP access_can_reopen_bug使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了access_can_reopen_bug函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: access_ensure_can_reopen_bug
/**
* Make sure that the user can reopen the specified bug.
* Calls access_denied if user has no access to terminate script
* @see access_can_reopen_bug
* @param BugData $p_bug Bug to check access against
* @param int|null $p_user_id integer representing user id, defaults to null to use current user
* @access public
*/
function access_ensure_can_reopen_bug($p_bug, $p_user_id = null)
{
if (!access_can_reopen_bug($p_bug, $p_user_id)) {
access_denied();
}
}
示例2: bug_is_user_reporter
$t_resolve_issue = false;
$t_close_issue = false;
$t_reopen_issue = false;
if ($t_existing_bug->status < $t_resolved_status && $t_updated_bug->status >= $t_resolved_status && $t_updated_bug->status < $t_closed_status) {
$t_resolve_issue = true;
} else {
if ($t_existing_bug->status < $t_closed_status && $t_updated_bug->status >= $t_closed_status) {
$t_close_issue = true;
} else {
if ($t_existing_bug->status >= $t_resolved_status && $t_updated_bug->status <= config_get('bug_reopen_status')) {
$t_reopen_issue = true;
}
}
}
$t_reporter_closing = $f_update_type == BUG_UPDATE_TYPE_CLOSE && bug_is_user_reporter($f_bug_id, $t_current_user_id) && access_can_close_bug($t_existing_bug, $t_current_user_id);
$t_reporter_reopening = ($f_update_type == BUG_UPDATE_TYPE_REOPEN || $t_reopen_issue) && bug_is_user_reporter($f_bug_id, $t_current_user_id) && access_can_reopen_bug($t_existing_bug, $t_current_user_id);
if (!$t_reporter_reopening && !$t_reporter_closing) {
# Ensure that the user has permission to update bugs. This check also factors
# in whether the user has permission to view private bugs. The
# $g_limit_reporters option is also taken into consideration.
access_ensure_bug_level(config_get('update_bug_threshold'), $f_bug_id);
# Check if the bug is in a read-only state and whether the current user has
# permission to update read-only bugs.
if (bug_is_readonly($f_bug_id)) {
error_parameters($f_bug_id);
trigger_error(ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR);
}
}
# If resolving or closing, ensure that all dependant issues have been resolved.
if (($t_resolve_issue || $t_close_issue) && !relationship_can_resolve_bug($f_bug_id)) {
trigger_error(ERROR_BUG_RESOLVE_DEPENDANTS_BLOCKING, ERROR);
示例3: html_button_bug_reopen
/**
* Print a button to reopen the given bug
* @param BugData $p_bug Bug object
* @return null
*/
function html_button_bug_reopen($p_bug)
{
if (access_can_reopen_bug($p_bug)) {
$t_reopen_status = config_get('bug_reopen_status', null, null, $p_bug->project_id);
html_button('bug_change_status_page.php', lang_get('reopen_bug_button'), array('id' => $p_bug->id, 'new_status' => $t_reopen_status, 'reopen_flag' => ON));
}
}
示例4: html_button_bug_reopen
/**
* Print a button to reopen the given bug
* @param BugData $p_bug A valid bug object.
* @return void
*/
function html_button_bug_reopen(BugData $p_bug)
{
if (access_can_reopen_bug($p_bug)) {
$t_reopen_status = config_get('bug_reopen_status', null, null, $p_bug->project_id);
html_button('bug_change_status_page.php', lang_get('reopen_bug_button'), array('id' => $p_bug->id, 'new_status' => $t_reopen_status, 'change_type' => BUG_UPDATE_TYPE_REOPEN));
}
}