Skip to content

Commit accf2a3

Browse files
jenkins-botGerrit Code Review
authored andcommitted
Merge "Avoid globals in EditPage::__construct()"
2 parents 43a548a + 4fa0c27 commit accf2a3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

includes/EditPage.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,6 @@ class EditPage {
422422
* @param Article $article
423423
*/
424424
public function __construct( Article $article ) {
425-
global $wgOOUIEditPage;
426-
427425
$this->mArticle = $article;
428426
$this->page = $article->getPage(); // model object
429427
$this->mTitle = $article->getTitle();
@@ -434,7 +432,7 @@ public function __construct( Article $article ) {
434432
$handler = ContentHandler::getForModelID( $this->contentModel );
435433
$this->contentFormat = $handler->getDefaultFormat();
436434

437-
$this->oouiEnabled = $wgOOUIEditPage;
435+
$this->oouiEnabled = $this->context->getConfig()->get( 'OOUIEditPage' );
438436
}
439437

440438
/**

0 commit comments

Comments
 (0)