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


PHP sponsorship_get_all_ids函数代码示例

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


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

示例1: trigger_error

        } else {
            if ($t_reopen_issue && $t_existing_bug->status < $t_closed_status && $t_existing_bug->reporter_id === auth_get_current_user_id() && config_get('allow_reporter_reopen')) {
                $t_can_bypass_status_access_thresholds = true;
            }
        }
        if (!$t_can_bypass_status_access_thresholds) {
            trigger_error(ERROR_ACCESS_DENIED, ERROR);
        }
    }
    if ($t_reopen_issue) {
        # for everyone allowed to reopen an issue, set the reopen resolution
        $t_updated_bug->resolution = config_get('bug_reopen_resolution');
    }
}
# Validate any change to the handler of an issue.
$t_issue_is_sponsored = sponsorship_get_amount(sponsorship_get_all_ids($f_bug_id)) > 0;
if ($t_existing_bug->handler_id !== $t_updated_bug->handler_id) {
    access_ensure_bug_level(config_get('update_bug_assign_threshold'), $f_bug_id);
    if ($t_issue_is_sponsored && !access_has_bug_level(config_get('handle_sponsored_bugs_threshold'), $f_bug_id)) {
        trigger_error(ERROR_SPONSORSHIP_HANDLER_ACCESS_LEVEL_TOO_LOW, ERROR);
    }
    if ($t_updated_bug->handler_id !== NO_USER) {
        if (!access_has_bug_level(config_get('handle_bug_threshold'), $f_bug_id, $t_updated_bug->handler_id)) {
            trigger_error(ERROR_HANDLER_ACCESS_TOO_LOW, ERROR);
        }
        if ($t_issue_is_sponsored && !access_has_bug_level(config_get('assign_sponsored_bugs_threshold'), $f_bug_id)) {
            trigger_error(ERROR_SPONSORSHIP_ASSIGNER_ACCESS_LEVEL_TOO_LOW, ERROR);
        }
    }
}
# Check whether the category has been undefined when it's compulsory.
开发者ID:Kirill,项目名称:mantisbt,代码行数:31,代码来源:bug_update.php

示例2: require_api

