Index: trunk/extensions/YouTubeAuthSub/YouTubeAuthSub_body.php |
— | — | @@ -56,10 +56,8 @@ |
57 | 57 | } |
58 | 58 | } |
59 | 59 | $content = "{{YoutubeVideo|{$wgRequest->getVal('id')}|{$title}|{$keywords}|{$description}|{$category}}}"; |
60 | | - $a->insertNewArticle($content, |
61 | | - wfMsg('youtubeauthsub_summary'), |
62 | | - false, |
63 | | - false); |
| 60 | + $a->doEdit( $content, wfMsg('youtubeauthsub_summary'), EDIT_NEW |
| 61 | + | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY, false, null, false, false, '', true ); |
64 | 62 | $wgOut->redirect(''); |
65 | 63 | } |
66 | 64 | $wgOut->addWikiText(wfMsg('youtubeauthsub_viewpage', $descTitle->getFullText()) ); |
Index: trunk/extensions/SpamDiffTool/SpamDiffTool_body.php |
— | — | @@ -55,13 +55,15 @@ |
56 | 56 | if ( $wgUser->getID() > 0 ) |
57 | 57 | $watch = $wgUser->isWatched( $sb ); |
58 | 58 | if ( $insert ) { |
59 | | - $a->insertNewArticle( $text, wfMsgForContent( 'spamdifftool_summary' ), false, $watch ); |
| 59 | + $a->doEdit( $text, wfMsgForContent( 'spamdifftool_summary' ), EDIT_NEW |
| 60 | + | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY, false, null, $watch, false, '', true ); |
60 | 61 | } else { |
61 | | - $a->updateArticle( $text, wfMsgForContent( 'spamdifftool_summary' ), false, $watch ); |
| 62 | + $a->doEdit( $text, wfMsgForContent( 'spamdifftool_summary' ), EDIT_UPDATE |
| 63 | + | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY, false, null, $watch, false, '', true ); |
62 | 64 | } |
63 | 65 | $returnto = $wgRequest->getVal( 'returnto' ); |
64 | 66 | if ( $returnto != null && $returnto != '' ) |
65 | | - $wgOut->redirect( $wgScript . "?" . urldecode( $returnto ) ); // clear the redirect set by updateArticle |
| 67 | + $wgOut->redirect( $wgScript . "?" . urldecode( $returnto ) ); // clear the redirect set by doEdit |
66 | 68 | return; |
67 | 69 | } |
68 | 70 | $vals = $wgRequest->getValues(); |
Index: trunk/extensions/SpamBlacklist/cleanup.php |
— | — | @@ -36,6 +36,7 @@ |
37 | 37 | } |
38 | 38 | $dbw = wfGetDB( DB_MASTER ); |
39 | 39 | $dbw->immediateBegin(); |
| 40 | + $article = new Article( $title ); |
40 | 41 | if ( !$rev ) { |
41 | 42 | // Didn't find a non-spammy revision, delete the page |
42 | 43 | /* |
— | — | @@ -45,14 +46,14 @@ |
46 | 47 | */ |
47 | 48 | // Too scary, blank instead |
48 | 49 | print "All revisions are spam, blanking...\n"; |
49 | | - $article = new Article( $title ); |
50 | | - $article->updateArticle( '', "All revisions matched the spam blacklist ($match), blanking", |
51 | | - false, false ); |
| 50 | + $article->doEdit( '', "All revisions matched the spam blacklist ($match), blanking", |
| 51 | + EDIT_UPDATE | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY, false, null, false, false, |
| 52 | + '', true ); |
52 | 53 | |
53 | 54 | } else { |
54 | 55 | // Revert to this revision |
55 | | - $article = new Article( $title ); |
56 | | - $article->updateArticle( $rev->getText(), "Cleaning up links to $match", false, false ); |
| 56 | + $article->doEdit( $rev->getText(), "Cleaning up links to $match", EDIT_UPDATE |
| 57 | + | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY, false, null, false, false, '', true ); |
57 | 58 | } |
58 | 59 | $dbw->immediateCommit(); |
59 | 60 | wfDoUpdates(); |
Index: trunk/extensions/Postcomment/Postcomment.php |
— | — | @@ -194,9 +194,11 @@ |
195 | 195 | |
196 | 196 | if ($update) { |
197 | 197 | //echo "trying to update article"; |
198 | | - $article->updateArticle($text, "", true, $watch); |
| 198 | + $article->doEdit( $text, '', EDIT_UPDATE | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY |
| 199 | + | EDIT_MINOR, false, null, $watch, false, '', true ); |
199 | 200 | } else { |
200 | 201 | //echo "inserting new article"; |
201 | | - $article->insertNewArticle($text, "", true, $watch, false, false, true); |
| 202 | + $article->doEdit( $text, $summary, EDIT_NEW | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY |
| 203 | + | EDIT_MINOR | EDIT_FORCE_BOT, false, null, $watch, false, '', true ); |
202 | 204 | } |
203 | 205 | } |
Index: trunk/extensions/DynamicPageList/DPL.php |
— | — | @@ -1138,7 +1138,8 @@ |
1139 | 1139 | $wgArticle = $articleX = new Article( $titleX ); |
1140 | 1140 | $permission_errors = $articleX->mTitle->getUserPermissionsErrors( 'edit', $wgUser ); |
1141 | 1141 | if ( count( $permission_errors ) == 0 ) { |
1142 | | - $articleX->updateArticle( $text, $summary, false, $titleX->userIsWatching() ); |
| 1142 | + $articleX->doEdit( $text, $summary, EDIT_UPDATE | EDIT_DEFER_UPDATES |
| 1143 | + | EDIT_AUTOSUMMARY, false, null, $titleX->userIsWatching(), false, '', true ); |
1143 | 1144 | return ''; |
1144 | 1145 | } else { |
1145 | 1146 | $wgOut->showPermissionsErrorPage( $permission_errors ); |