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


PHP bug_delete函数代码示例

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


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

示例1: Copyright

<?php

# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
# Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
# 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

示例2: helper_call_custom_function

     if (access_can_close_bug($t_bug)) {
         if ($t_status < $t_closed && bug_check_workflow($t_status, $t_closed)) {
             # @todo we need to issue a helper_call_custom_function( 'issue_update_validate', array( $f_bug_id, $t_bug_data, $f_bugnote_text ) );
             bug_close($t_bug_id, $f_bug_notetext, $f_bug_noteprivate);
             helper_call_custom_function('issue_update_notify', array($t_bug_id));
         } else {
             $t_failed_ids[$t_bug_id] = lang_get('bug_actiongroup_status');
         }
     } else {
         $t_failed_ids[$t_bug_id] = lang_get('bug_actiongroup_access');
     }
     break;
 case 'DELETE':
     if (access_has_bug_level(config_get('delete_bug_threshold'), $t_bug_id)) {
         event_signal('EVENT_BUG_DELETED', array($t_bug_id));
         bug_delete($t_bug_id);
     } else {
         $t_failed_ids[$t_bug_id] = lang_get('bug_actiongroup_access');
     }
     break;
 case 'MOVE':
     $f_project_id = gpc_get_int('project_id');
     if (access_has_bug_level(config_get('move_bug_threshold'), $t_bug_id) && access_has_project_level(config_get('report_bug_threshold', null, null, $f_project_id), $f_project_id)) {
         # @todo we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) );
         bug_move($t_bug_id, $f_project_id);
         helper_call_custom_function('issue_update_notify', array($t_bug_id));
     } else {
         $t_failed_ids[$t_bug_id] = lang_get('bug_actiongroup_access');
     }
     break;
 case 'COPY':
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:bug_actiongroup.php

示例3: bug_delete_all

/**
 * Delete all bugs associated with a project
 * @param array p_project_id integer representing a projectid
 * @return bool always true
 * @access public
 * @uses database_api.php
 */
function bug_delete_all($p_project_id)
{
    $c_project_id = (int) $p_project_id;
    $t_bug_table = db_get_table('mantis_bug_table');
    $query = "SELECT id\n\t\t\t\t  FROM {$t_bug_table}\n\t\t\t\t  WHERE project_id=" . db_param();
    $result = db_query_bound($query, array($c_project_id));
    $bug_count = db_num_rows($result);
    for ($i = 0; $i < $bug_count; $i++) {
        $row = db_fetch_array($result);
        bug_delete($row['id']);
    }
    # @todo should we check the return value of each bug_delete() and
    #  return false if any of them return false? Presumable bug_delete()
    #  will eventually trigger an error on failure so it won't matter...
    return true;
}
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:23,代码来源:bug_api.php

示例4: mc_issue_delete

/**
 * Delete the specified issue.
 *
 * @param string  $p_username The name of the user trying to delete the issue.
 * @param string  $p_password The password of the user.
 * @param integer $p_issue_id The id of the issue to delete.
 * @return boolean True if the issue has been deleted successfully, false otherwise.
 */
