http://www.mediawiki.org/wiki/Special:Code/MediaWiki/84472
Revision: 84472
Author: maxsem
Date: 2011-03-21 18:41:46 +0000 (Mon, 21 Mar 2011)
Log Message:
-----------
Removed Article::insertNewArticle() and Article::updateArticle() - deprecated
in 1.7(!), unused
Modified Paths:
--------------
trunk/phase3/includes/Article.php
Modified: trunk/phase3/includes/Article.php
===================================================================
--- trunk/phase3/includes/Article.php 2011-03-21 18:40:01 UTC (rev 84471)
+++ trunk/phase3/includes/Article.php 2011-03-21 18:41:46 UTC (rev 84472)
@@ -1936,78 +1936,6 @@
}
/**
- * @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
* @return Int updated $flags
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs