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.
--
Phone: 613-822-9060 +++ Cell: 613-600-2836
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.