function mc_issue_delete($p_username, $p_password, $p_issue_id)
{
    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 . '\' does not exist.');
    }
    $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);
    }
    if (!access_has_bug_level(config_get('delete_bug_threshold'), $p_issue_id, $t_user_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    log_event(LOG_WEBSERVICE, 'deleting issue \'' . $p_issue_id . '\'');
    return bug_delete($p_issue_id);
}
开发者ID:elmarculino,项目名称:mantisbt,代码行数:29,代码来源:mc_issue_api.php

示例5: news_delete

     $delete_successful = true;
     break;
 case "delete_news_post":
     news_delete($_POST['confirm_project_id'], $_POST['confirm_id']);
     $delete_successful = true;
     break;
 case "remove_bug_category_from_project":
     project_remove_bug_category($_POST['confirm_project_id'], $_POST['confirm_id']);
     $delete_successful = true;
     break;
 case "remove_bug_component_from_project":
     project_remove_bug_component($_POST['confirm_project_id'], $_POST['confirm_id']);
     $delete_successful = true;
     break;
 case "delete_bug":
     bug_delete($_POST['confirm_id']);
     $delete_successful = true;
     break;
 case "delete_bugnote":
     bug_delete_bugnote($_POST['confirm_id']);
     $delete_successful = true;
     break;
 case "delete_bug_assoc":
     bug_delete_bug_assoc($_POST['confirm_id']);
     $delete_successful = true;
     break;
 case "delete_testplan":
     testset_delete_test_plan($_POST['confirm_id']);
     $delete_successful = true;
     break;
 case "delete_uploaded_testrun_document":
开发者ID:nourchene-benslimane,项目名称:rth_backup,代码行数:31,代码来源:delete_page.php

示例6: mc_issue_delete

/**
 * Delete the specified issue.
 *
 * @param string $p_username  The name of the user trying to delete the issue.
 * @param string $p_password  The password of the user.
 * @param integer $p_issue_id  The id of the issue to delete.
 * @return boolean  True if the issue has been deleted successfully, false otherwise.
 */
function mc_issue_delete( $p_username, $p_password, $p_issue_id ) {
	$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 new soap_fault( 'Client', '', "Issue '$p_issue_id' does not exist.");
	}

	$t_project_id = bug_get_field( $p_issue_id, 'project_id' );
	if( !mci_has_readwrite_access( $t_user_id, $t_project_id ) ) {
		return mci_soap_fault_access_denied( $t_user_id );
	}

	return bug_delete( $p_issue_id );
}
开发者ID:rombert,项目名称:mantisbt,代码行数:25,代码来源:mc_issue_api.php

示例7: bug_delete_all

/**
 * Delete all bugs associated with a project
 * @param integer $p_project_id Integer representing a project identifier.
 * @access public
 * @uses database_api.php
 * @return void
 */
function bug_delete_all( $p_project_id ) {
	$c_project_id = (int)$p_project_id;

	$t_query = 'SELECT id FROM {bug} WHERE project_id=' . db_param();
	$t_result = db_query( $t_query, array( $c_project_id ) );

	while( $t_row = db_fetch_array( $t_result ) ) {
		bug_delete( $t_row['id'] );
	}

	# @todo should we check the return value of each bug_delete() and
	#  return false if any of them return false? Presumable bug_delete()
	#  will eventually trigger an error on failure so it won't matter...
}
开发者ID:01-Scripts,项目名称:mantisbt,代码行数:21,代码来源:bug_api.php

示例8: mc_issue_delete

/**
 * Delete the specified issue.
 *
 * @param string $p_username  The name of the user trying to delete the issue.
 * @param string $p_password  The password of the user.
 * @param integer $p_issue_id  The id of the issue to delete.
 * @return boolean  True if the issue has been deleted successfully, false otherwise.
 */
function mc_issue_delete($p_username, $p_password, $p_issue_id)
{
    $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}' does not exist.");
    }
    $t_project_id = bug_get_field($p_issue_id, 'project_id');
    if (!mci_has_readwrite_access($t_user_id, $t_project_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    if (!access_has_bug_level(config_get('delete_bug_threshold'), $p_issue_id, $t_user_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    return bug_delete($p_issue_id);
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:26,代码来源:mc_issue_api.php

示例9: bug_delete_all

function bug_delete_all($p_project_id)
{
    $c_project_id = db_prepare_int($p_project_id);
    $t_bug_table = config_get('mantis_bug_table');
    $query = "SELECT id\r\n\t\t\t\t  FROM {$t_bug_table}\r\n\t\t\t\t  WHERE project_id='{$c_project_id}'";
    $result = db_query($query);
    $bug_count = db_num_rows($result);
    for ($i = 0; $i < $bug_count; $i++) {
        $row = db_fetch_array($result);
        bug_delete($row['id']);
    }
    # @@@ should we check the return value of each bug_delete() and
    #  return false if any of them return false? Presumable bug_delete()
    #  will eventually trigger an error on failure so it won't matter...
    return true;
}
开发者ID:amjadtbssm,项目名称:website,代码行数:16,代码来源:bug_api.php


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