Some more editor files to ignore.
[lhc/web/wiklou.git] / maintenance / importTextFile.php
index 5623fb0..c04989c 100644 (file)
@@ -24,7 +24,7 @@
 
 $options = array( 'help', 'nooverwrite', 'norc' );
 $optionsWithArgs = array( 'title', 'user', 'comment' );
-require_once( dirname( __FILE__ ) . '/commandLine.inc' );
+require_once( __DIR__ . '/commandLine.inc' );
 echo( "Import Text File\n\n" );
 
 if ( count( $args ) < 1 || isset( $options['help'] ) ) {
@@ -56,7 +56,8 @@ if ( count( $args ) < 1 || isset( $options['help'] ) ) {
 
                                        echo( "\nPerforming edit..." );
                                        $page = WikiPage::factory( $title );
-                                       $page->doEdit( $text, $comment, $flags, false, $user );
+                                       $content = ContentHandler::makeContent( $text, $title );
+                                       $page->doEditContent( $content, $comment, $flags, false, $user );
                                        echo( "done.\n" );
 
                                } else {