Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/107615
Change subject: Remove DeletePagesJob::build() ...................................................................... Remove DeletePagesJob::build() Pointless wrapper when we only call it once Change-Id: Ia358c844bbbd71ff63e08e2105c658e14289ae49 --- M includes/DeletePagesJob.php M includes/Hooks.php 2 files changed, 3 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/15/107615/1 diff --git a/includes/DeletePagesJob.php b/includes/DeletePagesJob.php index 1a86166..4a533ea 100644 --- a/includes/DeletePagesJob.php +++ b/includes/DeletePagesJob.php @@ -21,15 +21,6 @@ * http://www.gnu.org/copyleft/gpl.html */ class DeletePagesJob extends Job { - /** - * Build this job for just one title. - * @param $title Title title - * @param $id int article id of title - */ - public static function build( $title, $id ) { - return new DeletePagesJob( $title, array( 'id' => $id ) ); - } - protected function doJob() { global $wgCirrusSearchClientSideUpdateTimeout; diff --git a/includes/Hooks.php b/includes/Hooks.php index b5b48e2..0e51d0b 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -81,8 +81,9 @@ public static function articleDeleteCompleteHook( $page, $user, $reason, $id ) { // Note that we must use the article id provided or it'll be lost in the ether. The job can't // load it from the title because the page row has already been deleted. - JobQueueGroup::singleton()->push( DeletePagesJob::build( - $page->getTitle(), $id ) ); + JobQueueGroup::singleton()->push( + new DeletePagesJob( $page->getTitle(), array( 'id' => $id ) ) + ); } /** -- To view, visit https://gerrit.wikimedia.org/r/107615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia358c844bbbd71ff63e08e2105c658e14289ae49 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Chad <ch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits