summaryrefslogtreecommitdiff
path: root/maintenance/importSiteScripts.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/importSiteScripts.php')
-rw-r--r--maintenance/importSiteScripts.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/maintenance/importSiteScripts.php b/maintenance/importSiteScripts.php
index e369cb15..fd768b34 100644
--- a/maintenance/importSiteScripts.php
+++ b/maintenance/importSiteScripts.php
@@ -21,7 +21,7 @@
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to import all scripts in the MediaWiki namespace from a
@@ -62,7 +62,8 @@ class ImportSiteScripts extends Maintenance {
$text = Http::get( $url );
$wikiPage = WikiPage::factory( $title );
- $wikiPage->doEdit( $text, "Importing from $url", 0, false, $user );
+ $content = ContentHandler::makeContent( $text, $wikiPage->getTitle() );
+ $wikiPage->doEditContent( $content, "Importing from $url", 0, false, $user );
}
}
@@ -104,4 +105,4 @@ class ImportSiteScripts extends Maintenance {
}
$maintClass = 'ImportSiteScripts';
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;