From 22738578272f4de7f14de34a8a6c48d3f8d0822d Mon Sep 17 00:00:00 2001 From: Ryan Lane Date: Wed, 23 Mar 2011 22:13:09 +0000 Subject: [PATCH] Removing pass by reference, and making the $error argument for doDeleteArticle a reference. Follow up for r84638. --- includes/Article.php | 4 ++-- includes/api/ApiDelete.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 3ce95b6c4b..e950a031c9 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -3052,7 +3052,7 @@ class Article { $id = $this->mTitle->getArticleID( Title::GAID_FOR_UPDATE ); $error = ''; - if ( $this->doDeleteArticle( $reason, $suppress, $id, &$error ) ) { + if ( $this->doDeleteArticle( $reason, $suppress, $id, $error ) ) { $deleted = $this->mTitle->getPrefixedText(); $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) ); @@ -3099,7 +3099,7 @@ class Article { * @param $commit boolean defaults to true, triggers transaction end * @return boolean true if successful */ - public function doDeleteArticle( $reason, $suppress = false, $id = 0, $commit = true, $error='' ) { + public function doDeleteArticle( $reason, $suppress = false, $id = 0, $commit = true, &$error='' ) { global $wgDeferredUpdateList, $wgUseTrackbacks; wfDebug( __METHOD__ . "\n" ); diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php index d05723e5e0..0eba21956c 100644 --- a/includes/api/ApiDelete.php +++ b/includes/api/ApiDelete.php @@ -147,7 +147,7 @@ class ApiDelete extends ApiBase { $error = ''; // Luckily, Article.php provides a reusable delete function that does the hard work for us - if ( $article->doDeleteArticle( $reason, false, 0, true, &$error ) ) { + if ( $article->doDeleteArticle( $reason, false, 0, true, $error ) ) { return array(); } else { return array( array( 'cannotdelete', $article->mTitle->getPrefixedText() ) ); -- 2.20.1