discuz 删除主题贴,禁止积分退回。

文件:
source\function\function_core.php
找到

function batchupdatecredit($action, $uids = 0, $extrasql = array(), $coef = 1, $fid = 0) {

	$credit = & credit::instance();
	if($extrasql) {
		$credit->extrasql = $extrasql;
	}
        return $credit->updatecreditbyrule($action, $uids, $coef, $fid);
 }

修改为:

function batchupdatecredit($action, $uids = 0, $extrasql = array(), $coef = 1, $fid = 0) {
    if (!in_array($fid,array("42"))) {

	$credit = & credit::instance();
	if($extrasql) {
		$credit->extrasql = $extrasql;
	}
        return $credit->updatecreditbyrule($action, $uids, $coef, $fid);
    }
}

或修改 \source\class\class_credit.php
找到 $this->updatemembercount($creditarr, $uids, is_array($uids) ? false : true, $this->coef > 0 ? urldecode($rule['rulenameuni']) : '')
在上面添加如下内容

			if ($coef < 1 && in_array($fid,array('96','42'))) {
				return;
			}
            $this->updatemembercount($creditarr, $uids, is_array($uids) ? false : true, $this->coef > 0 ? urldecode($rule['rulenameuni']) : '');
huan

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: