LinkTitles extension for MediaWiki
Automatically add links to existing pages.
All Classes Namespaces Functions Variables Modules Pages
LinkTitles\Special Class Reference

Provides a special page that can be used to batch-process all pages in the wiki. More...

Inheritance diagram for LinkTitles\Special:

Public Member Functions

 __construct ()
 Constructor. More...
 
 getGroupName ()
 
 execute ($par)
 Entry function of the special page class. More...
 

Private Member Functions

 process (\WebRequest &$request,\OutputPage &$output)
 Processes wiki articles, starting at the page indicated by $startTitle. More...
 
 buildInfoPage (&$request, &$output)
 
 addProgressInfo (&$output, $curTitle, $index, $end)
 
 getReloaderForm ($url, $start, $end, $reloads)
 Generates an HTML form and JavaScript to automatically submit the form. More...
 
 addCompletedInfo (&$output, $start, $end, $reloads)
 Adds statistics to the page when all processing is done. More...
 
 countPages (&$dbr, $namespacesClause)
 Counts the number of pages in a read-access wiki database ($dbr). More...
 

Private Attributes

 $config
 

Detailed Description

Provides a special page that can be used to batch-process all pages in the wiki.

By default, this can only be performed by sysops.

Definition at line 38 of file Special.php.

Constructor & Destructor Documentation

LinkTitles\Special::__construct ( )

Constructor.

Announces the special page title and required user right to the parent constructor.

Definition at line 44 of file Special.php.

Member Function Documentation

LinkTitles\Special::addCompletedInfo ( $output,
  $start,
  $end,
  $reloads 
)
private

Adds statistics to the page when all processing is done.

Parameters
$outputOutput object
$startIndex of the first page that was processed.
$endIndex of the last processed page.
$reloadsNumber of reloads of the page.
Returns
undefined

Definition at line 247 of file Special.php.

LinkTitles\Special::countPages ( $dbr,
  $namespacesClause 
)
private

Counts the number of pages in a read-access wiki database ($dbr).

Parameters
$dbrRead-only Database object.
Returns
Number of pages in the default namespace (0) of the wiki.

Definition at line 259 of file Special.php.

LinkTitles\Special::execute (   $par)

Entry function of the special page class.

Will abort if the user does not have appropriate permissions ('linktitles-batch').

Parameters
$parAdditional parameters (required by interface; currently not used)

Definition at line 61 of file Special.php.

LinkTitles\Special::getReloaderForm (   $url,
  $start,
  $end,
  $reloads 
)
private

Generates an HTML form and JavaScript to automatically submit the form.

Parameters
$urlURL to reload with a POST request.
$startIndex of the next page that shall be processed.
$endIndex of the last page to be processed.
$reloadsCounter that holds the number of reloads so far.
Returns
String that holds the HTML for a form and a JavaScript command.

Definition at line 224 of file Special.php.

LinkTitles\Special::process ( \WebRequest &  $request,
\OutputPage &  $output 
)
private

Processes wiki articles, starting at the page indicated by $startTitle.

If $wgLinkTitlesTimeLimit is reached before all pages are processed, returns the title of the next page that needs processing.

Parameters
WebRequest$requestWebRequest object that is associated with the special page.
OutputPage$outputOutput page for the special page.

Definition at line 97 of file Special.php.


The documentation for this class was generated from the following file: