Merge "Add setting wgLogAutopatrol to toggle logging of autopatrol actions"
[lhc/web/wiklou.git] / maintenance / edit.php
index 59df5e8..7fca651 100644 (file)
@@ -21,7 +21,7 @@
  * @ingroup Maintenance
  */
 
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
 
 /**
  * Maintenance script to make a page edit.
@@ -68,10 +68,11 @@ class EditCLI extends Maintenance {
 
                # Read the text
                $text = $this->getStdin( Maintenance::STDIN_ALL );
+               $content = ContentHandler::makeContent( $text, $wgTitle );
 
                # Do the edit
                $this->output( "Saving... " );
-               $status = $page->doEdit( $text, $summary,
+               $status = $page->doEditContent( $content, $summary,
                        ( $minor ? EDIT_MINOR : 0 ) |
                        ( $bot ? EDIT_FORCE_BOT : 0 ) |
                        ( $autoSummary ? EDIT_AUTOSUMMARY : 0 ) |
@@ -91,5 +92,4 @@ class EditCLI extends Maintenance {
 }
 
 $maintClass = "EditCLI";
-require_once( RUN_MAINTENANCE_IF_MAIN );
-
+require_once RUN_MAINTENANCE_IF_MAIN;