MediaWiki
REL1_20
|
Maintenance script to refresh link tables. More...
Public Member Functions | |
__construct () | |
Default constructor. | |
execute () | |
Do the actual work. | |
Static Public Member Functions | |
static | fixLinksFromArticle ($id) |
Run LinksUpdate for all links on a given page_id. | |
Private Member Functions | |
deleteLinksFromNonexistent ($maxLag=0, $batchSize=100) | |
Removes non-existing links from pages from pagelinks, imagelinks, categorylinks, templatelinks, externallinks, interwikilinks, langlinks and redirect tables. | |
doRefreshLinks ($start, $newOnly=false, $maxLag=false, $end=0, $redirectsOnly=false, $oldRedirectsOnly=false) | |
Do the actual link refreshing. | |
fixRedirect ($id) | |
Update the redirect entry for a given page. |
Maintenance script to refresh link tables.
Definition at line 31 of file refreshLinks.php.
Default constructor.
Children should call this *first* if implementing their own constructors
Reimplemented from Maintenance.
Definition at line 32 of file refreshLinks.php.
References Maintenance\addArg(), Maintenance\addOption(), and Maintenance\setBatchSize().
RefreshLinks::deleteLinksFromNonexistent | ( | $ | maxLag = 0 , |
$ | batchSize = 100 |
||
) | [private] |
Removes non-existing links from pages from pagelinks, imagelinks, categorylinks, templatelinks, externallinks, interwikilinks, langlinks and redirect tables.
$maxLag | int |
$batchSize | int The size of deletion batches |
Definition at line 244 of file refreshLinks.php.
References $dbr, $lb, Maintenance\output(), wfGetDB(), wfGetLBFactory(), and wfWaitForSlaves().
Referenced by execute().
RefreshLinks::doRefreshLinks | ( | $ | start, |
$ | newOnly = false , |
||
$ | maxLag = false , |
||
$ | end = 0 , |
||
$ | redirectsOnly = false , |
||
$ | oldRedirectsOnly = false |
||
) | [private] |
Do the actual link refreshing.
$start | int Page_id to start from |
$newOnly | bool Only do pages with 1 edit |
$maxLag | int Max DB replication lag |
$end | int Page_id to stop at |
$redirectsOnly | bool Only fix redirects |
$oldRedirectsOnly | bool Only fix redirects without redirect entries |
Definition at line 67 of file refreshLinks.php.
References $dbr, $res, $wgParser, fixLinksFromArticle(), fixRedirect(), Maintenance\output(), wfGetDB(), wfRunHooks(), and wfWaitForSlaves().
Referenced by execute().
Do the actual work.
All child classes will need to implement this
Reimplemented from Maintenance.
Definition at line 45 of file refreshLinks.php.
References deleteLinksFromNonexistent(), doRefreshLinks(), Maintenance\getArg(), Maintenance\getOption(), and Maintenance\hasOption().
static RefreshLinks::fixLinksFromArticle | ( | $ | id | ) | [static] |
Run LinksUpdate for all links on a given page_id.
$id | int The page_id |
Definition at line 208 of file refreshLinks.php.
References $options, $page, $wgContLang, $wgParser, LinksUpdate\doUpdate(), false, WikiPage\newFromID(), ParserOptions\newFromUserAndLang(), LinkCache\singleton(), and wfGetDB().
Referenced by doRefreshLinks().
RefreshLinks::fixRedirect | ( | $ | id | ) | [private] |
Update the redirect entry for a given page.
$id | int The page_id of the redirect |
Definition at line 182 of file refreshLinks.php.
References $page, WikiPage\newFromID(), and wfGetDB().
Referenced by doRefreshLinks().