Index: trunk/phase3/includes/Article.php |
— | — | @@ -1961,8 +1961,7 @@ |
1962 | 1962 | } |
1963 | 1963 | |
1964 | 1964 | /** |
1965 | | - * This function is not deprecated until somebody fixes the core not to use |
1966 | | - * it. Nevertheless, use Article::doEdit() instead. |
| 1965 | + * @deprecated use Article::doEdit() |
1967 | 1966 | */ |
1968 | 1967 | function insertNewArticle( $text, $summary, $isminor, $watchthis, $suppressRC = false, $comment = false, $bot = false ) { |
1969 | 1968 | wfDeprecated( __METHOD__ ); |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -908,11 +908,17 @@ |
909 | 909 | $flags = EDIT_NEW | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY | |
910 | 910 | ( $this->minoredit ? EDIT_MINOR : 0 ) | |
911 | 911 | ( $bot ? EDIT_FORCE_BOT : 0 ); |
912 | | - $this->mArticle->doEdit( $this->textbox1, $this->summary, $flags, |
| 912 | + $status = $this->mArticle->doEdit( $this->textbox1, $this->summary, $flags, |
913 | 913 | false, null, $this->watchthis, $isComment, '', true ); |
914 | 914 | |
| 915 | + if ( $status->isOK() ) { |
| 916 | + wfProfileOut( __METHOD__ ); |
| 917 | + return self::AS_SUCCESS_NEW_ARTICLE; |
| 918 | + } else { |
| 919 | + $result = $status->getErrorsArray(); |
| 920 | + } |
915 | 921 | wfProfileOut( __METHOD__ ); |
916 | | - return self::AS_SUCCESS_NEW_ARTICLE; |
| 922 | + return self::AS_END; |
917 | 923 | } |
918 | 924 | |
919 | 925 | # Article exists. Check for edit conflict. |