On 14-07-10 04:56 AM, Sigbert Klinke wrote:
Hi,
for my extension I also deliver some test pages. Currently I'am exporting the test pages into a XML file and the wiki adminstrator could import them with importDump.php.
Is there a way that the extension automatically integrates some pages into the wiki (of course into my own namespace)?
I use something like the following:
<?php
$titleObj = Title::newFromText( "SomeNamespace:Some Article Title" ); $articleObj = new Article( $titleObj );
if( $articleObj ) { $flags = EDIT_MINOR; $articleObj->doEdit( 'This is the article text.', 'This is the edit summary.', $flags ); }
?>
Cheers, Rob.