[Mediawiki-l] Create an article using an extension

Erhard Rainer mediawikimailinglist at erhard-rainer.com
Fri Jan 5 21:19:57 UTC 2007


Hi MediaWiki-User and Developer,

I'm  using  an  extension for parsing an external document. This works
fine,  but  now I want to insert the content of a variable as a new
article.  So  I  took  a  look  at  maintenance\importTextFile.php  as
recommended and tried to write a new article using

> require_once( 'importTextFile.inc' );
> ....
> insertNewArticle( $title, $text, $user, $comment, $rc );

after  testing  if the article exists and the user is allowed to write
new articles.

But I receive the following message:

> Fatal error: Call to a member function exists() on a non-object in
> importTextFile.inc on line 24

What  does  this mean? Or is there a other way to create new articles
using an extension.

Thanks in advanced

Erhard Rainer




More information about the MediaWiki-l mailing list