[MediaWiki-commits] [Gerrit] mediawiki...CategoryTree[master]: Avoid $wgOut and $wgRequest
jenkins-bot has submitted this change and it was merged. Change subject: Avoid $wgOut and $wgRequest .. Avoid $wgOut and $wgRequest CategoryViewer extends ContextSource. Change-Id: I90ca064ee2af6a93d5d4f55fe90cf2fa792eab21 --- M CategoryPageSubclass.php 1 file changed, 3 insertions(+), 5 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/CategoryPageSubclass.php b/CategoryPageSubclass.php index f71f261..13ea08e 100644 --- a/CategoryPageSubclass.php +++ b/CategoryPageSubclass.php @@ -16,11 +16,11 @@ * @return CategoryTree */ function getCategoryTree() { - global $wgOut, $wgCategoryTreeCategoryPageOptions, $wgCategoryTreeForceHeaders; + global $wgCategoryTreeCategoryPageOptions, $wgCategoryTreeForceHeaders; if ( !isset( $this->categorytree ) ) { if ( !$wgCategoryTreeForceHeaders ) { - CategoryTree::setHeaders( $wgOut ); + CategoryTree::setHeaders( $this->getOutput() ); } $this->categorytree = new CategoryTree( $wgCategoryTreeCategoryPageOptions ); @@ -36,11 +36,9 @@ * @param $pageLength */ function addSubcategoryObject( Category $cat, $sortkey, $pageLength ) { - global $wgRequest; - $title = $cat->getTitle(); - if ( $wgRequest->getCheck( 'notree' ) ) { + if ( $this->getRequest()->getCheck( 'notree' ) ) { parent::addSubcategoryObject( $cat, $sortkey, $pageLength ); return; } -- To view, visit https://gerrit.wikimedia.org/r/320340 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I90ca064ee2af6a93d5d4f55fe90cf2fa792eab21 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CategoryTree Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CategoryTree[master]: Avoid $wgOut and $wgRequest
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/320340 Change subject: Avoid $wgOut and $wgRequest .. Avoid $wgOut and $wgRequest CategoryViewer extends ContextSource. Change-Id: I90ca064ee2af6a93d5d4f55fe90cf2fa792eab21 --- M CategoryPageSubclass.php 1 file changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CategoryTree refs/changes/40/320340/1 diff --git a/CategoryPageSubclass.php b/CategoryPageSubclass.php index f71f261..13ea08e 100644 --- a/CategoryPageSubclass.php +++ b/CategoryPageSubclass.php @@ -16,11 +16,11 @@ * @return CategoryTree */ function getCategoryTree() { - global $wgOut, $wgCategoryTreeCategoryPageOptions, $wgCategoryTreeForceHeaders; + global $wgCategoryTreeCategoryPageOptions, $wgCategoryTreeForceHeaders; if ( !isset( $this->categorytree ) ) { if ( !$wgCategoryTreeForceHeaders ) { - CategoryTree::setHeaders( $wgOut ); + CategoryTree::setHeaders( $this->getOutput() ); } $this->categorytree = new CategoryTree( $wgCategoryTreeCategoryPageOptions ); @@ -36,11 +36,9 @@ * @param $pageLength */ function addSubcategoryObject( Category $cat, $sortkey, $pageLength ) { - global $wgRequest; - $title = $cat->getTitle(); - if ( $wgRequest->getCheck( 'notree' ) ) { + if ( $this->getRequest()->getCheck( 'notree' ) ) { parent::addSubcategoryObject( $cat, $sortkey, $pageLength ); return; } -- To view, visit https://gerrit.wikimedia.org/r/320340 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90ca064ee2af6a93d5d4f55fe90cf2fa792eab21 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CategoryTree Gerrit-Branch: master Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits