From e475d25481217cfa2df1d8b83fa1141a59d0fc19 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Fri, 6 Jul 2007 09:06:55 +0000 Subject: [PATCH] changed updateArticle to doEdit. This is first of a large series of changes we must do to enable api commits. --- includes/Article.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/Article.php b/includes/Article.php index 9f3795e749..0cb007abde 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2262,7 +2262,11 @@ class Article { $wgOut->setRobotpolicy( 'noindex,nofollow' ); $wgOut->addHTML( '

' . htmlspecialchars( $newComment ) . "

\n
\n" ); - $this->updateArticle( $target->getText(), $newComment, 1, $this->mTitle->userIsWatching(), $bot ); + $flags = EDIT_UPDATE | EDIT_MINOR; + if($bot) + $flags |= EDIT_FORCE_BOT; + if(!$this->doEdit( $target->getText(), $newComment, $flags)) + ; # todo: this error case has not been handled? Use db transactions? $wgOut->returnToMain( false ); } -- 2.20.1