From 55d6855e0e4f349870d4fd2a4b0df0c754454ca7 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Mon, 21 Mar 2011 18:41:46 +0000 Subject: [PATCH] Removed Article::insertNewArticle() and Article::updateArticle() - deprecated in 1.7(!), unused --- includes/Article.php | 72 -------------------------------------------- 1 file changed, 72 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 5fc675f7a8..6d3618de1b 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1935,78 +1935,6 @@ class Article { return $text; } - /** - * @deprecated since 1.7 use Article::doEdit() - */ - function insertNewArticle( $text, $summary, $isminor, $watchthis, $suppressRC = false, $comment = false, $bot = false ) { - wfDeprecated( __METHOD__ ); - - $flags = EDIT_NEW | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY | - ( $isminor ? EDIT_MINOR : 0 ) | - ( $suppressRC ? EDIT_SUPPRESS_RC : 0 ) | - ( $bot ? EDIT_FORCE_BOT : 0 ); - - # If this is a comment, add the summary as headline - if ( $comment && $summary != "" ) { - $text = wfMsgForContent( 'newsectionheaderdefaultlevel', $summary ) . "\n\n" . $text; - } - $this->doEdit( $text, $summary, $flags ); - - $dbw = wfGetDB( DB_MASTER ); - if ( $watchthis ) { - if ( !$this->mTitle->userIsWatching() ) { - $dbw->begin(); - $this->doWatch(); - $dbw->commit(); - } - } else { - if ( $this->mTitle->userIsWatching() ) { - $dbw->begin(); - $this->doUnwatch(); - $dbw->commit(); - } - } - $this->doRedirect( $this->isRedirect( $text ) ); - } - - /** - * @deprecated since 1.7 use Article::doEdit() - */ - function updateArticle( $text, $summary, $minor, $watchthis, $forceBot = false, $sectionanchor = '' ) { - wfDeprecated( __METHOD__ ); - - $flags = EDIT_UPDATE | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY | - ( $minor ? EDIT_MINOR : 0 ) | - ( $forceBot ? EDIT_FORCE_BOT : 0 ); - - $status = $this->doEdit( $text, $summary, $flags ); - - if ( !$status->isOK() ) { - return false; - } - - $dbw = wfGetDB( DB_MASTER ); - if ( $watchthis ) { - if ( !$this->mTitle->userIsWatching() ) { - $dbw->begin(); - $this->doWatch(); - $dbw->commit(); - } - } else { - if ( $this->mTitle->userIsWatching() ) { - $dbw->begin(); - $this->doUnwatch(); - $dbw->commit(); - } - } - - $extraQuery = ''; // Give extensions a chance to modify URL query on update - wfRunHooks( 'ArticleUpdateBeforeRedirect', array( $this, &$sectionanchor, &$extraQuery ) ); - - $this->doRedirect( $this->isRedirect( $text ), $sectionanchor, $extraQuery ); - return true; - } - /** * Check flags and add EDIT_NEW or EDIT_UPDATE to them as needed. * @param $flags Int -- 2.20.1