I have a page Alpha, which contains a "Category: X" link, but the "Category: X" page does not have the page Alpha listed on it. When I edit the page Alpha then the "Category: X" page correctly lists the Alpha page. My question: how can I force, with MediaWiki calls, an update of the category links. I have tried with the following code to even check if the category links are OK, but this does not seem to work. Thanks for any ideas.
$pageName = "Alpha"; $title = new Title(); $title = $title->newFromText($pageName);
$linkCache = new LinkCache(); $linkCache->preFill($title);
$catLinks = $linkCache->getCategoryLinks();
print_r($catLinks, "catLinks");
If it's the one page, just null-edit it (hit edit, then save without making a change). If it's multiple pages, run the refreshLinks.php command line script in the maintenance dir. to update all the link tables.
Rob Church
On 17/02/06, Hugh Prior mediawiki@localpin.com wrote:
I have a page Alpha, which contains a "Category: X" link, but the "Category: X" page does not have the page Alpha listed on it. When I edit the page Alpha then the "Category: X" page correctly lists the Alpha page. My question: how can I force, with MediaWiki calls, an update of the category links. I have tried with the following code to even check if the category links are OK, but this does not seem to work. Thanks for any ideas.
$pageName = "Alpha"; $title = new Title(); $title = $title->newFromText($pageName);
$linkCache = new LinkCache(); $linkCache->preFill($title);
$catLinks = $linkCache->getCategoryLinks();
print_r($catLinks, "catLinks");
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
I know that when I do it manually all have to do is null-edit the page.
I will check out the refreshLinks.php; I may well be able to use that. Thanks.
In seems to me though that "refreshLinks.php" is a batch approach. If I know the actual page which needs the category links fixing is there though a direct function I can call? I see the "fixLinksFromArticle" in "refreshLinks.inc". This I suppose would do it. But is this the normal way that a page during a manual null-edit would ensure that it's links are up to date? If not, what functions do the updating?
"Rob Church" robchur@gmail.com wrote in message news:e92136380602171059u9ff2c94n@mail.gmail.com...
If it's the one page, just null-edit it (hit edit, then save without making a change). If it's multiple pages, run the refreshLinks.php command line script in the maintenance dir. to update all the link tables.
Those would, if I recall, be in the Article class...
Rob Church
On 18/02/06, Hugh Prior mediawiki@localpin.com wrote:
I know that when I do it manually all have to do is null-edit the page.
I will check out the refreshLinks.php; I may well be able to use that. Thanks.
In seems to me though that "refreshLinks.php" is a batch approach. If I know the actual page which needs the category links fixing is there though a direct function I can call? I see the "fixLinksFromArticle" in "refreshLinks.inc". This I suppose would do it. But is this the normal way that a page during a manual null-edit would ensure that it's links are up to date? If not, what functions do the updating?
"Rob Church" robchur@gmail.com wrote in message news:e92136380602171059u9ff2c94n@mail.gmail.com...
If it's the one page, just null-edit it (hit edit, then save without making a change). If it's multiple pages, run the refreshLinks.php command line script in the maintenance dir. to update all the link tables.
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org