http://www.mediawiki.org/wiki/Special:Code/MediaWiki/84642
Revision: 84642
Author: laner
Date: 2011-03-23 22:13:09 +0000 (Wed, 23 Mar 2011)
Log Message:
-----------
Removing pass by reference, and making the $error argument for doDeleteArticle
a reference. Follow up for r84638.
Modified Paths:
--------------
trunk/phase3/includes/Article.php
trunk/phase3/includes/api/ApiDelete.php
Modified: trunk/phase3/includes/Article.php
===================================================================
--- trunk/phase3/includes/Article.php 2011-03-23 22:01:15 UTC (rev 84641)
+++ trunk/phase3/includes/Article.php 2011-03-23 22:13:09 UTC (rev 84642)
@@ -3052,7 +3052,7 @@
$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 @@
* @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" );
Modified: trunk/phase3/includes/api/ApiDelete.php
===================================================================
--- trunk/phase3/includes/api/ApiDelete.php 2011-03-23 22:01:15 UTC (rev
84641)
+++ trunk/phase3/includes/api/ApiDelete.php 2011-03-23 22:13:09 UTC (rev
84642)
@@ -147,7 +147,7 @@
$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() ) );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs