r53461 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53460‎ | r53461 | r53462 >
Date:21:47, 18 July 2009
Author:mrzman
Status:deferred
Tags:
Comment:
The EditPage object is not passed by reference in the EditFilter hooks
Modified paths:
  • /trunk/extensions/ConfirmEdit/ConfirmEdit_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmEdit/ConfirmEdit_body.php
@@ -15,11 +15,11 @@
1616 return $wgCaptcha;
1717 }
1818
19 - static function confirmEdit( &$editPage, $newtext, $section ) {
 19+ static function confirmEdit( $editPage, $newtext, $section ) {
2020 return self::getInstance()->confirmEdit( $editPage, $newtext, $section );
2121 }
2222
23 - static function confirmEditMerged( &$editPage, $newtext ) {
 23+ static function confirmEditMerged( $editPage, $newtext ) {
2424 return self::getInstance()->confirmEditMerged( $editPage, $newtext );
2525 }
2626
@@ -467,7 +467,7 @@
468468 * Backend function for confirmEdit() and confirmEditAPI()
469469 * @return bool false if the CAPTCHA is rejected, true otherwise
470470 */
471 - private function doConfirmEdit( &$editPage, $newtext, $section, $merged = false ) {
 471+ private function doConfirmEdit( $editPage, $newtext, $section, $merged = false ) {
472472 if( $this->shouldCheck( $editPage, $newtext, $section, $merged ) ) {
473473 if( $this->passCaptcha() ) {
474474 return true;
@@ -488,7 +488,7 @@
489489 * @param bool $merged
490490 * @return bool true to continue saving, false to abort and show a captcha form
491491 */
492 - function confirmEdit( &$editPage, $newtext, $section, $merged = false ) {
 492+ function confirmEdit( $editPage, $newtext, $section, $merged = false ) {
493493 if( defined('MW_API') ) {
494494 # API mode
495495 # The CAPTCHA was already checked and approved
@@ -506,7 +506,7 @@
507507 * @param EditPage $editPage
508508 * @param string $newtext
509509 */
510 - function confirmEditMerged( &$editPage, $newtext ) {
 510+ function confirmEditMerged( $editPage, $newtext ) {
511511 return $this->confirmEdit( $editPage, $newtext, false, true );
512512 }
513513

Follow-up revisions

RevisionCommit summaryAuthorDate
r68502MFT r53461: fix reference/value conflict in PHP 5.2, it affects 1.15 as much ...tstarling03:10, 24 June 2010

Status & tagging log