Hello! I need a rescue 911 in here. Here it comes..
Everytime a new article is entered, I need to save the categories that the user has entered(if there will ever be a category and it is not existing yet). So what i did is i create a function named saveCategory, here is the code
function saveCategory() { $ot = Title::newFromText( $cat, NS_CATEGORY ); if ($ot->getArticleID()==0){ $article = new Article( $ot ); $article->insertNewArticle( 'sample text', '', false, false, false, ''); } }
I call this after $this->mArticle->insertNewArticle( $this->textbox1, $this->summary, $this->minoredit, $this->watchthis, false, $isComment); in the EditPage.php
The good news is, I can save the pages and even the category pages. The bad news is, in the category page, I cannot see the link from the article that it came from but i can see the text i put in. In the article page, everything is shown even the categories i put. The link only shows in the category page if i edit and save the article page again.
So my wild guess is that, I can save the article in the page table and revision table except for linkpages. If this is correct, then why? What is my fault in here? If you have other way to do this, i'l be willing to listen. I just need this to work! Please help :(
--jaro
mediawiki-l@lists.wikimedia.org