require_api('bug_api.php');
require_api('collapse_api.php');
require_api('config_api.php');
require_api('constant_inc.php');
require_api('current_user_api.php');
require_api('form_api.php');
require_api('helper_api.php');
require_api('lang_api.php');
require_api('print_api.php');
require_api('sponsorship_api.php');
require_api('utility_api.php');
#
# Determine whether the sponsorship section should be shown.
#
if (config_get('enable_sponsorship') == ON && access_has_bug_level(config_get('view_sponsorship_total_threshold'), $f_bug_id)) {
    $t_sponsorship_ids = sponsorship_get_all_ids($f_bug_id);
    $t_sponsorships_exist = count($t_sponsorship_ids) > 0;
    $t_can_sponsor = !bug_is_readonly($f_bug_id) && !current_user_is_anonymous();
    $t_show_sponsorships = $t_sponsorships_exist || $t_can_sponsor;
} else {
    $t_show_sponsorships = false;
}
#
# Sponsorship Box
#
if ($t_show_sponsorships) {
    ?>

<a id="sponsorships"></a> <br />

<?php 
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:31,代码来源:bug_sponsorship_list_view_inc.php

示例3: sponsorship_update_bug

/**
 * Update bug to reflect sponsorship change
 * This is to be called after adding/updating/deleting sponsorships
 * @param int $p_bug_id
 * @return null
 */
function sponsorship_update_bug($p_bug_id)
{
    $t_total_amount = sponsorship_get_amount(sponsorship_get_all_ids($p_bug_id));
    bug_set_field($p_bug_id, 'sponsorship_total', $t_total_amount);
    bug_update_date($p_bug_id);
}
开发者ID:nextgens,项目名称:mantisbt,代码行数:12,代码来源:sponsorship_api.php

示例4: bug_delete

/**
 * allows bug deletion :
 * delete the bug, bugtext, bugnote, and bugtexts selected
 * @param array p_bug_id integer representing bug id
 * @return bool (always true)
 * @access public
 */
function bug_delete($p_bug_id)
{
    $c_bug_id = (int) $p_bug_id;
    $t_bug_table = db_get_table('bug');
    $t_bug_text_table = db_get_table('bug_text');
    # call pre-deletion custom function
    helper_call_custom_function('issue_delete_validate', array($p_bug_id));
    # log deletion of bug
    history_log_event_special($p_bug_id, BUG_DELETED, bug_format_id($p_bug_id));
    email_bug_deleted($p_bug_id);
    # call post-deletion custom function.  We call this here to allow the custom function to access the details of the bug before
    # they are deleted from the database given it's id.  The other option would be to move this to the end of the function and
    # provide it with bug data rather than an id, but this will break backward compatibility.
    helper_call_custom_function('issue_delete_notify', array($p_bug_id));
    # Unmonitor bug for all users
    bug_unmonitor($p_bug_id, null);
    # Delete custom fields
    custom_field_delete_all_values($p_bug_id);
    # Delete bugnotes
    bugnote_delete_all($p_bug_id);
    # Delete all sponsorships
    sponsorship_delete(sponsorship_get_all_ids($p_bug_id));
    # MASC RELATIONSHIP
    # we delete relationships even if the feature is currently off.
    relationship_delete_all($p_bug_id);
    # MASC RELATIONSHIP
    # Delete files
    file_delete_attachments($p_bug_id);
    # Detach tags
    tag_bug_detach_all($p_bug_id, false);
    # Delete the bug history
    history_delete($p_bug_id);
    # Delete bug info revisions
    bug_revision_delete($p_bug_id);
    # Delete the bugnote text
    $t_bug_text_id = bug_get_field($p_bug_id, 'bug_text_id');
    $query = "DELETE FROM {$t_bug_text_table}\n\t\t\t\t  WHERE id=" . db_param();
    db_query_bound($query, array($t_bug_text_id));
    # Delete the bug entry
    $query = "DELETE FROM {$t_bug_table}\n\t\t\t\t  WHERE id=" . db_param();
    db_query_bound($query, array($c_bug_id));
    bug_clear_cache($p_bug_id);
    bug_text_clear_cache($p_bug_id);
    # db_query errors on failure so:
    return true;
}
开发者ID:rasperen,项目名称:mantisbt,代码行数:53,代码来源:bug_api.php

示例5: access_denied

        if (bug_is_readonly($f_bug_id) || !access_has_bug_level(access_get_status_threshold($f_new_status, $t_bug->project_id), $f_bug_id, $t_current_user_id)) {
            access_denied();
        }
    }
}
$t_can_update_due_date = access_has_bug_level(config_get('due_date_update_threshold'), $f_bug_id);
if ($t_can_update_due_date) {
    require_js('jscalendar/calendar.js');
    require_js('jscalendar/lang/calendar-en.js');
    require_js('jscalendar/calendar-setup.js');
    require_css('calendar-blue.css');
}
# get new issue handler if set, otherwise default to original handler
$f_handler_id = gpc_get_int('handler_id', $t_bug->handler_id);
if (config_get('bug_assigned_status') == $f_new_status) {
    $t_bug_sponsored = config_get('enable_sponsorship') && sponsorship_get_amount(sponsorship_get_all_ids($f_bug_id)) > 0;
    if ($t_bug_sponsored && !access_has_bug_level(config_get('assign_sponsored_bugs_threshold'), $f_bug_id)) {
        trigger_error(ERROR_SPONSORSHIP_ASSIGNER_ACCESS_LEVEL_TOO_LOW, ERROR);
    }
    if ($f_handler_id != NO_USER) {
        if (!access_has_bug_level(config_get('handle_bug_threshold'), $f_bug_id, $f_handler_id)) {
            trigger_error(ERROR_HANDLER_ACCESS_TOO_LOW, ERROR);
        }
        if ($t_bug_sponsored && !access_has_bug_level(config_get('handle_sponsored_bugs_threshold'), $f_bug_id, $f_handler_id)) {
            trigger_error(ERROR_SPONSORSHIP_HANDLER_ACCESS_LEVEL_TOO_LOW, ERROR);
        }
    }
}
$t_status_label = str_replace(' ', '_', MantisEnum::getLabel(config_get('status_enum_string'), $f_new_status));
html_page_top(bug_format_summary($f_bug_id, SUMMARY_CAPTION));
print_recently_visited();
开发者ID:spring,项目名称:spring-website,代码行数:31,代码来源:bug_change_status_page.php

示例6: bug_delete

function bug_delete($p_bug_id)
{
    $c_bug_id = db_prepare_int($p_bug_id);
    $t_bug_table = config_get('mantis_bug_table');
    $t_bug_text_table = config_get('mantis_bug_text_table');
    # log deletion of bug
    history_log_event_special($p_bug_id, BUG_DELETED, bug_format_id($p_bug_id));
    email_bug_deleted($p_bug_id);
    # Unmonitor bug for all users
    bug_unmonitor($p_bug_id, null);
    # Delete custom fields
    custom_field_delete_all_values($p_bug_id);
    # Delete bugnotes
    bugnote_delete_all($p_bug_id);
    # Delete all sponsorships
    sponsorship_delete(sponsorship_get_all_ids($p_bug_id));
    # MASC RELATIONSHIP
    # we delete relationships even if the feature is currently off.
    relationship_delete_all($p_bug_id);
    # MASC RELATIONSHIP
    # Delete files
    file_delete_attachments($p_bug_id);
    # Delete the bug history
    history_delete($p_bug_id);
    # Delete the bugnote text
    $t_bug_text_id = bug_get_field($p_bug_id, 'bug_text_id');
    $query = "DELETE FROM {$t_bug_text_table}\n\t\t\t\t  WHERE id='{$t_bug_text_id}'";
    db_query($query);
    # Delete the bug entry
    $query = "DELETE FROM {$t_bug_table}\n\t\t\t\t  WHERE id='{$c_bug_id}'";
    db_query($query);
    bug_clear_cache($p_bug_id);
    bug_text_clear_cache($p_bug_id);
    # db_query() errors on failure so:
    return true;
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:36,代码来源:bug_api.php


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