X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpage%2FWikiPage.php;h=931740ca8092316b604b49265373ab92441e1e08;hb=6497541c9c089966ce7d3b0e0abd6b68192d30d8;hp=cd0fa8be22e0bce5a6645f41b84a1a15f38b5d28;hpb=6c1cfca4c3536e05008e51f5754900574c36adb4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index cd0fa8be22..931740ca80 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -50,13 +50,23 @@ class WikiPage implements Page, IDBAccessObject { */ public $mTitle = null; - /**@{{ + /** + * @var bool + * @protected + */ + public $mDataLoaded = false; + + /** + * @var bool + * @protected + */ + public $mIsRedirect = false; + + /** + * @var int|false False means "not loaded" * @protected */ - public $mDataLoaded = false; // !< Boolean - public $mIsRedirect = false; // !< Boolean - public $mLatest = false; // !< Integer (false means "not loaded") - /**@}}*/ + public $mLatest = false; /** @var PreparedEdit Map of cache fields (text, parser output, ect) for a proposed/new edit */ public $mPreparedEdit = false; @@ -2726,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, @@ -2735,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', @@ -2987,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 @@ -3592,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' ];