[Mediawiki-l] "Refreshing" a category page via MediaWiki program calls

Rob Church robchur at gmail.com
Fri Feb 17 18:59:42 UTC 2006


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 at 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 at Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>



More information about the MediaWiki-l mailing list