diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2009-02-22 13:37:51 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2009-02-22 13:37:51 +0100 |
commit | b9b85843572bf283f48285001e276ba7e61b63f6 (patch) | |
tree | 4c6f4571552ada9ccfb4030481dcf77308f8b254 /maintenance/edit.php | |
parent | d9a20acc4e789cca747ad360d87ee3f3e7aa58c1 (diff) |
updated to MediaWiki 1.14.0
Diffstat (limited to 'maintenance/edit.php')
-rw-r--r-- | maintenance/edit.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/maintenance/edit.php b/maintenance/edit.php index 037f9a9a..64178045 100644 --- a/maintenance/edit.php +++ b/maintenance/edit.php @@ -58,15 +58,20 @@ $text = file_get_contents( 'php://stdin' ); # Do the edit print "Saving... "; -$success = $wgArticle->doEdit( $text, $summary, +$status = $wgArticle->doEdit( $text, $summary, ( $minor ? EDIT_MINOR : 0 ) | ( $bot ? EDIT_FORCE_BOT : 0 ) | ( $autoSummary ? EDIT_AUTOSUMMARY : 0 ) | ( $noRC ? EDIT_SUPPRESS_RC : 0 ) ); -if ( $success ) { +if ( $status->isOK() ) { print "done\n"; + $exit = 0; } else { print "failed\n"; - exit( 1 ); + $exit = 1; +} +if ( !$status->isGood() ) { + print $status->getWikiText() . "\n"; } +exit( $exit ); |