You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
438 B
PHP

<?php
namespace Isekai\AIReview;
use MediaWiki\MediaWikiServices;
use MediaWiki\Title\Title;
class Hooks {
public static function onModerationPending($fields, $mod_id){
//加入审核队列
$title = Title::newFromText($fields['mod_title']);
$job = new AIReviewJob($title, ['mod_id' => $mod_id]);
$jobQueue = MediaWikiServices::getInstance()->getJobQueueGroup();
$jobQueue->push($job);
}
}