Is there any reason why when inserting a new article from outside EditPage.php doesn't update the category links?
$title = Title::newFromText("Hellos"); $article = new Article($title); $ret = $article->insertNewArticle("hi there![[Category:Greetings]]", "", false, false, false)
The article is successfully created and links to the Greetings category. However, the "Greetings" category does not show the new article in the list of articles in that category.
Travis
Travis Derouin wrote:
Is there any reason why when inserting a new article from outside EditPage.php doesn't update the category links?
Shitty coding practices. ;) This stuff needs more refactoring still.
$title = Title::newFromText("Hellos"); $article = new Article($title); $ret = $article->insertNewArticle("hi there![[Category:Greetings]]", "", false, false, false)
The article is successfully created and links to the Greetings category. However, the "Greetings" category does not show the new article in the list of articles in that category.
At the moment you'll have to manually run the post-save updates; you should find several examples of this in the code.
-- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org