From: Yuri Astrakhan Date: Fri, 6 Jul 2007 09:06:55 +0000 (+0000) Subject: changed updateArticle to doEdit. This is first of a large series of changes we must... X-Git-Tag: 1.31.0-rc.0~52249 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=e475d25481217cfa2df1d8b83fa1141a59d0fc19;p=lhc%2Fweb%2Fwiklou.git changed updateArticle to doEdit. This is first of a large series of changes we must do to enable api commits. --- 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 ); }