r84472 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84471‎ | r84472 | r84473 >
Date:18:41, 21 March 2011
Author:maxsem
Status:ok (Comments)
Tags:
Comment:
Removed Article::insertNewArticle() and Article::updateArticle() - deprecated in 1.7(!), unused
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1936,78 +1936,6 @@
19371937 }
19381938
19391939 /**
1940 - * @deprecated since 1.7 use Article::doEdit()
1941 - */
1942 - function insertNewArticle( $text, $summary, $isminor, $watchthis, $suppressRC = false, $comment = false, $bot = false ) {
1943 - wfDeprecated( __METHOD__ );
1944 -
1945 - $flags = EDIT_NEW | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY |
1946 - ( $isminor ? EDIT_MINOR : 0 ) |
1947 - ( $suppressRC ? EDIT_SUPPRESS_RC : 0 ) |
1948 - ( $bot ? EDIT_FORCE_BOT : 0 );
1949 -
1950 - # If this is a comment, add the summary as headline
1951 - if ( $comment && $summary != "" ) {
1952 - $text = wfMsgForContent( 'newsectionheaderdefaultlevel', $summary ) . "\n\n" . $text;
1953 - }
1954 - $this->doEdit( $text, $summary, $flags );
1955 -
1956 - $dbw = wfGetDB( DB_MASTER );
1957 - if ( $watchthis ) {
1958 - if ( !$this->mTitle->userIsWatching() ) {
1959 - $dbw->begin();
1960 - $this->doWatch();
1961 - $dbw->commit();
1962 - }
1963 - } else {
1964 - if ( $this->mTitle->userIsWatching() ) {
1965 - $dbw->begin();
1966 - $this->doUnwatch();
1967 - $dbw->commit();
1968 - }
1969 - }
1970 - $this->doRedirect( $this->isRedirect( $text ) );
1971 - }
1972 -
1973 - /**
1974 - * @deprecated since 1.7 use Article::doEdit()
1975 - */
1976 - function updateArticle( $text, $summary, $minor, $watchthis, $forceBot = false, $sectionanchor = '' ) {
1977 - wfDeprecated( __METHOD__ );
1978 -
1979 - $flags = EDIT_UPDATE | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY |
1980 - ( $minor ? EDIT_MINOR : 0 ) |
1981 - ( $forceBot ? EDIT_FORCE_BOT : 0 );
1982 -
1983 - $status = $this->doEdit( $text, $summary, $flags );
1984 -
1985 - if ( !$status->isOK() ) {
1986 - return false;
1987 - }
1988 -
1989 - $dbw = wfGetDB( DB_MASTER );
1990 - if ( $watchthis ) {
1991 - if ( !$this->mTitle->userIsWatching() ) {
1992 - $dbw->begin();
1993 - $this->doWatch();
1994 - $dbw->commit();
1995 - }
1996 - } else {
1997 - if ( $this->mTitle->userIsWatching() ) {
1998 - $dbw->begin();
1999 - $this->doUnwatch();
2000 - $dbw->commit();
2001 - }
2002 - }
2003 -
2004 - $extraQuery = ''; // Give extensions a chance to modify URL query on update
2005 - wfRunHooks( 'ArticleUpdateBeforeRedirect', array( $this, &$sectionanchor, &$extraQuery ) );
2006 -
2007 - $this->doRedirect( $this->isRedirect( $text ), $sectionanchor, $extraQuery );
2008 - return true;
2009 - }
2010 -
2011 - /**
20121940 * Check flags and add EDIT_NEW or EDIT_UPDATE to them as needed.
20131941 * @param $flags Int
20141942 * @return Int updated $flags

Follow-up revisions

RevisionCommit summaryAuthorDate
r87928PrivateDomains: follow-up to r87884 as per CR -- Article::insertNewArticle() ...ashley20:00, 12 May 2011

Comments

#Comment by 😂 (talk | contribs)   14:16, 31 March 2011

Yay, about time!

Status & tagging log