Victorbarbu has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/329138 )
Change subject: Replace some usages of &$this in Hooks::run ...................................................................... Replace some usages of &$this in Hooks::run Bug: T153505 Change-Id: I0862476a39a1c3206a84f79c1b8f7db41bc47959 --- M includes/actions/FormAction.php M includes/actions/HistoryAction.php 2 files changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/38/329138/1 diff --git a/includes/actions/FormAction.php b/includes/actions/FormAction.php index e94a188..e34cf27 100644 --- a/includes/actions/FormAction.php +++ b/includes/actions/FormAction.php @@ -66,7 +66,8 @@ $this->fields = $this->getFormFields(); // Give hooks a chance to alter the form, adding extra fields or text etc - Hooks::run( 'ActionModifyFormFields', [ $this->getName(), &$this->fields, $this->page ] ); + $formAction = $this; + Hooks::run( 'ActionModifyFormFields', [ $this->getName(), &$formAction->fields, $this->page ] ); $form = new HTMLForm( $this->fields, $this->getContext(), $this->getName() ); $form->setSubmitCallback( [ $this, 'onSubmit' ] ); diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index 767a163..5c17cf1 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -210,7 +210,8 @@ '</fieldset></form>' ); - Hooks::run( 'PageHistoryBeforeList', [ &$this->page, $this->getContext() ] ); + $historyAction = $this; + Hooks::run( 'PageHistoryBeforeList', [ &$historyAction->page, $this->getContext() ] ); // Create and output the list. $pager = new HistoryPager( $this, $year, $month, $tagFilter, $conds ); @@ -428,7 +429,9 @@ $queryInfo['options'], $this->tagFilter ); - Hooks::run( 'PageHistoryPager::getQueryInfo', [ &$this, &$queryInfo ] ); + + $historyAction = $this; + Hooks::run( 'PageHistoryPager::getQueryInfo', [ &$historyAction, &$queryInfo ] ); return $queryInfo; } -- To view, visit https://gerrit.wikimedia.org/r/329138 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0862476a39a1c3206a84f79c1b8f7db41bc47959 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Victorbarbu <victorbarb...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits