Index: trunk/phase3/includes/Article.php |
— | — | @@ -1936,78 +1936,6 @@ |
1937 | 1937 | } |
1938 | 1938 | |
1939 | 1939 | /** |
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 | | - /** |
2012 | 1940 | * Check flags and add EDIT_NEW or EDIT_UPDATE to them as needed. |
2013 | 1941 | * @param $flags Int |
2014 | 1942 | * @return Int updated $flags |