MediaWiki  master
DoubleRedirectJob Class Reference

Job to fix double redirects after moving a page. More...

Inheritance diagram for DoubleRedirectJob:
Collaboration diagram for DoubleRedirectJob:

List of all members.

Public Member Functions

 __construct ($title, $params=false, $id=0)
 getUser ()
 Get a user object for doing edits, from a request-lifetime cache.
 run ()

Static Public Member Functions

static fixRedirects ($reason, $redirTitle, $destTitle=false)
 Insert jobs into the job queue to fix redirects to the given title.
static getFinalDestination ($title)
 Get the final destination of a redirect.

Public Attributes

 $reason
 $redirTitle

Static Public Attributes

static $user

Detailed Description

Job to fix double redirects after moving a page.

Definition at line 29 of file DoubleRedirectJob.php.


Constructor & Destructor Documentation

DoubleRedirectJob::__construct ( title,
params = false,
id = 0 
)

Definition at line 76 of file DoubleRedirectJob.php.

References Job\$id, Job\$params, Job\$title, and Title\newFromText().


Member Function Documentation

static DoubleRedirectJob::fixRedirects ( reason,
redirTitle,
destTitle = false 
) [static]

Insert jobs into the job queue to fix redirects to the given title.

Parameters:
$reasonString: the reason for the fix, see message "double-redirect-fixed-<reason>"
$redirTitleTitle: the title which has changed, redirects pointing to this title are fixed
$destTitlebool Not used

Definition at line 43 of file DoubleRedirectJob.php.

References $reason, $redirTitle, $res, Job\$title, array(), as, Job\batchInsert(), Title\makeTitle(), and wfGetDB().

Referenced by MovePageForm\doSubmit().

static DoubleRedirectJob::getFinalDestination ( title) [static]

Get the final destination of a redirect.

Parameters:
$titleTitle
Returns:
bool if the specified title is not a redirect, or if it is a circular redirect

Definition at line 155 of file DoubleRedirectJob.php.

References Job\$title, array(), check, Title\getDBkey(), Title\getInterwiki(), Title\getNamespace(), Title\getPrefixedDBkey(), Title\makeTitle(), redirect, wfDebug(), and wfGetDB().

Referenced by run().

Get a user object for doing edits, from a request-lifetime cache.

Returns:
User

Definition at line 199 of file DoubleRedirectJob.php.

References $user, $user, User\newFromName(), text, and wfMessage().

Referenced by run().


Member Data Documentation

DoubleRedirectJob::$reason

Definition at line 30 of file DoubleRedirectJob.php.

Referenced by fixRedirects(), and run().

DoubleRedirectJob::$redirTitle

Definition at line 30 of file DoubleRedirectJob.php.

Referenced by fixRedirects().

DoubleRedirectJob::$user [static]

Definition at line 35 of file DoubleRedirectJob.php.

Referenced by getUser().


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