Stop calling FileRepo->streamFile()
[lhc/web/wiklou.git] / includes / page / WikiPage.php
index 4b0e503..931740c 100644 (file)
@@ -2736,6 +2736,8 @@ class WikiPage implements Page, IDBAccessObject {
                        $dbw->endAtomic( __METHOD__ );
 
                        $jobParams = [
+                               'namespace' => $this->getTitle()->getNamespace(),
+                               'title' => $this->getTitle()->getDBkey(),
                                'wikiPageId' => $id,
                                'requestId' => $webRequestId ?? WebRequest::getRequestId(),
                                'reason' => $reason,
@@ -2745,7 +2747,7 @@ class WikiPage implements Page, IDBAccessObject {
                                'logsubtype' => $logsubtype,
                        ];
 
-                       $job = new DeletePageJob( $this->getTitle(), $jobParams );
+                       $job = new DeletePageJob( $jobParams );
                        JobQueueGroup::singleton()->push( $job );
 
                        $status->warning( 'delete-scheduled',
@@ -2997,7 +2999,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @param Content|null $content Page content to be used when determining
         *   the required updates. This may be needed because $this->getContent()
         *   may already return null when the page proper was deleted.
-        * @param RevisionRecord|Revision|null $revision The current page revision at the time of
+        * @param Revision|null $revision The current page revision at the time of
         *   deletion, used when determining the required updates. This may be needed because
         *   $this->getRevision() may already return null when the page proper was deleted.
         * @param User|null $user The user that caused the deletion
@@ -3602,7 +3604,8 @@ class WikiPage implements Page, IDBAccessObject {
         */
        public function updateCategoryCounts( array $added, array $deleted, $id = 0 ) {
                $id = $id ?: $this->getId();
-               $type = MWNamespace::getCategoryLinkType( $this->getTitle()->getNamespace() );
+               $type = MediaWikiServices::getInstance()->getNamespaceInfo()->
+                       getCategoryLinkType( $this->getTitle()->getNamespace() );
 
                $addFields = [ 'cat_pages = cat_pages + 1' ];
                $removeFields = [ 'cat_pages = cat_pages - 1' ];