• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP helper_call_custom_function函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: mc_issue_checkin

/**
 * Log a checkin event on the issue
 *
 * @param string $p_username  The name of the user trying to access the issue.
 * @param string $p_password  The password of the user.
 * @param integer $p_issue_id The id of the issue to log a checkin.
 * @param string $p_comment   The comment to add
 * @param boolean $p_fixed    True if the issue is to be set to fixed
 * @return boolean  true success, false otherwise.
 */
function mc_issue_checkin($p_username, $p_password, $p_issue_id, $p_comment, $p_fixed)
{
    global $g_project_override;
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return mci_soap_fault_login_failed();
    }
    if (!bug_exists($p_issue_id)) {
        return SoapObjectsFactory::newSoapFault('Client', "Issue '{$p_issue_id}' not found.");
    }
    $t_project_id = bug_get_field($p_issue_id, 'project_id');
    $g_project_override = $t_project_id;
    if (!mci_has_readwrite_access($t_user_id, $t_project_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    helper_call_custom_function('checkin', array($p_issue_id, $p_comment, '', '', $p_fixed));
    return true;
}
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:28,代码来源:mc_issue_api.php


示例2: html_page_top2a

html_page_top2a();
echo "<br />";
?>
<br />
<div align="center">
<form name="lost_password_form" method="post" action="lost_pwd.php">
<table class="width50" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
		<?php 
echo lang_get('lost_password_title');
?>
	</td>
</tr>
<?php 
$t_allow_passwd = helper_call_custom_function('auth_can_change_password', array());
if ($t_allow_passwd) {
    ?>
<tr class="row-1">
	<td class="category" width="25%">
		<?php 
    echo lang_get('username');
    ?>
	</td>
	<td width="75%">
		<input type="text" name="username" size="32" maxlength="32" />
	</td>
</tr>
<tr class="row-2">
	<td class="category" width="25%">
		<?php 
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:lost_pwd_page.php


示例3: gpc_get_string

$f_captcha = gpc_get_string('captcha', '');
$f_username = trim($f_username);
$f_email = email_append_domain(trim($f_email));
$f_captcha = utf8_strtolower(trim($f_captcha));
# Retrieve captcha key now, as session might get cleared by logout
$t_form_key = session_get_int(CAPTCHA_KEY, null);
# force logout on the current user if already authenticated
if (auth_is_user_authenticated()) {
    auth_logout();
}
# Check to see if signup is allowed
if (OFF == config_get_global('allow_signup')) {
    print_header_redirect('login_page.php');
    exit;
}
if (ON == config_get('signup_use_captcha') && get_gd_version() > 0 && helper_call_custom_function('auth_can_change_password', array())) {
    # captcha image requires GD library and related option to ON
    $t_key = utf8_strtolower(utf8_substr(md5(config_get('password_confirm_hash_magic_string') . $t_form_key), 1, 5));
    if ($t_key != $f_captcha) {
        trigger_error(ERROR_SIGNUP_NOT_MATCHING_CAPTCHA, ERROR);
    }
    # Clear captcha cache
    session_delete(CAPTCHA_IMG);
}
email_ensure_not_disposable($f_email);
# notify the selected group a new user has signed-up
if (user_signup($f_username, $f_email)) {
    email_notify_new_account($f_username, $f_email);
}
form_security_purge('signup');
html_page_top1();
开发者ID:Tarendai,项目名称:spring-website,代码行数:31,代码来源:signup.php


示例4: Copyright

<?php

# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002  Kenzaburo Ito - [email protected]
# Copyright (C) 2002 - 2004  Mantis Team   - [email protected]
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
# --------------------------------------------------------
# $Id: bug_delete.php,v 1.40 2005/07/25 16:34:10 thraxisp Exp $
# --------------------------------------------------------
# Deletes the bug and re-directs to view_all_bug_page.php
require_once 'core.php';
$t_core_path = config_get('core_path');
require_once $t_core_path . 'bug_api.php';
$f_bug_id = gpc_get_int('bug_id');
access_ensure_bug_level(config_get('delete_bug_threshold'), $f_bug_id);
$t_bug = bug_get($f_bug_id, true);
if ($t_bug->project_id != helper_get_current_project()) {
    # in case the current project is not the same project of the bug we are viewing...
    # ... override the current project. This to avoid problems with categories and handlers lists etc.
    $g_project_override = $t_bug->project_id;
}
helper_ensure_confirmed(lang_get('delete_bug_sure_msg'), lang_get('delete_bug_button'));
$t_bug = bug_get($f_bug_id, true);
helper_call_custom_function('issue_delete_validate', array($f_bug_id));
bug_delete($f_bug_id);
helper_call_custom_function('issue_delete_notify', array($f_bug_id));
print_successful_redirect('view_all_bug_page.php');
开发者ID:centaurustech,项目名称:BenFund,代码行数:28,代码来源:bug_delete.php


示例5: lang_get

?>
		<input type="submit" class="button" value="<?php 
echo lang_get('update_user_button');
?>
" />
	</td>
</tr>
</table>
</form>
</div>

<br />

<!-- RESET AND DELETE -->
<?php 
$t_reset = $t_user['id'] != auth_get_current_user_id() && helper_call_custom_function('auth_can_change_password', array());
$t_unlock = OFF != config_get('max_failed_login_count') && $t_user['failed_login_count'] > 0;
$t_delete = !(user_is_administrator($t_user_id) && user_count_level(config_get_global('admin_site_threshold')) <= 1);
if ($t_reset || $t_unlock || $t_delete) {
    ?>
<div class="border center">

<!-- Reset/Unlock Button -->
<?php 
    if ($t_reset || $t_unlock) {
        ?>
	<form method="post" action="manage_user_reset.php">
<?php 
        echo form_security_field('manage_user_reset');
        ?>
		<input type="hidden" name="user_id" value="<?php 
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:31,代码来源:manage_user_edit_page.php


示例6: helper_get_columns_to_view

/**
 *
 * @param int $p_columns_target
 * @param bool $p_viewable_only
 * @param int $p_user_id
 * @return array
 */
function helper_get_columns_to_view($p_columns_target = COLUMNS_TARGET_VIEW_PAGE, $p_viewable_only = true, $p_user_id = null)
{
    $t_columns = helper_call_custom_function('get_columns_to_view', array($p_columns_target, $p_user_id));
    if (!$p_viewable_only) {
        return $t_columns;
    }
    $t_keys_to_remove = array();
    if ($p_columns_target == COLUMNS_TARGET_CSV_PAGE || $p_columns_target == COLUMNS_TARGET_EXCEL_PAGE) {
        $t_keys_to_remove[] = 'selection';
        $t_keys_to_remove[] = 'edit';
        $t_keys_to_remove[] = 'bugnotes_count';
        $t_keys_to_remove[] = 'attachment_count';
        $t_keys_to_remove[] = 'overdue';
    }
    if ($p_columns_target == COLUMNS_TARGET_CSV_PAGE || $p_columns_target == COLUMNS_TARGET_EXCEL_PAGE) {
        $t_keys_to_remove[] = 'attachment_count';
    }
    $t_current_project_id = helper_get_current_project();
    if ($t_current_project_id != ALL_PROJECTS && !access_has_project_level(config_get('view_handler_threshold'), $t_current_project_id)) {
        $t_keys_to_remove[] = 'handler_id';
    }
    if ($t_current_project_id != ALL_PROJECTS && !access_has_project_level(config_get('roadmap_view_threshold'), $t_current_project_id)) {
        $t_keys_to_remove[] = 'target_version';
    }
    foreach ($t_keys_to_remove as $t_key_to_remove) {
        $t_keys = array_keys($t_columns, $t_key_to_remove);
        foreach ($t_keys as $t_key) {
            unset($t_columns[$t_key]);
        }
    }
    # get the array values to remove gaps in the array which causes issue
    # if the array is accessed using an index.
    return array_values($t_columns);
}
开发者ID:nextgens,项目名称:mantisbt,代码行数:41,代码来源:helper_api.php


示例7: lang_get

	<!-- Headings -->
	<tr>
		<td class="form-title">
			<?php 
echo lang_get('edit_account_title');
?>
		</td>
		<td class="right">
			<?php 
print_account_menu('account_page.php');
?>
		</td>
	</tr>

<?php 
if (!helper_call_custom_function('auth_can_change_password', array())) {
    ?>
 <!-- With LDAP -->

	<!-- Username -->
	<tr <?php 
    echo helper_alternate_class();
    ?>
>
		<td class="category" width="25%">
			<?php 
    echo lang_get('username');
    ?>
		</td>
		<td width="75%">
			<?php 
开发者ID:khinT,项目名称:mantisbt-master,代码行数:31,代码来源:account_page.php


示例8: exit

        for ($i = 0; $i < $t_count; ++$i) {
            $t_fixed_issues[] = $t_matches[1][$i];
        }
    }
}
# If no issues found, then no work to do.
if (count($t_issues) == 0 && count($t_fixed_issues) == 0) {
    echo "Comment does not reference any issues.\n";
    exit(0);
}
# Login as source control user
if (!auth_attempt_script_login($t_username)) {
    echo "Unable to login\n";
    exit(1);
}
# history parameters are reserved for future use.
$t_history_old_value = '';
$t_history_new_value = '';
# add note to each bug only once
$t_issues = array_unique($t_issues);
$t_fixed_issues = array_unique($t_fixed_issues);
# Call the custom function to register the checkin on each issue.
foreach ($t_issues as $t_issue_id) {
    if (!in_array($t_issue_id, $t_fixed_issues)) {
        helper_call_custom_function('checkin', array($t_issue_id, $t_comment, $t_history_old_value, $t_history_new_value, false));
    }
}
foreach ($t_fixed_issues as $t_issue_id) {
    helper_call_custom_function('checkin', array($t_issue_id, $t_comment, $t_history_old_value, $t_history_new_value, true));
}
exit(0);
开发者ID:Tarendai,项目名称:spring-website,代码行数:31,代码来源:checkin.php


示例9: current_user_get_bug_filter

		<?php 
}
# @@@ thraxisp - could this be replaced by a call to filter_draw_selection_area2
$t_filter = current_user_get_bug_filter();
$t_filter = filter_ensure_valid_filter($t_filter);
$t_project_id = helper_get_current_project();
$t_current_user_access_level = current_user_get_access_level();
$t_accessible_custom_fields_ids = array();
$t_accessible_custom_fields_names = array();
$t_accessible_custom_fields_type = array();
$t_accessible_custom_fields_values = array();
$t_filter_cols = config_get('filter_custom_fields_per_row');
$t_custom_cols = 1;
$t_custom_rows = 0;
#get valid target fields
$t_fields = helper_call_custom_function('get_columns_to_view', array());
$t_n_fields = count($t_fields);
for ($i = 0; $i < $t_n_fields; $i++) {
    if (in_array($t_fields[$i], array('selection', 'edit', 'bugnotes_count', 'attachment'))) {
        unset($t_fields[$i]);
    }
}
if (ON == config_get('filter_by_custom_fields')) {
    $t_custom_cols = $t_filter_cols;
    $t_custom_fields = custom_field_get_linked_ids($t_project_id);
    foreach ($t_custom_fields as $t_cfid) {
        $t_field_info = custom_field_cache_row($t_cfid, true);
        if ($t_field_info['access_level_r'] <= $t_current_user_access_level) {
            $t_accessible_custom_fields_ids[] = $t_cfid;
            $t_accessible_custom_fields_names[] = $t_field_info['name'];
            $t_accessible_custom_fields_types[] = $t_field_info['type'];
开发者ID:centaurustech,项目名称:BenFund,代码行数:31,代码来源:view_filters_page.php


示例10: while

        while ($t_row = db_fetch_array($t_result)) {
            # hide private bugs if user doesn't have access to view them.
            if (!$t_can_view_private && $t_row['view_state'] == VS_PRIVATE) {
                continue;
            }
            # check limit_Reporter (Issue #4770)
            # reporters can view just issues they reported
            if (ON === $t_limit_reporters && $t_user_access_level_is_reporter && !bug_is_user_reporter($t_result->fields['id'], $t_user_id)) {
                continue;
            }
            $t_issue_id = $t_row['id'];
            if (!helper_call_custom_function('changelog_include_issue', array($t_issue_id))) {
                continue;
            }
            # Print the header for the version with the first changelog entry to be added.
            if ($t_first_entry && !$t_version_header_printed) {
                if ($i > 0) {
                    echo '<br />';
                }
                print_version_header($t_version_id);
                $t_version_header_printed = true;
                $t_first_entry = false;
            }
            helper_call_custom_function('changelog_print_issue', array($t_issue_id));
        }
        $i++;
    }
    echo '</tt>';
    $t_project_index++;
}
html_page_bottom1(__FILE__);
开发者ID:centaurustech,项目名称:BenFund,代码行数:31,代码来源:changelog_page.php


示例11: mc_issue_checkin

/**
 * Log a checkin event on the issue
 *
 * @param string $p_username  The name of the user trying to access the issue.
 * @param string $p_password  The password of the user.
 * @param integer $p_issue_id The id of the issue to log a checkin.
 * @param string $p_comment   The comment to add
 * @param boolean $p_fixed    True if the issue is to be set to fixed
 * @return boolean  true success, false otherwise.
 */
function mc_issue_checkin($p_username, $p_password, $p_issue_id, $p_comment, $p_fixed)
{
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return new soap_fault('Client', '', 'Access Denied');
    }
    if (!bug_exists($p_issue_id)) {
        return new soap_fault('Client', '', "Issue '{$p_issue_id}' not found.");
    }
    $t_project_id = bug_get_field($p_issue_id, 'project_id');
    if (!mci_has_readwrite_access($t_user_id, $t_project_id)) {
        return new soap_fault('Client', '', 'Access Denied');
    }
    helper_call_custom_function('checkin', array($p_issue_id, $p_comment, '', '', $p_fixed));
    return true;
}
开发者ID:jin255ff,项目名称:company_website,代码行数:26,代码来源:mc_issue_api.php


示例12: kanban_ajax_request_bug_update_status

/**
 * updates the status field
 * @return bool 
 * @access public
 * @see bug_update.php
 */
function kanban_ajax_request_bug_update_status()
{
    $p_bug_id = gpc_get_int('id');
    $p_new_status = gpc_get_int('new_status');
    $t_project_id = gpc_get_int('project_id');
    $c_bug_id = (int) $p_bug_id;
    $f_new_status = (int) $p_new_status;
    $t_bug_data = bug_get($c_bug_id, true);
    $f_update_mode = gpc_get_bool('update_mode', FALSE);
    # set if called from generic update page
    if (!(access_has_bug_level(access_get_status_threshold($f_new_status, $t_project_id), $c_bug_id) || access_has_bug_level(config_get('update_bug_threshold'), $c_bug_id) || bug_get_field($c_bug_id, 'reporter_id') == auth_get_current_user_id() && (ON == config_get('allow_reporter_reopen') || ON == config_get('allow_reporter_close')))) {
        access_denied();
    }
    # extract current extended information
    $t_old_bug_status = $t_bug_data->status;
    log_event(LOG_AJAX, "Old bug status {$t_old_bug_status} - trying update to new status {$f_new_status}...");
    $t_bug_data->reporter_id = gpc_get_int('reporter_id', $t_bug_data->reporter_id);
    $t_bug_data->handler_id = gpc_get_int('handler_id', $t_bug_data->handler_id);
    $t_bug_data->duplicate_id = gpc_get_int('duplicate_id', $t_bug_data->duplicate_id);
    $t_bug_data->priority = gpc_get_int('priority', $t_bug_data->priority);
    $t_bug_data->severity = gpc_get_int('severity', $t_bug_data->severity);
    $t_bug_data->reproducibility = gpc_get_int('reproducibility', $t_bug_data->reproducibility);
    $t_bug_data->status = gpc_get_int('new_status', $t_bug_data->status);
    $t_bug_data->resolution = gpc_get_int('resolution', $t_bug_data->resolution);
    $t_bug_data->projection = gpc_get_int('projection', $t_bug_data->projection);
    $t_bug_data->category_id = gpc_get_int('category_id', $t_bug_data->category_id);
    $t_bug_data->eta = gpc_get_int('eta', $t_bug_data->eta);
    $t_bug_data->os = gpc_get_string('os', $t_bug_data->os);
    $t_bug_data->os_build = gpc_get_string('os_build', $t_bug_data->os_build);
    $t_bug_data->platform = gpc_get_string('platform', $t_bug_data->platform);
    $t_bug_data->version = gpc_get_string('version', $t_bug_data->version);
    $t_bug_data->build = gpc_get_string('build', $t_bug_data->build);
    $t_bug_data->fixed_in_version = gpc_get_string('fixed_in_version', $t_bug_data->fixed_in_version);
    $t_bug_data->view_state = gpc_get_int('view_state', $t_bug_data->view_state);
    $t_bug_data->summary = gpc_get_string('summary', $t_bug_data->summary);
    $t_due_date = gpc_get_string('due_date', null);
    if (access_has_project_level(config_get('roadmap_update_threshold'), $t_bug_data->project_id)) {
        $t_bug_data->target_version = gpc_get_string('target_version', $t_bug_data->target_version);
    }
    if ($t_due_date !== null) {
        if (is_blank($t_due_date)) {
            $t_bug_data->due_date = 1;
        } else {
            $t_bug_data->due_date = strtotime($t_due_date);
        }
    }
    $t_bug_data->description = gpc_get_string('description', $t_bug_data->description);
    $t_bug_data->steps_to_reproduce = gpc_get_string('steps_to_reproduce', $t_bug_data->steps_to_reproduce);
    $t_bug_data->additional_information = gpc_get_string('additional_information', $t_bug_data->additional_information);
    $f_private = gpc_get_bool('private');
    $f_bugnote_text = gpc_get_string('bugnote_text', '');
    $f_time_tracking = gpc_get_string('time_tracking', '0:00');
    $f_close_now = gpc_get_string('close_now', false);
    # Handle auto-assigning
    if (config_get('bug_submit_status') == $t_bug_data->status && $t_bug_data->status == $t_old_bug_status && 0 != $t_bug_data->handler_id && ON == config_get('auto_set_status_to_assigned')) {
        $t_bug_data->status = config_get('bug_assigned_status');
    }
    helper_call_custom_function('issue_update_validate', array($c_bug_id, $t_bug_data, $f_bugnote_text));
    $t_resolved = config_get('bug_resolved_status_threshold');
    $t_closed = config_get('bug_closed_status_threshold');
    $t_custom_status_label = "update";
    # default info to check
    if ($t_bug_data->status == $t_resolved) {
        $t_custom_status_label = "resolved";
    }
    if ($t_bug_data->status == $t_closed) {
        $t_custom_status_label = "closed";
    }
    $t_related_custom_field_ids = custom_field_get_linked_ids($t_bug_data->project_id);
    foreach ($t_related_custom_field_ids as $t_id) {
        $t_def = custom_field_get_definition($t_id);
        # Only update the field if it would have been display for editing
        if (!(!$f_update_mode && $t_def['require_' . $t_custom_status_label] || !$f_update_mode && $t_def['display_' . $t_custom_status_label] && in_array($t_custom_status_label, array("resolved", "closed")) || $f_update_mode && $t_def['display_update'] || $f_update_mode && $t_def['require_update'])) {
            continue;
        }
        # Do not set custom field value if user has no write access.
        if (!custom_field_has_write_access($t_id, $c_bug_id)) {
            continue;
        }
        if ($t_def['require_' . $t_custom_status_label] && !gpc_isset_custom_field($t_id, $t_def['type'])) {
            error_parameters(lang_get_defaulted(custom_field_get_field($t_id, 'name')));
            trigger_error(ERROR_EMPTY_FIELD, ERROR);
        }
        # Only update the field if it is posted,
        #	or if it is empty, and the current value isn't the default
        if (!gpc_isset_custom_field($t_id, $t_def['type']) && custom_field_get_value($t_id, $c_bug_id) == $t_def['default_value']) {
            continue;
        }
        if (!custom_field_set_value($t_id, $c_bug_id, gpc_get_custom_field("custom_field_{$t_id}", $t_def['type'], NULL))) {
            error_parameters(lang_get_defaulted(custom_field_get_field($t_id, 'name')));
            log_event(LOG_AJAX, "Error setting new status: " . ERROR_CUSTOM_FIELD_INVALID_VALUE . "\nBugdata: " . print_r($t_bug_data, true) . " Line: " . __LINE__);
            trigger_error(ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR);
        }
    }
//.........这里部分代码省略.........
开发者ID:aberad,项目名称:MantisKanban,代码行数:101,代码来源:kanban_ajax_api.php


示例13: print_filter_show_sort

function print_filter_show_sort()
{
    global $t_filter;
    # get all of the displayed fields for sort, then drop ones that
    #  are not appropriate and translate the rest
    $t_fields = helper_call_custom_function('get_columns_to_view', array());
    $t_n_fields = count($t_fields);
    $t_shown_fields[""] = "";
    for ($i = 0; $i < $t_n_fields; $i++) {
        if (!in_array($t_fields[$i], array('selection', 'edit', 'bugnotes_count', 'attachment'))) {
            if (strpos($t_fields[$i], 'custom_') === 0) {
                $t_field_name = string_display(lang_get_defaulted(substr($t_fields[$i], strlen('custom_'))));
            } else {
                $t_field_name = string_get_field_name($t_fields[$i]);
            }
            $t_shown_fields[$t_fields[$i]] = $t_field_name;
        }
    }
    $t_shown_dirs[""] = "";
    $t_shown_dirs["ASC"] = lang_get('bugnote_order_asc');
    $t_shown_dirs["DESC"] = lang_get('bugnote_order_desc');
    # get default values from filter structure
    $t_sort_fields = split(',', $t_filter['sort']);
    $t_dir_fields = split(',', $t_filter['dir']);
    if (!isset($t_sort_fields[1])) {
        $t_sort_fields[1] = '';
        $t_dir_fields[1] = '';
    }
    # if there are fields to display, show the dropdowns
    if (count($t_fields) > 0) {
        # display a primary and secondary sort fields
        echo '<select name="sort_0">';
        foreach ($t_shown_fields as $key => $val) {
            echo "<option value=\"{$key}\"";
            check_selected($key, $t_sort_fields[0]);
            echo ">{$val}</option>";
        }
        echo '</select>';
        echo '<select name="dir_0">';
        foreach ($t_shown_dirs as $key => $val) {
            echo "<option value=\"{$key}\"";
            check_selected($key, $t_dir_fields[0]);
            echo ">{$val}</option>";
        }
        echo '</select>';
        echo ', ';
        # for secondary sort
        echo '<select name="sort_1">';
        foreach ($t_shown_fields as $key => $val) {
            echo "<option value=\"{$key}\"";
            check_selected($key, $t_sort_fields[1]);
            echo ">{$val}</option>";
        }
        echo '</select>';
        echo '<select name="dir_1">';
        foreach ($t_shown_dirs as $key => $val) {
            echo "<option value=\"{$key}\"";
            check_selected($key, $t_dir_fields[1]);
            echo ">{$val}</option>";
        }
        echo '</select>';
    } else {
        echo lang_get_defaulted('last_updated') . lang_get('bugnote_order_desc');
        echo "<input type=\"hidden\" name=\"sort_1\" value=\"last_updated\" />";
        echo "<input type=\"hidden\" name=\"dir_1\" value=\"DESC\" />";
    }
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:67,代码来源:filter_api.php


示例14: save_bug

 function save_bug($p_project_id, $p_user_id)
 {
     require 'ProfileAcraExt.php';
     $t_project_id = $p_project_id;
     global $g_cache_current_user_id;
     $g_cache_current_user_id = $p_user_id;
     $t_bug_data = new BugData();
     $t_bug_data->project_id = $t_project_id;
     $t_bug_data->reporter_id = $p_user_id;
     $t_bug_data->build = gpc_get_string('APP_VERSION_CODE', '');
     $t_bug_data->platform = "Android";
     $t_bug_data->os = gpc_get_string('ANDROID_VERSION', '');
     //gpc_get_string( 'os', '' );
     $t_os_build = gpc_get_string('BUILD', '');
     if (preg_match('/DISPLAY\\s*=\\s*(.*)/', $t_os_build, $t_match)) {
         var_dump($t_match);
         $t_os_build = $t_match[1];
     } else {
         $t_os_build = gpc_get_string('ANDROID_VERSION', '');
     }
     $t_bug_data->os_build = $t_os_build;
     //gpc_get_string( 'os_build', '' );
     $t_bug_data->version = gpc_get_string('APP_VERSION_NAME', '');
     $t_bug_data->profile_id = profile_create_unique(ALL_USERS, $t_bug_data->platform, $t_bug_data->os, $t_bug_data->os_build, "");
     $t_bug_data->handler_id = gpc_get_int('handler_id', 0);
     $t_bug_data->view_state = gpc_get_int('view_state', config_get('default_bug_view_status', 'VS_PRIVATE', 'acra_reporter'));
     $t_bug_data->category_id = $this->get_category_id($p_project_id);
     //gpc_get_int( 'category_id', 0 );
     $t_bug_data->reproducibility = 10;
     //gpc_get_int( 'reproducibility', config_get( 'default_bug_reproducibility' ) );
     $t_bug_data->severity = CRASH;
     //gpc_get_int( 'severity', config_get( 'default_bug_severity' ) );
     $t_bug_data->priority = HIGH;
     //gpc_get_int( 'priority', config_get( 'default_bug_priority' ) );
     $t_bug_data->projection = gpc_get_int('projection', config_get('default_bug_projection'));
     $t_bug_data->eta = gpc_get_int('eta', config_get('default_bug_eta'));
     $t_bug_data->resolution = OPEN;
     //gpc_get_string('resolution', config_get( 'default_bug_resolution' ) );
     $t_bug_data->status = NEW_;
     //gpc_get_string( 'status', config_get( 'bug_submit_status' ) );
     $t_bug_data->description = gpc_get_string('STACK_TRACE');
     //gpc_get_string( 'description' );
     $t_bug_data->summary = get_bug_summary_by_version(gpc_get_string('APP_VERSION_NAME', ''), $t_bug_data->description, $t_project_id);
     $t_bug_data->steps_to_reproduce = gpc_get_string('LOGCAT', "");
     $t_bug_data->additional_information = gpc_get_string('CRASH_CONFIGURATION', "");
     $t_bug_data->due_date = gpc_get_string('USER_CRASH_DATE', '');
     if (is_blank($t_bug_data->due_date)) {
         $t_bug_data->due_date = date_get_null();
     }
     $f_files = gpc_get_file('ufile', null);
     /** @todo (thraxisp) Note that this always returns a structure */
     $f_report_stay = gpc_get_bool('report_stay', false);
     $f_copy_notes_from_parent = gpc_get_bool('copy_notes_from_parent', false);
     helper_call_custom_function('issue_create_validate', array($t_bug_data));
     # Validate the custom fields before adding the bug.
     $t_related_custom_field_ids = custom_field_get_linked_ids($t_bug_data->project_id);
     foreach ($t_related_custom_field_ids as $t_id) {
         $t_def = custom_field_get_definition($t_id);
         # Produce an error if the field is required but wasn't posted
         if (!gpc_isset_custom_field($t_id, $t_def['type']) && $t_def['require_report']) {
             error_parameters(lang_get_defaulted(custom_field_get_field($t_id, 'name')));
             trigger_error(ERROR_EMPTY_FIELD, ERROR);
         }
         if (!custom_field_validate($t_id, gpc_get_custom_field("custom_field_{$t_id}", $t_def['type'], NULL))) {
             error_parameters(lang_get_defaulted(custom_field_get_field($t_id, 'name')));
             trigger_error(ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR);
         }
     }
     # Allow plugins to pre-process bug data
     $t_bug_data = event_signal('EVENT_REPORT_BUG_DATA', $t_bug_data);
     # Ensure that resolved bugs have a handler
     if ($t_bug_data->handler_id == NO_USER && $t_bug_data->status >= config_get('bug_resolved_status_threshold')) {
         $t_bug_data->handler_id = $this->get_user_id();
     }
     # Create the bug
     $t_bug_id = $t_bug_data->create();
     # Mark the added issue as visited so that it appears on the last visited list.
     last_visited_issue($t_bug_id);
     # Handle the file upload
     if ($f_files != null) {
         $t_files = helper_array_transpose($f_files);
         if ($t_files != null) {
             foreach ($t_files as $t_file) {
                 if (!empty($t_file['name'])) {
                     file_add($t_bug_id, $t_file, 'bug');
                 }
             }
         }
     }
     # Handle custom field submission
     foreach ($t_related_custom_field_ids as $t_id) {
         # Do not set custom field value if user has no write access
         if (!custom_field_has_write_access($t_id, $t_bug_id)) {
             continue;
         }
         $t_def = custom_field_get_definition($t_id);
         if (!custom_field_set_value($t_id, $t_bug_id, gpc_get_custom_field("custom_field_{$t_id}", $t_def['type'], $t_def['default_value']), false)) {
             error_parameters(lang_get_defaulted(custom_field_get_field($t_id, 'name')));
             trigger_error(ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR);
         }
//.........这里部分代码省略.........
开发者ID:since2014,项目名称:MantisAcra,代码行数:101,代码来源:MantisAcra.php


示例15: custom_field_prepare_possible_values

/**
 * $p_possible_values: possible values to be pre-processed.  If it has enumeration values,
 * it will be left as is.  If it has a method, it will be replaced by the list.
 * @param string $p_possible_values Possible values for custom field.
 * @return string|array
 * @access public
 */
function custom_field_prepare_possible_values($p_possible_values)
{
    if (!is_blank($p_possible_values) && $p_possible_values[0] == '=') {
        return helper_call_custom_function('enum_' . utf8_substr($p_possible_values, 1), array());
    }
    return $p_possible_values;
}
开发者ID:hamx0r,项目名称:mantisbt,代码行数:14,代码来源:custom_field_api.php


示例16: array_splice

                }
                array_splice($t_issue_ids, $k, 1);
                array_splice($t_issue_parents, $k, 1);
                $t_cycle_ids = array();
            } else {
                $k++;
            }
            if (count($t_issue_ids) <= $k) {
                $k = 0;
            }
        }
        $t_count_ids = count($t_issue_set_ids);
        for ($j = 0; $j < $t_count_ids; $j++) {
            $t_issue_set_id = $t_issue_set_ids[$j];
            $t_issue_set_level = $t_issue_set_levels[$j];
            helper_call_custom_function('roadmap_print_issue', array($t_issue_set_id, $t_issue_set_level));
            $t_issues_found = true;
        }
        if ($t_issues_planned > 0) {
            echo '<br />';
            echo sprintf(lang_get('resolved_progress'), $t_issues_resolved, $t_issues_planned, $t_progress);
            echo '<br /></tt>';
        }
    }
}
if (!$t_issues_found) {
    if (access_has_project_level(config_get('manage_project_threshold'), $t_project_id_for_access_check)) {
        $t_string = 'roadmap_empty_manager';
    } else {
        $t_string = 'roadmap_empty';
    }
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:roadmap_page.php


示例17: write_bug_rows

/**
 * Output Bug Rows
 *
 * @param array array of bug objects
 */
function write_bug_rows($p_rows)
{
    global $t_columns, $t_filter;
    $t_in_stickies = $t_filter && 'on' == $t_filter[FILTER_PROPERTY_STICKY];
    # pre-cache custom column data
    columns_plugin_cache_issue_data($p_rows);
    # -- Loop over bug rows --
    $t_rows = count($p_rows);
    for ($i = 0; $i < $t_rows; $i++) {
        $t_row = $p_rows[$i];
        if (0 == $t_row->sticky && 0 == $i) {
            $t_in_stickies = false;
        }
        if (0 == $t_row->sticky && $t_in_stickies) {
            # demarcate stickies, if any have been shown
            ?>
		   <tr>
				   <td class="left" colspan="<?php 
            echo count($t_columns);
            ?>
" bgcolor="#999999">&#160;</td>
		   </tr>
<?php 
            $t_in_stickies = false;
        }
        # choose color based on status
        $status_label = html_get_status_css_class($t_row->status, auth_get_current_user_id(), $t_row->project_id);
        echo '<tr class="' . $status_label . '">';
        $t_column_value_function = 'print_column_value';
        foreach ($t_columns as $t_column) {
            helper_call_custom_function($t_column_value_function, array($t_column, $t_row));
        }
        echo '</tr>';
    }
}
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:40,代码来源:view_all_inc.php


示例18: write_bug_rows

function write_bug_rows($p_rows)
{
    global $t_columns, $t_filter;
    $t_in_stickies = $t_filter && 'on' == $t_filter['sticky_issues'];
    mark_time('begin loop');
    # -- Loop over bug rows --
    $t_rows = sizeof($p_rows);
    for ($i = 0; $i < $t_rows; $i++) {
        $t_row = $p_rows[$i];
        if (0 == $t_row['sticky'] && 0 == $i) {
            $t_in_stickies = false;
        }
        if (0 == $t_row['sticky'] && $t_in_stickies) {
            # demarcate stickies, if any have been shown
            ?>
               <tr>
                       <td class="left" colspan="<?php 
            echo sizeof($t_columns);
            ?>
" bgcolor="#999999">&nbsp;</td>
               </tr>
<?php 
            $t_in_stickies = false;
        }
        # choose color based on status
        $status_color = get_status_color($t_row['status']);
        echo '<tr bgcolor="', $status_color, '" border="1">';
        foreach ($t_columns as $t_column) {
            $t_column_value_function = 'print_column_value';
            helper_call_custom_function($t_column_value_function, array($t_column, $t_row));
        }
        echo '</tr>';
    }
}
开发者ID:jin255ff,项目名称:company_website,代码行数:34,代码来源:view_all_inc.php


示例19: csv_get_columns

function csv_get_columns()
{
    $t_columns = helper_call_custom_function('get_columns_to_view', array(COLUMNS_TARGET_CSV_PAGE));
    return $t_columns;
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:5,代码来源:csv_api.php


示例20: add_bug


//.........这里部分代码省略.........
         $t_bug_data->reporter_id = $p_email['Reporter_id'];
         // This function might do stuff that EmailReporting cannot handle. Disabled
         //helper_call_custom_function( 'issue_create_validate', array( $t_bug_data ) );
         // @TODO@ Disabled for now but possibly needed for other future features
         # Validate the custom fields before adding the bug.
         /*			$t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug_data->project_id );
         			foreach( $t_related_custom_field_ids as $t_id )
         			{
         				$t_def = custom_field_get_definition( $t_id );
         
         				# Produce an error if the field is required but wasn't posted
         				if ( !gpc_isset_custom_field( $t_id, $t_def['type'] ) &&
         					( $t_def['require_report'] ||
         						$t_def['type'] == CUSTOM_FIELD_TYPE_ENUM ||
         						$t_def['type'] == CUSTOM_FIELD_TYPE_LIST ||
         						$t_def['type'] == CUSTOM_FIELD_TYPE_MULTILIST ||
         						$t_def['type'] == CUSTOM_FIELD_TYPE_RADIO ) ) {
         					error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
         					trigger_error( ERROR_EMPTY_FIELD, ERROR );
         				}
         				if ( !custom_field_validate( $t_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], NULL ) ) )
         				{
         					error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
         					trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
         				}
         			}*/
         # Allow plugins to pre-process bug data
         $t_bug_data = event_signal('EVENT_REPORT_BUG_DATA', $t_bug_data);
         $t_bug_data = event_signal('EVENT_ERP_REPORT_BUG_DATA', $t_bug_data);
         # Create the bug
         $t_bug_id = $t_bug_data->create();
         // @TODO@ Disabled for now but possibly needed for other future features
         # Handle custom field submission
         /*			foreach( $t_related_custom_field_ids as $t_id )
         {
         				# Do not set custom field value if user has no write access.
         				if( !custom_field_has_write_access( $t_id, $t_bug_id ) )
         				{
         					continue;
         				}
         
         				$t_def = custom_field_get_definition( $t_id );
         				if( !custom_field_set_value( $t_id, $t_bug_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], '' ), false ) ) {
         				{
         					error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
         					trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
         				}
         			}*/
         // Lets link a readonly already existing bug to the newly created one
         if ($f_master_bug_id > 0) {
             $f_rel_type = BUG_RELATED;
             # update master bug last updated
             bug_update_date($f_master_bug_id);
             # Add the relationship
             relationship_add($t_bug_id, $f_master_bug_id, $f_rel_type);
             # Add log line to the history (both issues)
             history_log_event_special($f_master_bug_id, BUG_ADD_RELATIONSHIP, relationship_get_complementary_type($f_rel_type), $t_bug_id);
             history_log_event_special($t_bug_id, BUG_ADD_RELATIONSHIP, $f_rel_type, $f_master_bug_id);
             # Send the email notificat 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP helper_ensure_confirmed函数代码示例发布时间:2022-05-15
下一篇:
PHP helper_begin_long_process函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap