Hi,
I´m developing a extension and I need to add an article to a category.
I only get the title of the article, so I try this:
$articleToAdd = new Article($title);
$context = $articleToAdd->getContext(); $resArticle = MediaWiki::articleFromTitle($title, $context);
$linksupdate = new LinksUpdate($resArticle->getTitle(), $resArticle->getParserOutput(), $f); $ps = $linksupdate->getParserOutput(); $categoriesLinks = $ps->getCategoryLinks();
..so I get all the categories for the article, but I need to add and remove a category. How can I do that ?
Thanks! Maurice.-