Go to the documentation of this file.
52 # Need to use the master to get the redirect table updated in the same transaction
55 array(
'redirect',
'page' ),
56 array(
'page_namespace',
'page_title' ),
62 if ( !
$res->numRows() ) {
75 # Avoid excessive memory usage
76 if ( count( $jobs ) > 10000 ) {
91 $this->reason =
$params[
'reason'];
99 if ( !$this->redirTitle ) {
107 wfDebug( __METHOD__ .
": target redirect already deleted, ignoring\n" );
111 $content = $targetRev->getContent();
112 $currentDest = $content ? $content->getRedirectTarget() :
null;
113 if ( !$currentDest || !$currentDest->equals( $this->redirTitle ) ) {
114 wfDebug( __METHOD__ .
": Redirect has changed since the job was queued\n" );
121 if ( $content->matchMagicWord( $mw ) ) {
122 wfDebug( __METHOD__ .
": skipping: suppressed with __STATICREDIRECT__\n" );
131 ": skipping: single redirect, circular redirect or invalid redirect destination\n" );
135 if ( $newTitle->equals( $this->redirTitle ) ) {
138 wfDebug( __METHOD__ .
" : skipping, already good\n" );
142 $newTitle =
Title::makeTitle( $newTitle->getNamespace(), $newTitle->getDBkey(),
143 $currentDest->getFragment(), $newTitle->getInterwiki() );
146 $newContent = $content->updateRedirect( $newTitle );
148 if ( $newContent->equals( $content ) ) {
169 $this->redirTitle->getPrefixedText(), $newTitle->getPrefixedText()
170 )->inContentLanguage()->text();
188 $seenTitles =
array();
193 if ( isset( $seenTitles[$titleText] ) ) {
194 wfDebug( __METHOD__,
"Circular redirect detected, aborting\n" );
198 $seenTitles[$titleText] =
true;
208 $row = $dbw->selectRow(
209 array(
'redirect',
'page' ),
210 array(
'rd_namespace',
'rd_title',
'rd_interwiki' ),
217 # No redirect from here, chain terminates
241 $username =
wfMessage(
'double-redirect-fixer' )->inContentLanguage()->text();
243 # User::newFromName() can return false on a badly configured wiki.
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
getPrefixedDBkey()
Get the prefixed database key form.
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
__construct( $title, $params=false)
static getFinalDestination( $title)
Get the final destination of a redirect.
getUser()
Get a user object for doing edits, from a request-lifetime cache False will be returned if the user n...
static & get( $id)
Factory: creates an object representing an ID.
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
isExternal()
Is this Title interwiki?
Job to fix double redirects after moving a page.
to move a page</td >< td > &*You are moving the page across *A non empty talk page already exists under the new or *You uncheck the box below In those you will have to move or merge the page manually if desired</td >< td > be sure to &You are responsible for making sure that links continue to point where they are supposed to go Note that the page will &a page at the new title
Class to both describe a background job and handle jobs.
getDBkey()
Get the main part with underscores.
static factory(Title $title)
Create a WikiPage object of the appropriate class for the given title.
getNamespace()
Get the namespace index, i.e.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
static fixRedirects( $reason, $redirTitle, $destTitle=false)
Insert jobs into the job queue to fix redirects to the given title.
static newFromTitle( $title, $id=0, $flags=0)
Load either the current, or a specified, revision that's attached to a given title.
wfDebug( $text, $dest='all')
Sends a line to the debug log if enabled or, optionally, to a comment in output.
Title $redirTitle
The title which has changed, redirects pointing to this title are fixed.
array bool $params
Array of job parameters or false if none *.
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
Represents a title within MediaWiki.
static singleton( $wiki=false)
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Using a hook running we can avoid having all this option specific stuff in our mainline code Using the function array $article
string $reason
Reason for the change, 'maintenance' or 'move'.