hi,
I use
$wgTitle = Title::newFromText( "MyArticle" );
$wgArticle = new Article( $wgTitle );
$wgArticle->insertNewArticle( "Some text", '', false, false );

to add new articles to WIKI database,and use updateArticle() to update the 
articles.

But when I use those two fuctions,and implement the program contains them.

The page always redirect to the new article page or the updated article page 
immediately .

How to solve this problem ?I don't want  to let the page jump.

Thanks very much!

 vanessa lee


-----Original Message-----
From: Platonides <platoni...@gmail.com>
To: wikitech-l@lists.wikimedia.org
Date: Wed, 21 Oct 2009 00:18:47 +0200
Subject: Re: [Wikitech-l] Add record to database


李琴 wrote:
>  Hi,
>      I have already got the article data from the wikipedia and I stored 
it 
> on  my computer .Now I want to add the article to the local wiki.  I have 
> done a lot of reaserches and I know that there are a lot of things to do.
> If add a record to the page table ,then the 
> revision,recentchange,text,pagelink table and so on will be changed.So I 
> think maybe there is a easy way to do that .
> 
> Can you tell me what should I do ? Should I simply use 
> 'insert,update,select...'words?
> 
> Sincerely looking froward you help, thanks 
> 
>          vanessa lee


If you're working inside mediawiki php.

$wgTitle = Title::newFromText( "MyArticle" );
$wgArticle = new Article( $wgTitle );
$wgArticle->insertNewArticle( "Some text", '', false, false );


If you don't want to work with php, use maintenance/importTextFile.php


_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to