Merge "Use normal lint error updating logic for page deletions"

This commit is contained in:
jenkins-bot 2018-02-19 12:33:29 +00:00 committed by Gerrit Code Review
commit 13dfbf4ee9
2 changed files with 9 additions and 5 deletions

View file

@ -81,10 +81,12 @@ class Hooks {
public static function onWikiPageDeletionUpdates( WikiPage $wikiPage,
Content $content, array &$updates
) {
$id = $wikiPage->getId();
$updates[] = new MWCallableUpdate( function () use ( $id ) {
$database = new Database( $id );
$database->setForPage( [] );
$title = $wikiPage->getTitle();
$updates[] = new MWCallableUpdate( function () use ( $title ) {
$job = new RecordLintJob(
$title, [ 'errors' => [] ]
);
$job->run();
}, __METHOD__ );
}

View file

@ -35,7 +35,9 @@ class RecordLintJob extends Job {
}
public function run() {
if ( $this->title->getLatestRevID() != $this->params['revision'] ) {
if ( isset( $this->params['revision'] )
&& $this->title->getLatestRevID() != $this->params['revision']
) {
// Outdated now, let a later job handle it
return true;
}