TheDJ has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/125951

Change subject: [Do not merge] Do not pass editpage by reference in hooks
......................................................................

[Do not merge] Do not pass editpage by reference in hooks

This requires cleanup in the extensions.

Change-Id: I31cea1f7c1420524516ae73564280cbce21c3339
---
M docs/hooks.txt
M includes/EditPage.php
2 files changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/51/125951/1

diff --git a/docs/hooks.txt b/docs/hooks.txt
index a9bc736..e02cc7a 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -1037,18 +1037,18 @@
 this case you're responsible for computing and outputting the entire "conflict"
 part, i.e., the "difference between revisions" and "your text" headers and
 sections.
-&$editor: EditPage instance
+$editor: EditPage instance
 &$out: OutputPage instance
 
 'EditPageBeforeEditButtons': Allows modifying the edit buttons below the
 textarea in the edit form.
-&$editpage: The current EditPage object
+$editpage: The current EditPage object
 &$buttons: Array of edit buttons "Save", "Preview", "Live", and "Diff"
 &$tabindex: HTML tabindex of the last edit check/button
 
 'EditPageBeforeEditChecks': Allows modifying the edit checks below the textarea
 in the edit form.
-&$editpage: The current EditPage object
+$editpage: The current EditPage object
 &$checks: Array of edit checks like "watch this page"/"minor edit"
 &$tabindex: HTML tabindex of the last edit check/button
 
@@ -1089,7 +1089,7 @@
 &$content: Content object to be previewed (may be replaced by hook function)
 
 'EditPageNoSuchSection': When a section edit request is given for an 
non-existent section
-&$editpage: The current EditPage object
+$editpage: The current EditPage object
 &$res: the HTML of the error text
 
 'EditPageTosSummary': Give a chance for site and per-namespace customizations
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 61995f2..a25ca53 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -2221,7 +2221,7 @@
                        $previewOutput = $this->getPreviewText();
                }
 
-               wfRunHooks( 'EditPage::showEditForm:initial', array( &$this, 
&$wgOut ) );
+               wfRunHooks( 'EditPage::showEditForm:initial', array( $this, 
&$wgOut ) );
 
                $this->setHeaders();
 
@@ -2268,7 +2268,7 @@
                        . Xml::closeElement( 'div' )
                );
 
-               wfRunHooks( 'EditPage::showEditForm:fields', array( &$this, 
&$wgOut ) );
+               wfRunHooks( 'EditPage::showEditForm:fields', array( $this, 
&$wgOut ) );
 
                // Put these up at the top to ensure they aren't lost on early 
form submission
                $this->showFormBeforeText();
@@ -3062,7 +3062,7 @@
        protected function showConflict() {
                global $wgOut;
 
-               if ( wfRunHooks( 'EditPageBeforeConflictDiff', array( &$this, 
&$wgOut ) ) ) {
+               if ( wfRunHooks( 'EditPageBeforeConflictDiff', array( $this, 
&$wgOut ) ) ) {
                        $wgOut->wrapWikiMsg( '<h2>$1</h2>', "yourdiff" );
 
                        $content1 = $this->toEditContent( $this->textbox1 );
@@ -3534,7 +3534,7 @@
                                Xml::expandAttributes( array( 'title' => 
Linker::titleAttrib( 'watch', 'withaccess' ) ) ) .
                                ">{$watchLabel}</label>";
                }
-               wfRunHooks( 'EditPageBeforeEditChecks', array( &$this, 
&$checkboxes, &$tabindex ) );
+               wfRunHooks( 'EditPageBeforeEditChecks', array( $this, 
&$checkboxes, &$tabindex ) );
                return $checkboxes;
        }
 
@@ -3584,7 +3584,7 @@
                );
                $buttons['diff'] = Xml::element( 'input', $temp, '' );
 
-               wfRunHooks( 'EditPageBeforeEditButtons', array( &$this, 
&$buttons, &$tabindex ) );
+               wfRunHooks( 'EditPageBeforeEditButtons', array( $this, 
&$buttons, &$tabindex ) );
                return $buttons;
        }
 
@@ -3662,7 +3662,7 @@
                $wgOut->prepareErrorPage( wfMessage( 'nosuchsectiontitle' ) );
 
                $res = wfMessage( 'nosuchsectiontext', $this->section 
)->parseAsBlock();
-               wfRunHooks( 'EditPageNoSuchSection', array( &$this, &$res ) );
+               wfRunHooks( 'EditPageNoSuchSection', array( $this, &$res ) );
                $wgOut->addHTML( $res );
 
                $wgOut->returnToMain( false, $this->mTitle );

-- 
To view, visit https://gerrit.wikimedia.org/r/125951
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I31cea1f7c1420524516ae73564280cbce21c3339
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to