MediaWiki  REL1_20
Title Class Reference

Represents a title within MediaWiki. More...

Inheritance diagram for Title:

List of all members.

Public Member Functions

 __construct ()
 Constructor.
 __toString ()
 Return a string representation of this title.
 areRestrictionsCascading ()
 Returns cascading restrictions for the current article.
 canExist ()
 Is this in a namespace that allows actual pages?
 canTalk ()
 Could this title have a corresponding talk page?
 canUseNoindex ()
 Whether the magic words __INDEX__ and __NOINDEX__ function for this page.
 countAuthorsBetween ($old, $new, $limit, $options=array())
 Get the number of authors between the given revisions or revision IDs.
 countRevisionsBetween ($old, $new)
 Get the number of revisions between the given revision.
 deleteTitleProtection ()
 Remove any title protection due to page existing.
 equals (Title $title)
 Compare with another title.
 escapeCanonicalURL ($query= '', $query2=false)
 HTML-escaped version of getCanonicalURL()
 escapeFullURL ($query= '', $query2=false)
 Get an HTML-escaped version of the URL form, suitable for using in a link, including the server name and fragment.
 escapeLocalURL ($query= '', $query2=false)
 Get an HTML-escaped version of the URL form, suitable for using in a link, without a server name or fragment.
 estimateRevisionCount ()
 Get the approximate revision count of this page.
 exists ()
 Check if page exists.
 fixSpecialName ()
 If the Title refers to a special page alias which is not the local default, resolve the alias, and localise the name as necessary.
 flushRestrictions ()
 Flush the protection cache in this object and force reload from the database.
 getArticleID ($flags=0)
 Get the article ID for this Title from the link cache, adding it if necessary.
 getBacklinkCache ()
 Get a backlink cache object.
 getBaseText ()
 Get the base page name, i.e.
 getBrokenLinksFrom ()
 Get an array of Title objects referring to non-existent articles linked from this page.
 getCanonicalURL ($query= '', $query2=false)
 Get the URL for a canonical link, for use in things like IRC and e-mail notifications.
 getCascadeProtectionSources ($getPages=true)
 Cascading protection: Get the source of any cascading restrictions on this page.
 getCategorySortkey ($prefix= '')
 Returns the raw sort key to be used for categories, with the specified prefix.
 getDBkey ()
 Get the main part with underscores.
 getDefaultMessageText ()
 Get the default message text or false if the message doesn't exist.
 getDefaultNamespace ()
 Get the default namespace index, for when there is no namespace.
 getEarliestRevTime ($flags=0)
 Get the oldest revision timestamp of this page.
 getEditURL ()
 Get the edit URL for this Title.
 getEscapedText ()
 Get the HTML-escaped displayable text form.
 getFirstRevision ($flags=0)
 Get the first revision of the page.
 getFragment ()
 Get the Title fragment (i.e. the bit after the #) in text form.
 getFragmentForURL ()
 Get the fragment in URL form, including the "#" character if there is one.
 getFullText ()
 Get the prefixed title with spaces, plus any fragment (part beginning with '#')
 getFullURL ($query= '', $query2=false, $proto=PROTO_RELATIVE)
 Get a real URL referring to this title, with interwiki link and fragment.
 getIndexTitle ()
 Get title for search index.
 getInternalURL ($query= '', $query2=false)
 Get the URL form for an internal link.
 getInterwiki ()
 Get the interwiki prefix (or null string)
 getLatestRevID ($flags=0)
 What is the page_latest field for this page?
 getLength ($flags=0)
 What is the length of this page? Uses link cache, adding it if necessary.
 getLinksFrom ($options=array(), $table= 'pagelinks', $prefix= 'pl')
 Get an array of Title objects linked from this Title Also stores the IDs in the link cache.
 getLinksTo ($options=array(), $table= 'pagelinks', $prefix= 'pl')
 Get an array of Title objects linking to this Title Also stores the IDs in the link cache.
 getLinkURL ($query= '', $query2=false)
 Get a URL that's the simplest URL that will be valid to link, locally, to the current Title.
 getLocalURL ($query= '', $query2=false)
 Get a URL with no fragment or server name.
 getNamespace ()
 Get the namespace index, i.e.
 getNamespaceKey ($prepend= 'nstab-')
 Generate strings used for xml 'id' names in monobook tabs.
 getNextRevisionID ($revId, $flags=0)
 Get the revision ID of the next revision.
 getNotificationTimestamp ($user=null)
 Get the timestamp when this page was updated since the user last saw it.
 getNsText ()
 Get the namespace text.
 getPageLanguage ()
 Get the language in which the content of this page is written in wikitext.
 getPageViewLanguage ()
 Get the language in which the content of this page is written when viewed by user.
 getParentCategories ()
 Get categories to which this Title belongs and return an array of categories' names.
 getParentCategoryTree ($children=array())
 Get a tree of parent categories.
 getPartialURL ()
 Get the URL-encoded form of the main part.
 getPrefixedDBkey ()
 Get the prefixed database key form.
 getPrefixedText ()
 Get the prefixed title with spaces.
 getPrefixedURL ()
 Get a URL-encoded title (not an actual URL) including interwiki.
 getPreviousRevisionID ($revId, $flags=0)
 Get the revision ID of the previous revision.
 getRedirectsHere ($ns=null)
 Get all extant redirects to this Title.
 getRestrictionExpiry ($action)
 Get the expiry time for the restriction against a given action.
 getRestrictions ($action)
 Accessor/initialisation for mRestrictions.
 getRestrictionTypes ()
 Returns restriction types for the current Title.
 getSkinFromCssJsSubpage ()
 Trim down a .css or .js subpage title to get the corresponding skin name.
 getSquidURLs ()
 Get a list of URLs to purge from the Squid cache when this page changes.
 getSubjectNsText ()
 Get the namespace text of the subject (rather than talk) page.
 getSubjectPage ()
 Get a title object associated with the subject page of this talk page.
 getSubpages ($limit=-1)
 Get all subpages of this page.
 getSubpageText ()
 Get the lowest-level subpage name, i.e.
 getSubpageUrlForm ()
 Get a URL-encoded form of the subpage text.
 getTalkNsText ()
 Get the namespace text of the talk page.
 getTalkPage ()
 Get a Title object associated with the talk page of this article.
 getTemplateLinksFrom ($options=array())
 Get an array of Title objects used on this Title as a template Also stores the IDs in the link cache.
 getTemplateLinksTo ($options=array())
 Get an array of Title objects using this Title as a template Also stores the IDs in the link cache.
 getText ()
 Get the text form (spaces not underscores) of the main part.
 getTouched ($db=null)
 Get the last touched timestamp.
 getTransWikiID ()
 Returns the DB name of the distant wiki which owns the object.
 getUserCaseDBKey ()
 Get the DB key with the initial letter case as specified by the user.
 getUserPermissionsErrors ($action, $user, $doExpensiveQueries=true, $ignoreErrors=array())
 Can $user perform $action on this page?
 hasSourceText ()
 Does this page have source text?
 hasSubjectNamespace ($ns)
 Returns true if the title has the same subject namespace as the namespace specified.
 hasSubpages ()
 Does this have subpages? (Warning, usually requires an extra DB query.)
 inNamespace ($ns)
 Returns true if the title is inside the specified namespace.
 inNamespaces ()
 Returns true if the title is inside one of the specified namespaces.
 invalidateCache ()
 Updates page_touched for this page; called from LinksUpdate.php.
 isAlwaysKnown ()
 Should links to this title be shown as potentially viewable (i.e.
 isBigDeletion ()
 Check whether the number of revisions of this page surpasses $wgDeleteRevisionsLimit.
 isCascadeProtected ()
 Cascading protection: Return true if cascading restrictions apply to this page, false if not.
 isContentPage ()
 Is this Title in a namespace which contains content? In other words, is this a content page, for the purposes of calculating statistics, etc?
 isConversionTable ()
 Is this a conversion table for the LanguageConverter?
 isCssJsSubpage ()
 Is this a .css or .js subpage of a user page?
 isCssOrJsPage ()
 Could this page contain custom CSS or JavaScript, based on the title?
 isCssSubpage ()
 Is this a .css subpage of a user page?
 isDeleted ()
 Is there a version of this page in the deletion archive?
 isDeletedQuick ()
 Is there a version of this page in the deletion archive?
 isExternal ()
 Is this Title interwiki?
 isJsSubpage ()
 Is this a .js subpage of a user page?
 isKnown ()
 Does this title refer to a page that can (or might) be meaningfully viewed? In particular, this function may be used to determine if links to the title should be rendered as "bluelinks" (as opposed to "redlinks" to non-existent pages).
 isLocal ()
 Determine whether the object refers to a page within this project.
 isMainPage ()
 Is this the mainpage?
 isMovable ()
 Would anybody with sufficient privileges be able to move this page? Some pages just aren't movable.
 isNamespaceProtected (User $user)
 Determines if $user is unable to edit this page because it has been protected by $wgNamespaceProtection.
 isNewPage ()
 Check if this is a new page.
 isProtected ($action= '')
 Does the title correspond to a protected article?
 isRedirect ($flags=0)
 Is this an article that is a redirect page? Uses link cache, adding it if necessary.
 isSemiProtected ($action= 'edit')
 Is this page "semi-protected" - the *only* protection is autoconfirm?
 isSingleRevRedirect ()
 Checks if this page is just a one-rev redirect.
 isSpecial ($name)
 Returns true if this title resolves to the named special page.
 isSpecialPage ()
 Returns true if this is a special page.
 isSubpage ()
 Is this a subpage?
 isSubpageOf (Title $title)
 Check if this title is a subpage of another title.
 isTalkPage ()
 Is this a talk page of some sort?
 isTrans ()
 Determine whether the object refers to a page within this project and is transcludable.
 isValidMoveOperation (&$nt, $auth=true, $reason= '')
 Check whether a given move operation would be valid.
 isValidMoveTarget ($nt)
 Checks if $this can be moved to a given Title.
 isValidRedirectTarget ()
 Check if this Title is a valid redirect target.
 isWatchable ()
 Can this title be added to a user's watchlist?
 isWikitextPage ()
 Does that page contain wikitext, or it is JS, CSS or whatever?
 loadFromRow ($row)
 Load Title object fields from a DB row.
 loadRestrictions ($oldFashionedRestrictions=null)
 Load restrictions from the page_restrictions table.
 loadRestrictionsFromRows ($rows, $oldFashionedRestrictions=null)
 Compiles list of active page restrictions from both page table (pre 1.10) and page_restrictions table for this existing page.
 moveNoAuth (&$nt)
 Move this page without authentication.
 moveSubpages ($nt, $auth=true, $reason= '', $createRedirect=true)
 Move this page's subpages to be subpages of $nt.
 moveTo (&$nt, $auth=true, $reason= '', $createRedirect=true)
 Move a title to a new location.
 pageCond ()
 Get an associative array for selecting this title from the "page" table.
 purgeSquid ()
 Purge all applicable Squid URLs.
 quickUserCan ($action, $user=null)
 Can $user perform $action on this page? This skips potentially expensive cascading permission checks as well as avoids expensive error formatting.
 resetArticleID ($newid)
 This clears some fields in this object, and clears any associated keys in the "bad links" section of the link cache.
 setFragment ($fragment)
 Set the fragment for this title.
 touchLinks ()
 Update page_touched timestamps and send squid purge messages for pages linking to this title.
 updateTitleProtection ($create_perm, $reason, $expiry)
 Update the title protection status.
 userCan ($action, $user=null, $doExpensiveQueries=true)
 Can $user perform $action on this page?
 userCanEditCssSubpage ()
 Protect css subpages of user pages: can $wgUser edit this page?
 userCanEditJsSubpage ()
 Protect js subpages of user pages: can $wgUser edit this page?
 userCanRead ()
 Can $wgUser read this page?
 userIsWatching ()
 Is $wgUser watching this page?

Static Public Member Functions

static capitalize ($text, $ns=NS_MAIN)
 Capitalize a text string for a title if it belongs to a namespace that capitalizes.
static compare ($a, $b)
 Callback for usort() to do title sorts by (namespace, title)
static escapeFragmentForURL ($fragment)
 Escape a text fragment, say from a link, for a URL.
static getFilteredRestrictionTypes ($exists=true)
 Get a filtered list of all restriction types supported by this wiki.
static getTitleInvalidRegex ()
 Returns a simple regex that will match on characters and sequences invalid in titles.
static indexTitle ($ns, $title)
 Get a string representation of a title suitable for including in a search index.
static legalChars ()
 Get a regex character class describing the legal characters in a link.
static makeName ($ns, $title, $fragment= '', $interwiki= '')
 Make a prefixed DB key from a DB key and a namespace index.
static & makeTitle ($ns, $title, $fragment= '', $interwiki= '')
 Create a new Title from a namespace index and a DB key.
static makeTitleSafe ($ns, $title, $fragment= '', $interwiki= '')
 Create a new Title from a namespace index and a DB key.
static nameOf ($id)
 Get the prefixed DB key associated with an ID.
static newFromDBkey ($key)
 Create a new Title from a prefixed DB key.
static newFromID ($id, $flags=0)
 Create a new Title from an article ID.
static newFromIDs ($ids)
 Make an array of titles from an array of IDs.
static newFromRedirect ($text)
 Extract a redirect destination from a string and return the Title, or null if the text doesn't contain a valid redirect This will only return the very next target, useful for the redirect table and other checks that don't need full recursion.
static newFromRedirectArray ($text)
 Extract a redirect destination from a string and return an array of Titles, or null if the text doesn't contain a valid redirect The last element in the array is the final destination after all redirects have been resolved (up to $wgMaxRedirects times)
static newFromRedirectRecurse ($text)
 Extract a redirect destination from a string and return the Title, or null if the text doesn't contain a valid redirect This will recurse down $wgMaxRedirects times or until a non-redirect target is hit in order to provide (hopefully) the Title of the final destination instead of another redirect.
static newFromRow ($row)
 Make a Title object from a DB row.
static newFromText ($text, $defaultNamespace=NS_MAIN)
 Create a new Title from text, such as what one would find in a link.
static newFromURL ($url)
 THIS IS NOT THE FUNCTION YOU WANT.
static newMainPage ()
 Create a new Title for the Main Page.
static purgeExpiredRestrictions ()
 Purge expired restrictions from the page_restrictions table.

Public Attributes

const CACHE_MAX = 1000
 Title::newFromText maintains a cache to avoid expensive re-normalization of commonly used titles.
const GAID_FOR_UPDATE = 1
 Used to be GAID_FOR_UPDATE define.

Protected Member Functions

 getUserPermissionsErrorsInternal ($action, $user, $doExpensiveQueries=true, $short=false)
 Can $user perform $action on this page? This is an internal function, which checks ONLY that previously checked by userCan (i.e.
 validateFileMoveOperation ($nt)
 Check if the requested move target is a valid file move target.

Static Protected Member Functions

static newFromRedirectInternal ($text)
 Really extract the redirect destination Do not call this function directly, use one of the newFromRedirect* functions above.

Private Member Functions

 checkActionPermissions ($action, $user, $errors, $doExpensiveQueries, $short)
 Check action permissions not already checked in checkQuickPermissions.
 checkCascadingSourcesRestrictions ($action, $user, $errors, $doExpensiveQueries, $short)
 Check restrictions on cascading pages.
 checkCSSandJSPermissions ($action, $user, $errors, $doExpensiveQueries, $short)
 Check CSS/JS sub-page permissions.
 checkPageRestrictions ($action, $user, $errors, $doExpensiveQueries, $short)
 Check against page_restrictions table requirements on this page.
 checkPermissionHooks ($action, $user, $errors, $doExpensiveQueries, $short)
 Check various permission hooks.
 checkQuickPermissions ($action, $user, $errors, $doExpensiveQueries, $short)
 Permissions checks that fail most often, and which are easiest to test.
 checkReadPermissions ($action, $user, $errors, $doExpensiveQueries, $short)
 Check that the user is allowed to read this page.
 checkSpecialsAndNSPermissions ($action, $user, $errors, $doExpensiveQueries, $short)
 Check permissions on special pages & namespaces.
 checkUserBlock ($action, $user, $errors, $doExpensiveQueries, $short)
 Check that the user isn't blocked from editting.
 getTitleProtection ()
 Is this title subject to title protection? Title protection is the one applied against creation of such title.
 loadRestrictionsFromResultWrapper ($res, $oldFashionedRestrictions=null)
 Loads a string into mRestrictions array.
 missingPermissionError ($action, $short)
 Get a description array when the user doesn't have the right to perform $action (i.e.
 moveToInternal (&$nt, $reason= '', $createRedirect=true)
 Move page to a title which is either a redirect to the source page or nonexistent.
 prefix ($name)
 Prefix some arbitrary text with the namespace or interwiki prefix of this object.
 resultToError ($errors, $result)
 Add the resulting error code to the errors array.
 secureAndSplit ()
 Secure and split - main initialisation function for this object.

Static Private Member Functions

static fixUrlQueryArgs ($query, $query2=false)
 Helper to fix up the get{Local,Full,Link,Canonical}URL args get{Canonical,Full,Link,Local}URL methods accepted an optional second argument named variant.

Static Private Attributes

Static cache variables
static $titleCache = array()

Private member variables

Please use the accessor functions instead.

Access:
private
 $mTextform = ''
 Cascade restrictions on this page to included templates and images?
 $mUrlform = ''
 Cascade restrictions on this page to included templates and images?
 $mDbkeyform = ''
 Cascade restrictions on this page to included templates and images?
 $mUserCaseDBKey
 Cascade restrictions on this page to included templates and images?
 $mNamespace = NS_MAIN
 Cascade restrictions on this page to included templates and images?
 $mInterwiki = ''
 Cascade restrictions on this page to included templates and images?
 $mFragment
 Cascade restrictions on this page to included templates and images?
 $mArticleID = -1
 Cascade restrictions on this page to included templates and images?
 $mLatestID = false
 Cascade restrictions on this page to included templates and images?
 $mRestrictions = array()
 Cascade restrictions on this page to included templates and images?
 $mOldRestrictions = false
 Cascade restrictions on this page to included templates and images?
 $mCascadeRestriction
 Cascade restrictions on this page to included templates and images?
 $mCascadingRestrictions
 Cascade restrictions on this page to included templates and images?
 $mRestrictionsExpiry = array()
 When do the restrictions on this page expire?
 $mHasCascadingRestrictions
 Are cascading restrictions in effect on this page?
 $mCascadeSources
 Where are the cascading restrictions coming from on this page?
 $mRestrictionsLoaded = false
 Boolean for initialisation on demand.
 $mPrefixedText
 Text form including namespace/interwiki, initialised on demand.
 $mTitleProtection
 Cached value for getTitleProtection (create protection)
 $mDefaultNamespace = NS_MAIN
 Cascade restrictions on this page to included templates and images?
 $mWatched = null
 Cascade restrictions on this page to included templates and images?
 $mLength = -1
 Cascade restrictions on this page to included templates and images?
 $mRedirect = null
 Cascade restrictions on this page to included templates and images?
 $mNotificationTimestamp = array()
 Cascade restrictions on this page to included templates and images?
 $mHasSubpage
 Cascade restrictions on this page to included templates and images?
 $mEstimateRevisions
 Cascade restrictions on this page to included templates and images?

Detailed Description

Represents a title within MediaWiki.

Optionally may contain an interwiki designation or namespace.

Note:
This class can fetch various kinds of data from the database; however, it does so inefficiently.

Definition at line 33 of file Title.php.


Constructor & Destructor Documentation

Constructor.

Definition at line 94 of file Title.php.


Member Function Documentation

Return a string representation of this title.

Returns:
String representation of this title

Definition at line 1145 of file Title.php.

References getPrefixedText().

Returns cascading restrictions for the current article.

Returns:
Boolean

Reimplemented in FakeTitle.

Definition at line 2505 of file Title.php.

References loadRestrictions().

Is this in a namespace that allows actual pages?

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 768 of file Title.php.

Could this title have a corresponding talk page?

Returns:
Bool TRUE or FALSE

Reimplemented in FakeTitle.

Definition at line 758 of file Title.php.

References MWNamespace\canTalk().

Whether the magic words __INDEX__ and __NOINDEX__ function for this page.

Returns:
Boolean

Reimplemented in FakeTitle.

Definition at line 4493 of file Title.php.

static Title::capitalize ( text,
ns = NS_MAIN 
) [static]

Capitalize a text string for a title if it belongs to a namespace that capitalizes.

Parameters:
$textString containing title to capitalize
$nsint namespace index, defaults to NS_MAIN
Returns:
String containing capitalized title

Definition at line 2910 of file Title.php.

References $wgContLang, and MWNamespace\isCapitalized().

Referenced by CategoryPager\__construct(), UploadBase\checkWarnings(), WithoutInterwikiPage\execute(), and secureAndSplit().

Title::checkActionPermissions ( action,
user,
errors,
doExpensiveQueries,
short 
) [private]

Check action permissions not already checked in checkQuickPermissions.

Parameters:
$actionString the action to check
$userUser to check
$errorsArray list of current errors
$doExpensiveQueriesBoolean whether or not to perform expensive queries
$shortBoolean short circuit on first error
Returns:
Array list of errors

Definition at line 1871 of file Title.php.

References $user, $wgLang, getNsText(), getTitleProtection(), getUserPermissionsErrorsInternal(), isBigDeletion(), MWNamespace\isMovable(), isMovable(), userCan(), and User\whoIs().

Title::checkCascadingSourcesRestrictions ( action,
user,
errors,
doExpensiveQueries,
short 
) [private]

Check restrictions on cascading pages.

Parameters:
$actionString the action to check
$userUser to check
$errorsArray list of current errors
$doExpensiveQueriesBoolean whether or not to perform expensive queries
$shortBoolean short circuit on first error
Returns:
Array list of errors

Definition at line 1832 of file Title.php.

References $page, $user, getCascadeProtectionSources(), and isCssJsSubpage().

Title::checkCSSandJSPermissions ( action,
user,
errors,
doExpensiveQueries,
short 
) [private]

Check CSS/JS sub-page permissions.

Parameters:
$actionString the action to check
$userUser user to check
$errorsArray list of current errors
$doExpensiveQueriesBoolean whether or not to perform expensive queries
$shortBoolean short circuit on first error
Returns:
Array list of errors

Definition at line 1772 of file Title.php.

References $user, isCssSubpage(), and isJsSubpage().

Title::checkPageRestrictions ( action,
user,
errors,
doExpensiveQueries,
short 
) [private]

Check against page_restrictions table requirements on this page.

The user must possess all required rights for this action.

Parameters:
$actionString the action to check
$userUser user to check
$errorsArray list of current errors
$doExpensiveQueriesBoolean whether or not to perform expensive queries
$shortBoolean short circuit on first error
Returns:
Array list of errors

Definition at line 1801 of file Title.php.

References $user, and getRestrictions().

Title::checkPermissionHooks ( action,
user,
errors,
doExpensiveQueries,
short 
) [private]

Check various permission hooks.

Parameters:
$actionString the action to check
$userUser user to check
$errorsArray list of current errors
$doExpensiveQueriesBoolean whether or not to perform expensive queries
$shortBoolean short circuit on first error
Returns:
Array list of errors

Definition at line 1712 of file Title.php.

References $result, $user, resultToError(), and wfRunHooks().

Title::checkQuickPermissions ( action,
user,
errors,
doExpensiveQueries,
short 
) [private]

Permissions checks that fail most often, and which are easiest to test.

Parameters:
$actionString the action to check
$userUser user to check
$errorsArray list of current errors
$doExpensiveQueriesBoolean whether or not to perform expensive queries
$shortBoolean short circuit on first error
Returns:
Array list of errors

Definition at line 1624 of file Title.php.

References $user, isSubpage(), isTalkPage(), and missingPermissionError().

Title::checkReadPermissions ( action,
user,
errors,
doExpensiveQueries,
short 
) [private]

Check that the user is allowed to read this page.

Parameters:
$actionString the action to check
$userUser to check
$errorsArray list of current errors
$doExpensiveQueriesBoolean whether or not to perform expensive queries
$shortBoolean short circuit on first error
Returns:
Array list of errors

Definition at line 1992 of file Title.php.

References $user, getDBkey(), getNamespace(), getPrefixedText(), SpecialPage\getTitleFor(), isSpecial(), isSpecialPage(), missingPermissionError(), SpecialPageFactory\resolveAlias(), and wfRunHooks().

Title::checkSpecialsAndNSPermissions ( action,
user,
errors,
doExpensiveQueries,
short 
) [private]

Check permissions on special pages & namespaces.

Parameters:
$actionString the action to check
$userUser user to check
$errorsArray list of current errors
$doExpensiveQueriesBoolean whether or not to perform expensive queries
$shortBoolean short circuit on first error
Returns:
Array list of errors

Definition at line 1742 of file Title.php.

References $user, getNsText(), isNamespaceProtected(), and wfMessage().

Title::checkUserBlock ( action,
user,
errors,
doExpensiveQueries,
short 
) [private]

Check that the user isn't blocked from editting.

Parameters:
$actionString the action to check
$userUser to check
$errorsArray list of current errors
$doExpensiveQueriesBoolean whether or not to perform expensive queries
$shortBoolean short circuit on first error
Returns:
Array list of errors

Definition at line 1927 of file Title.php.

References $user, $wgContLang, $wgLang, false, wfMessage(), wfTimestamp(), and User\whoIs().

static Title::compare ( a,
b 
) [static]

Callback for usort() to do title sorts by (namespace, title)

Parameters:
$aTitle
$bTitle
Returns:
Integer: result of string comparison, or namespace comparison

Definition at line 592 of file Title.php.

Referenced by ApiQueryInfo\execute().

Title::countAuthorsBetween ( old,
new,
limit,
options = array() 
)

Get the number of authors between the given revisions or revision IDs.

Used for diffs and other things that really need it.

Parameters:
$oldint|Revision Old revision or rev ID (first before range by default)
$newint|Revision New revision or rev ID (first after range by default)
$limitint Maximum number of authors
$optionsstring|array (Optional): Single option, or an array of options: 'include_old' Include $old in the range; $new is excluded. 'include_new' Include $new in the range; $old is excluded. 'include_both' Include both $old and $new in the range. Unknown option values are ignored.
Returns:
int Number of revision authors in the range; zero if not both revisions exist

Definition at line 4100 of file Title.php.

References $dbr, $limit, $options, $res, getArticleID(), Revision\newFromTitle(), and wfGetDB().

Title::countRevisionsBetween ( old,
new 
)

Get the number of revisions between the given revision.

Used for diffs and other things that really need it.

Parameters:
$oldint|Revision Old revision or rev ID (first before range)
$newint|Revision New revision or rev ID (first after range)
Returns:
Int Number of revisions between these revisions.

Reimplemented in FakeTitle.

Definition at line 4065 of file Title.php.

References $dbr, getArticleID(), Revision\newFromTitle(), and wfGetDB().

Remove any title protection due to page existing.

Reimplemented in FakeTitle.

Definition at line 2274 of file Title.php.

References getDBkey(), getNamespace(), and wfGetDB().

Title::equals ( Title title)

Compare with another title.

Parameters:
$titleTitle
Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 4153 of file Title.php.

References getDBkey(), getInterwiki(), and getNamespace().

Referenced by inNamespace(), isMainPage(), and isValidMoveOperation().

Title::escapeCanonicalURL ( query = '',
query2 = false 
)

HTML-escaped version of getCanonicalURL()

See getLocalURL for the arguments.

See also:
self::getLocalURL
Since:
1.18
Returns:
string

Definition at line 1497 of file Title.php.

References getCanonicalURL(), and wfDeprecated().

static Title::escapeFragmentForURL ( fragment) [static]

Escape a text fragment, say from a link, for a URL.

Parameters:
$fragmentstring containing a URL or link fragment (after the "#")
Returns:
String: escaped string

Definition at line 576 of file Title.php.

References Sanitizer\escapeId().

Referenced by getFragmentForURL().

Title::escapeFullURL ( query = '',
query2 = false 
)

Get an HTML-escaped version of the URL form, suitable for using in a link, including the server name and fragment.

See getLocalURL for the arguments.

See also:
self::getLocalURL
Returns:
String the URL

Reimplemented in FakeTitle.

Definition at line 1440 of file Title.php.

References getFullURL(), and wfDeprecated().

Title::escapeLocalURL ( query = '',
query2 = false 
)

Get an HTML-escaped version of the URL form, suitable for using in a link, without a server name or fragment.

See getLocalURL for the arguments.

See also:
self::getLocalURL
Parameters:
$querystring
$query2bool|string
Returns:
String the URL

Reimplemented in FakeTitle.

Definition at line 1426 of file Title.php.

References getLocalURL(), and wfDeprecated().

Get the approximate revision count of this page.

Returns:
int

Definition at line 4043 of file Title.php.

References $dbr, exists(), getArticleID(), and wfGetDB().

Referenced by isBigDeletion().

Check if page exists.

For historical reasons, this function simply checks for the existence of the title in the page table, and will thus return false for interwiki links, special pages and the like. If you want to know if a title can be meaningfully viewed, you should probably call the isKnown() method instead.

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 4181 of file Title.php.

References getArticleID().

Referenced by estimateRevisionCount(), getRestrictionTypes(), getTitleProtection(), hasSourceText(), isAlwaysKnown(), isKnown(), isSemiProtected(), isValidMoveOperation(), and loadRestrictions().

If the Title refers to a special page alias which is not the local default, resolve the alias, and localise the name as necessary.

Otherwise, return $this

Returns:
Title

Reimplemented in FakeTitle.

Definition at line 812 of file Title.php.

References SpecialPageFactory\getLocalNameFor(), isSpecialPage(), makeTitle(), and SpecialPageFactory\resolveAlias().

static Title::fixUrlQueryArgs ( query,
query2 = false 
) [static, private]

Helper to fix up the get{Local,Full,Link,Canonical}URL args get{Canonical,Full,Link,Local}URL methods accepted an optional second argument named variant.

This was deprecated in favor of passing an array of option with a "variant" key Once $query2 is removed for good, this helper can be dropped andthe wfArrayToCGI moved to getLocalURL();

Since:
1.19 (r105919)
Parameters:
$query
$query2bool
Returns:
String

Definition at line 1240 of file Title.php.

References wfDeprecated().

Referenced by getCanonicalURL(), getFullURL(), getInternalURL(), and getLocalURL().

Flush the protection cache in this object and force reload from the database.

This is used when updating protection from WikiPage::doUpdateRestrictions().

Definition at line 2662 of file Title.php.

Title::getArticleID ( flags = 0)

Get the article ID for this Title from the link cache, adding it if necessary.

Parameters:
$flagsInt a bit field; may be Title::GAID_FOR_UPDATE to select for update
Returns:
Int the ID

Reimplemented in FakeTitle.

Definition at line 2796 of file Title.php.

References getNamespace(), and LinkCache\singleton().

Referenced by countAuthorsBetween(), countRevisionsBetween(), estimateRevisionCount(), exists(), getBrokenLinksFrom(), getFirstRevision(), getLatestRevID(), getLength(), getLinksFrom(), getNextRevisionID(), getParentCategories(), getPreviousRevisionID(), isRedirect(), isValidMoveOperation(), loadRestrictions(), loadRestrictionsFromRows(), moveSubpages(), moveTo(), and moveToInternal().

Get a backlink cache object.

Returns:
BacklinkCache

Reimplemented in FakeTitle.

Definition at line 4484 of file Title.php.

References BacklinkCache\get().

Get the base page name, i.e.

the leftmost part before any slashes

Returns:
String Base name

Reimplemented in FakeTitle.

Definition at line 1168 of file Title.php.

References getText(), and MWNamespace\hasSubpages().

Get an array of Title objects referring to non-existent articles linked from this page.

Todo:
check if needed (used only in SpecialBrokenRedirects.php, and should use redirect table in this case)
Returns:
Array of Title the Title objects

Reimplemented in FakeTitle.

Definition at line 3251 of file Title.php.

References $dbr, $res, getArticleID(), makeTitle(), and wfGetDB().

Title::getCanonicalURL ( query = '',
query2 = false 
)

Get the URL for a canonical link, for use in things like IRC and e-mail notifications.

Uses $wgCanonicalServer and the GetCanonicalURL hook.

NOTE: Unlike getInternalURL(), the canonical URL includes the fragment

See getLocalURL for the arguments.

See also:
self::getLocalURL
Returns:
string The URL
Since:
1.18

Definition at line 1481 of file Title.php.

References $url, fixUrlQueryArgs(), getFragmentForURL(), getLocalURL(), wfExpandUrl(), and wfRunHooks().

Referenced by escapeCanonicalURL().

Title::getCascadeProtectionSources ( getPages = true)

Cascading protection: Get the source of any cascading restrictions on this page.

Parameters:
$getPagesBool Whether or not to retrieve the actual pages that the restrictions have come from.
Returns:
Mixed Array of Title objects of the pages from which cascading restrictions have come, false for none, or true if such restrictions exist, but $getPages was not set. The restriction array is an array of each type, each of which contains a array of unique groups.

Reimplemented in FakeTitle.

Definition at line 2383 of file Title.php.

References $dbr, $res, $wgContLang, getDBkey(), getNamespace(), makeTitle(), purgeExpiredRestrictions(), wfGetDB(), wfProfileIn(), wfProfileOut(), and wfTimestampNow().

Referenced by checkCascadingSourcesRestrictions(), and isCascadeProtected().

Title::getCategorySortkey ( prefix = '')

Returns the raw sort key to be used for categories, with the specified prefix.

This will be fed to Collation::getSortKey() to get a binary sortkey that can be used for actual sorting.

Parameters:
$prefixstring The prefix to be used, specified using {{defaultsort:}} or like [[Category:Foo|prefix]]. Empty for no prefix.
Returns:
string

Definition at line 4514 of file Title.php.

References getText(), and wfRunHooks().

Get the default message text or false if the message doesn't exist.

Returns:
String or false

Definition at line 4287 of file Title.php.

References $wgContLang, getNamespace(), MessageCache\singleton(), and wfMessage().

Get the default namespace index, for when there is no namespace.

Returns:
Int Default namespace index

Reimplemented in FakeTitle.

Definition at line 1043 of file Title.php.

Title::getEarliestRevTime ( flags = 0)

Get the oldest revision timestamp of this page.

Parameters:
$flagsInt Title::GAID_FOR_UPDATE
Returns:
String: MW timestamp

Reimplemented in FakeTitle.

Definition at line 4007 of file Title.php.

References getFirstRevision().

Get the edit URL for this Title.

Returns:
String the URL, or a null string if this is an interwiki link

Reimplemented in FakeTitle.

Definition at line 1508 of file Title.php.

References $s, and getLocalURL().

Get the HTML-escaped displayable text form.

Used for the title field in tags.

Returns:
String the text, including any prefixes

Reimplemented in FakeTitle.

Definition at line 1200 of file Title.php.

References getPrefixedText(), and wfDeprecated().

static Title::getFilteredRestrictionTypes ( exists = true) [static]

Get a filtered list of all restriction types supported by this wiki.

Parameters:
bool$existsTrue to get all restriction types that apply to titles that do exist, False for all restriction types that apply to titles that do not exist
Returns:
array

Definition at line 2180 of file Title.php.

Referenced by ApiQueryAllPages\getAllowedParams(), getRestrictionTypes(), and SpecialProtectedpages\getTypeMenu().

Title::getFirstRevision ( flags = 0)

Get the first revision of the page.

Parameters:
$flagsInt Title::GAID_FOR_UPDATE
Returns:
Revision|Null if page doesn't exist

Reimplemented in FakeTitle.

Definition at line 3985 of file Title.php.

References GAID_FOR_UPDATE, getArticleID(), Revision\selectFields(), and wfGetDB().

Referenced by getEarliestRevTime().

Get the Title fragment (i.e. the bit after the #) in text form.

Returns:
String Title fragment

Reimplemented in FakeTitle.

Definition at line 1062 of file Title.php.

Referenced by getLinkURL(), and Linker\normaliseSpecialPage().

Get the fragment in URL form, including the "#" character if there is one.

Returns:
String Fragment in URL form

Reimplemented in FakeTitle.

Definition at line 1070 of file Title.php.

References escapeFragmentForURL().

Referenced by getCanonicalURL(), getFullURL(), and getLinkURL().

Get the prefixed title with spaces, plus any fragment (part beginning with '#')

Returns:
String the prefixed title, with spaces and the fragment, including '#'

Reimplemented in FakeTitle.

Definition at line 1155 of file Title.php.

References getPrefixedText().

Referenced by getParentCategories().

Title::getFullURL ( query = '',
query2 = false,
proto = PROTO_RELATIVE 
)

Get a real URL referring to this title, with interwiki link and fragment.

See getLocalURL for the arguments.

See also:
self::getLocalURL
wfExpandUrl
Parameters:
$protoProtocol type to use in URL
Returns:
String the URL

Definition at line 1276 of file Title.php.

References $url, fixUrlQueryArgs(), getFragmentForURL(), getLocalURL(), wfExpandUrl(), and wfRunHooks().

Referenced by escapeFullURL(), and getLinkURL().

Get title for search index.

Returns:
String a stripped-down title string ready for the search index

Reimplemented in FakeTitle.

Definition at line 1053 of file Title.php.

References indexTitle().

Title::getInternalURL ( query = '',
query2 = false 
)

Get the URL form for an internal link.

  • Used in various Squid-related code, in case we have a different internal hostname for the server from the exposed one.

This uses $wgInternalServer to qualify the path, or $wgServer if $wgInternalServer is not set. If the server variable used is protocol-relative, the URL will be expanded to http://

See getLocalURL for the arguments.

See also:
self::getLocalURL
Returns:
String the URL

Reimplemented in FakeTitle.

Definition at line 1459 of file Title.php.

References $url, fixUrlQueryArgs(), getLocalURL(), wfExpandUrl(), and wfRunHooks().

Referenced by getSquidURLs().

Get the interwiki prefix (or null string)

Returns:
String Interwiki prefix

Reimplemented in FakeTitle.

Definition at line 628 of file Title.php.

Referenced by equals(), getRedirectsHere(), isMovable(), and isSubpageOf().

Title::getLatestRevID ( flags = 0)

What is the page_latest field for this page?

Parameters:
$flagsInt a bit field; may be Title::GAID_FOR_UPDATE to select for update
Returns:
Int or 0 if the page doesn't exist

Reimplemented in FakeTitle.

Definition at line 2862 of file Title.php.

References GAID_FOR_UPDATE, getArticleID(), and LinkCache\singleton().

Title::getLength ( flags = 0)

What is the length of this page? Uses link cache, adding it if necessary.

Parameters:
$flagsInt a bit field; may be Title::GAID_FOR_UPDATE to select for update
Returns:
Int

Reimplemented in FakeTitle.

Definition at line 2842 of file Title.php.

References getArticleID(), and LinkCache\singleton().

Title::getLinksFrom ( options = array(),
table = 'pagelinks',
prefix = 'pl' 
)

Get an array of Title objects linked from this Title Also stores the IDs in the link cache.

WARNING: do not use this function on arbitrary user-supplied titles! On heavily-used templates it will max out the memory.

Parameters:
$optionsArray: may be FOR UPDATE
$tableString: table name
$prefixString: fields prefix
Returns:
Array of Title objects linking here

Definition at line 3187 of file Title.php.

References $options, $res, getArticleID(), makeTitle(), LinkCache\singleton(), and wfGetDB().

Referenced by getTemplateLinksFrom().

Title::getLinksTo ( options = array(),
table = 'pagelinks',
prefix = 'pl' 
)

Get an array of Title objects linking to this Title Also stores the IDs in the link cache.

WARNING: do not use this function on arbitrary user-supplied titles! On heavily-used templates it will max out the memory.

Parameters:
$optionsArray: may be FOR UPDATE
$tableString: table name
$prefixString: fields prefix
Returns:
Array of Title objects linking here

Reimplemented in FakeTitle.

Definition at line 3129 of file Title.php.

References $options, $res, getDBkey(), getNamespace(), makeTitle(), LinkCache\singleton(), and wfGetDB().

Referenced by getTemplateLinksTo().

Title::getLinkURL ( query = '',
query2 = false 
)

Get a URL that's the simplest URL that will be valid to link, locally, to the current Title.

It includes the fragment, but does not include the server unless action=render is used (or the link is external). If there's a fragment but the prefixed text is empty, we just return a link to the fragment.

The result obviously should not be URL-escaped, but does need to be HTML-escaped if it's being output in HTML.

See getLocalURL for the arguments.

See also:
self::getLocalURL
Returns:
String the URL

Reimplemented in FakeTitle.

Definition at line 1402 of file Title.php.

References getFragment(), getFragmentForURL(), getFullURL(), getLocalURL(), getPrefixedText(), isExternal(), wfProfileIn(), and wfProfileOut().

Title::getLocalURL ( query = '',
query2 = false 
)

Get a URL with no fragment or server name.

If this page is generated with action=render, $wgServer is prepended.

Parameters:
$querystring|array an optional query string, not used for interwiki links. Can be specified as an associative array as well, e.g., array( 'action' => 'edit' ) (keys and values will be URL-escaped). Some query patterns will trigger various shorturl path replacements.
$query2Mixed: An optional secondary query array. This one MUST be an array. If a string is passed it will be interpreted as a deprecated variant argument and urlencoded into a variant= argument. This second query argument will be added to the $query The second parameter is deprecated since 1.19. Pass it as a key,value pair in the first parameter array instead.
Returns:
String the URL

Reimplemented in FakeTitle.

Definition at line 1312 of file Title.php.

References $matches, $url, $wgActionPaths, $wgArticlePath, Interwiki\fetch(), fixUrlQueryArgs(), getDBkey(), getNsText(), getPageLanguage(), getPrefixedDBkey(), wfAppendQuery(), wfRunHooks(), and wfUrlencode().

Referenced by escapeLocalURL(), getCanonicalURL(), getEditURL(), getFullURL(), getInternalURL(), getLinkURL(), and Linker\makeThumbLink2().

Title::getNamespaceKey ( prepend = 'nstab-')

Generate strings used for xml 'id' names in monobook tabs.

Parameters:
$prependstring defaults to 'nstab-'
Returns:
String XML 'id' name

Reimplemented in FakeTitle.

Definition at line 4395 of file Title.php.

References $wgContLang, MWNamespace\exists(), MWNamespace\getCanonicalName(), getNamespace(), MWNamespace\getSubject(), and getSubjectNsText().

Title::getNextRevisionID ( revId,
flags = 0 
)

Get the revision ID of the next revision.

Parameters:
$revIdInt Revision ID. Get the revision that was after this one.
$flagsInt Title::GAID_FOR_UPDATE
Returns:
Int|Bool Next revision ID, or FALSE if none exists

Reimplemented in FakeTitle.

Definition at line 3961 of file Title.php.

References GAID_FOR_UPDATE, getArticleID(), and wfGetDB().

Title::getNotificationTimestamp ( user = null)

Get the timestamp when this page was updated since the user last saw it.

Parameters:
$userUser
Returns:
String|Null

Reimplemented in FakeTitle.

Definition at line 4357 of file Title.php.

References $dbr, $user, $wgUser, getDBkey(), getNamespace(), and wfGetDB().

Get the language in which the content of this page is written in wikitext.

Defaults to $wgContLang, but in certain cases it can be e.g. $wgLang (such as special pages, which are in the user language).

Since:
1.18
Returns:
Language

Definition at line 4541 of file Title.php.

References $wgContLang, $wgLang, getNamespace(), getText(), isCssJsSubpage(), isCssOrJsPage(), isSpecialPage(), MessageCache\singleton(), wfGetLangObj(), and wfRunHooks().

Referenced by getLocalURL(), getPageViewLanguage(), and getSquidURLs().

Get the language in which the content of this page is written when viewed by user.

Defaults to $wgContLang, but in certain cases it can be e.g. $wgLang (such as special pages, which are in the user language).

Since:
1.20
Returns:
Language

Definition at line 4570 of file Title.php.

References Language\factory(), getNamespace(), getPageLanguage(), isCssJsSubpage(), isCssOrJsPage(), and isSpecialPage().

Get categories to which this Title belongs and return an array of categories' names.

Returns:
Array of parents in the form: $parent => $currentarticle

Reimplemented in FakeTitle.

Definition at line 3857 of file Title.php.

References $dbr, $res, $wgContLang, getArticleID(), getFullText(), and wfGetDB().

Referenced by getParentCategoryTree().

Title::getParentCategoryTree ( children = array())

Get a tree of parent categories.

Parameters:
$childrenArray with the children in the keys, to check for circular refs
Returns:
Array Tree of parent categories

Reimplemented in FakeTitle.

Definition at line 3893 of file Title.php.

References getParentCategories(), and newFromText().

Get the URL-encoded form of the main part.

Returns:
String Main part of the title, URL-encoded

Reimplemented in FakeTitle.

Definition at line 673 of file Title.php.

Get the prefixed database key form.

Returns:
String the prefixed title, with underscores and any interwiki and namespace prefixes

Reimplemented in FakeTitle.

Definition at line 1118 of file Title.php.

References $s, and prefix().

Referenced by DoubleRedirectJob\getFinalDestination(), getLocalURL(), isValidMoveTarget(), and Linker\makeImageLink().

Get the prefixed title with spaces.

This is the form usually used for display

Returns:
String the prefixed title, with spaces

Reimplemented in FakeTitle.

Definition at line 1130 of file Title.php.

References $s, and prefix().

Referenced by __toString(), Linker\buildRollbackLink(), checkReadPermissions(), getEscapedText(), getFullText(), getLinkURL(), getRestrictionTypes(), SpecialContributions\getUserLinks(), Linker\makeBrokenImageLinkObj(), and moveTo().

Get a URL-encoded title (not an actual URL) including interwiki.

Returns:
String the URL-encoded form

Reimplemented in FakeTitle.

Definition at line 1221 of file Title.php.

References $s, prefix(), and wfUrlencode().

Title::getPreviousRevisionID ( revId,
flags = 0 
)

Get the revision ID of the previous revision.

Parameters:
$revIdInt Revision ID. Get the revision that was before this one.
$flagsInt Title::GAID_FOR_UPDATE
Returns:
Int|Bool Old revision ID, or FALSE if none exists

Reimplemented in FakeTitle.

Definition at line 3936 of file Title.php.

References GAID_FOR_UPDATE, getArticleID(), and wfGetDB().

Title::getRedirectsHere ( ns = null)

Get all extant redirects to this Title.

Parameters:
$nsInt|Null Single namespace to consider; NULL to consider all namespaces
Returns:
Array of Title redirects to this title

Reimplemented in FakeTitle.

Definition at line 4426 of file Title.php.

References $dbr, $res, getDBkey(), getInterwiki(), getNamespace(), isExternal(), newFromRow(), and wfGetDB().

Get the expiry time for the restriction against a given action.

Parameters:
$action
Returns:
String|Bool 14-char timestamp, or 'infinity' if the page is protected forever or not protected at all, or false if the action is not recognised.

Reimplemented in FakeTitle.

Definition at line 2493 of file Title.php.

References loadRestrictions().

Title::getRestrictions ( action)

Accessor/initialisation for mRestrictions.

Parameters:
$actionString action that permission needs to be checked for
Returns:
Array of Strings the array of groups allowed to edit this article

Reimplemented in FakeTitle.

Definition at line 2477 of file Title.php.

References loadRestrictions().

Referenced by checkPageRestrictions(), isProtected(), and isSemiProtected().

Returns restriction types for the current Title.

Returns:
array applicable restriction types

Reimplemented in FakeTitle.

Definition at line 2198 of file Title.php.

References exists(), getFilteredRestrictionTypes(), getNamespace(), getPrefixedText(), isSpecialPage(), wfDebug(), and wfRunHooks().

Referenced by isProtected(), and loadRestrictionsFromRows().

Trim down a .css or .js subpage title to get the corresponding skin name.

Returns:
string containing skin name from .css or .js subpage title

Reimplemented in FakeTitle.

Definition at line 978 of file Title.php.

Get a list of URLs to purge from the Squid cache when this page changes.

Returns:
Array of String the URLs

Reimplemented in FakeTitle.

Definition at line 3288 of file Title.php.

References $urls, getInternalURL(), and getPageLanguage().

Referenced by purgeSquid().

Get the namespace text of the subject (rather than talk) page.

Returns:
String Namespace text

Reimplemented in FakeTitle.

Definition at line 738 of file Title.php.

References $wgContLang, and MWNamespace\getSubject().

Referenced by getNamespaceKey().

Get a title object associated with the subject page of this talk page.

Returns:
Title the object for the subject page

Reimplemented in FakeTitle.

Definition at line 1029 of file Title.php.

References getDBkey(), getNamespace(), MWNamespace\getSubject(), and makeTitle().

Title::getSubpages ( limit = -1)

Get all subpages of this page.

Parameters:
$limitInt maximum number of subpages to fetch; -1 for no limit
Returns:
mixed TitleArray, or empty array if this page's namespace doesn't allow subpages

Reimplemented in FakeTitle.

Definition at line 2718 of file Title.php.

References $dbr, $limit, $options, getDBkey(), getNamespace(), MWNamespace\hasSubpages(), TitleArray\newFromResult(), and wfGetDB().

Referenced by hasSubpages(), and moveSubpages().

Get the lowest-level subpage name, i.e.

the rightmost part after any slashes

Returns:
String Subpage name

Reimplemented in FakeTitle.

Definition at line 1186 of file Title.php.

References MWNamespace\hasSubpages().

Referenced by getSubpageUrlForm().

Get a URL-encoded form of the subpage text.

Returns:
String URL-encoded subpage name

Reimplemented in FakeTitle.

Definition at line 1210 of file Title.php.

References getSubpageText(), and wfUrlencode().

Get the namespace text of the talk page.

Returns:
String Namespace text

Reimplemented in FakeTitle.

Definition at line 748 of file Title.php.

References $wgContLang, and MWNamespace\getTalk().

Get a Title object associated with the talk page of this article.

Returns:
Title the object for the talk page

Reimplemented in FakeTitle.

Definition at line 1019 of file Title.php.

References getDBkey(), getNamespace(), MWNamespace\getTalk(), and makeTitle().

Title::getTemplateLinksFrom ( options = array())

Get an array of Title objects used on this Title as a template Also stores the IDs in the link cache.

WARNING: do not use this function on arbitrary user-supplied titles! On heavily-used templates it will max out the memory.

Parameters:
$optionsArray: may be FOR UPDATE
Returns:
Array of Title the Title objects used here

Definition at line 3241 of file Title.php.

References $options, and getLinksFrom().

Title::getTemplateLinksTo ( options = array())

Get an array of Title objects using this Title as a template Also stores the IDs in the link cache.

WARNING: do not use this function on arbitrary user-supplied titles! On heavily-used templates it will max out the memory.

Parameters:
$optionsArray: may be FOR UPDATE
Returns:
Array of Title the Title objects linking here

Reimplemented in FakeTitle.

Definition at line 3171 of file Title.php.

References $options, and getLinksTo().

Get the text form (spaces not underscores) of the main part.

Returns:
String Main part of the title

Reimplemented in FakeTitle.

Definition at line 664 of file Title.php.

Referenced by CategoryViewer\addSubcategoryObject(), getBaseText(), getCategorySortkey(), getNsText(), getPageLanguage(), isConversionTable(), isSubpage(), Parser\makeImage(), and Linker\makeMediaLinkFile().

static Title::getTitleInvalidRegex ( ) [static]

Returns a simple regex that will match on characters and sequences invalid in titles.

Note that this doesn't pick up many things that could be wrong with titles, but that replacing this regex with something valid will make many titles valid.

Returns:
String regex string

Definition at line 499 of file Title.php.

References legalChars().

Referenced by secureAndSplit().

Is this title subject to title protection? Title protection is the one applied against creation of such title.

Returns:
Mixed An associative array representing any existent title protection, or false if there's none.

Definition at line 2225 of file Title.php.

References $dbr, $res, exists(), getDBkey(), getNamespace(), and wfGetDB().

Referenced by checkActionPermissions(), and loadRestrictions().

Title::getTouched ( db = null)

Get the last touched timestamp.

Parameters:
$dbDatabaseBase: optional db
Returns:
String last-touched timestamp

Reimplemented in FakeTitle.

Definition at line 4345 of file Title.php.

References pageCond(), and wfGetDB().

Returns the DB name of the distant wiki which owns the object.

Returns:
String the DB name

Definition at line 651 of file Title.php.

References Interwiki\fetch().

Get the DB key with the initial letter case as specified by the user.

Returns:
String DB key

Reimplemented in FakeTitle.

Definition at line 691 of file Title.php.

Title::getUserPermissionsErrors ( action,
user,
doExpensiveQueries = true,
ignoreErrors = array() 
)

Can $user perform $action on this page?

Todo:
FIXME: This *does not* check throttles (User::pingLimiter()).
Parameters:
$actionString action that permission needs to be checked for
$userUser to check
$doExpensiveQueriesBool Set this to false to avoid doing unnecessary queries by skipping checks for cascading protections and user blocks.
$ignoreErrorsArray of Strings Set this to a list of message keys whose corresponding errors may be ignored.
Returns:
Array of arguments to wfMessage to explain permissions problems.

Reimplemented in FakeTitle.

Definition at line 1598 of file Title.php.

References $user, and getUserPermissionsErrorsInternal().

Referenced by isValidMoveOperation().

Title::getUserPermissionsErrorsInternal ( action,
user,
doExpensiveQueries = true,
short = false 
) [protected]

Can $user perform $action on this page? This is an internal function, which checks ONLY that previously checked by userCan (i.e.

it leaves out checks on wfReadOnly() and blocks)

Parameters:
$actionString action that permission needs to be checked for
$userUser to check
$doExpensiveQueriesBool Set this to false to avoid doing unnecessary queries.
$shortBool Set this to true to stop after the first permission error.
Returns:
Array of arrays of the arguments to wfMessage to explain permissions problems.

Definition at line 2112 of file Title.php.

References $user, wfProfileIn(), and wfProfileOut().

Referenced by checkActionPermissions(), getUserPermissionsErrors(), and userCan().

Does this page have source text?

Returns:
Boolean

Definition at line 4263 of file Title.php.

References $wgContLang, exists(), MessageCache\singleton(), and wfMessage().

Referenced by isAlwaysKnown().

Returns true if the title has the same subject namespace as the namespace specified.

For example this method will take NS_USER and return true if namespace is either NS_USER or NS_USER_TALK since both of them have NS_USER as their subject namespace.

This is MUCH simpler than individually testing for equivilance against both NS_USER and NS_USER_TALK, and is also forward compatible.

Since:
1.19
Parameters:
$nsint
Returns:
bool

Definition at line 874 of file Title.php.

References getNamespace(), and MWNamespace\subjectEquals().

Does this have subpages? (Warning, usually requires an extra DB query.)

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 2690 of file Title.php.

References getSubpages(), and MWNamespace\hasSubpages().

Referenced by isSubpage().

static Title::indexTitle ( ns,
title 
) [static]

Get a string representation of a title suitable for including in a search index.

Parameters:
$nsInt a namespace index
$titleString text-form main part
Returns:
String a stripped-down title string ready for the search index

Definition at line 527 of file Title.php.

References $t, $title, $wgContLang, and SearchEngine\legalSearchChars().

Referenced by SearchUpdate\doUpdate(), and getIndexTitle().

Title::inNamespace ( ns)

Returns true if the title is inside the specified namespace.

Please make use of this instead of comparing to getNamespace() This function is much more resistant to changes we may make to namespaces than code that makes direct comparisons.

Parameters:
$nsint The namespace
Returns:
bool
Since:
1.19

Definition at line 835 of file Title.php.

References equals(), and getNamespace().

Referenced by inNamespaces().

Returns true if the title is inside one of the specified namespaces.

Parameters:
...$namespacesThe namespaces to check for
Returns:
bool
Since:
1.19

Definition at line 846 of file Title.php.

References inNamespace().

Updates page_touched for this page; called from LinksUpdate.php.

Returns:
Bool true if the update succeded

Reimplemented in FakeTitle.

Definition at line 4309 of file Title.php.

References $success, HTMLFileCache\clearFileCache(), pageCond(), wfGetDB(), and wfReadOnly().

Should links to this title be shown as potentially viewable (i.e.

as "bluelinks"), even if there's no record by this title in the page table?

This function is semi-deprecated for public use, as well as somewhat misleadingly named. You probably just want to call isKnown(), which calls this function internally.

(ISSUE: Most of these checks are cheap, but the file existence check can potentially be quite expensive. Including it here fixes a lot of existing code, but we might want to add an optional parameter to skip it and any other expensive checks.)

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 4201 of file Title.php.

References exists(), getDBkey(), hasSourceText(), wfFindFile(), and wfRunHooks().

Referenced by isKnown().

Check whether the number of revisions of this page surpasses $wgDeleteRevisionsLimit.

Returns:
bool

Definition at line 4027 of file Title.php.

References estimateRevisionCount().

Referenced by checkActionPermissions().

Cascading protection: Return true if cascading restrictions apply to this page, false if not.

Returns:
Bool If the page is subject to cascading restrictions.

Reimplemented in FakeTitle.

Definition at line 2368 of file Title.php.

References getCascadeProtectionSources().

Is this Title in a namespace which contains content? In other words, is this a content page, for the purposes of calculating statistics, etc?

Returns:
Boolean

Reimplemented in FakeTitle.

Definition at line 885 of file Title.php.

References getNamespace(), and MWNamespace\isContent().

Is this a conversion table for the LanguageConverter?

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 936 of file Title.php.

References getNamespace(), and getText().

Is this a .css or .js subpage of a user page?

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 969 of file Title.php.

Referenced by checkCascadingSourcesRestrictions(), getPageLanguage(), getPageViewLanguage(), and isWikitextPage().

Could this page contain custom CSS or JavaScript, based on the title?

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 958 of file Title.php.

References wfRunHooks().

Referenced by getPageLanguage(), getPageViewLanguage(), and isWikitextPage().

Is this a .css subpage of a user page?

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 992 of file Title.php.

Referenced by checkCSSandJSPermissions().

Is there a version of this page in the deletion archive?

Returns:
Int the number of archived revisions

Reimplemented in FakeTitle.

Definition at line 2745 of file Title.php.

References $dbr, $n, getDBkey(), getNamespace(), and wfGetDB().

Is there a version of this page in the deletion archive?

Returns:
Boolean

Reimplemented in FakeTitle.

Definition at line 2770 of file Title.php.

References $dbr, getDBkey(), getNamespace(), and wfGetDB().

Is this Title interwiki?

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 619 of file Title.php.

Referenced by getLinkURL(), getRedirectsHere(), and isWatchable().

Is this a .js subpage of a user page?

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 1001 of file Title.php.

Referenced by checkCSSandJSPermissions().

Does this title refer to a page that can (or might) be meaningfully viewed? In particular, this function may be used to determine if links to the title should be rendered as "bluelinks" (as opposed to "redlinks" to non-existent pages).

Adding something else to this function will cause inconsistency since LinkHolderArray calls isAlwaysKnown() and does its own page existence check.

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 4254 of file Title.php.

References exists(), and isAlwaysKnown().

Determine whether the object refers to a page within this project.

Returns:
Bool TRUE if this is an in-project interwiki link or a wikilink, FALSE otherwise

Reimplemented in FakeTitle.

Definition at line 606 of file Title.php.

References Interwiki\fetch().

Is this the mainpage?

Note:
Title::newFromText seams to be sufficiently optimized by the title cache that we don't need to over-optimize by doing direct comparisons and acidentally creating new bugs where $title->equals( Title::newFromText() ) ends up reporting something differently than $title->isMainPage();
Since:
1.18
Returns:
Bool

Definition at line 916 of file Title.php.

References equals(), and newMainPage().

Would anybody with sufficient privileges be able to move this page? Some pages just aren't movable.

Returns:
Bool TRUE or FALSE

Reimplemented in FakeTitle.

Definition at line 895 of file Title.php.

References $result, getInterwiki(), getNamespace(), MWNamespace\isMovable(), and wfRunHooks().

Referenced by checkActionPermissions(), and isValidMoveOperation().

Determines if $user is unable to edit this page because it has been protected by $wgNamespaceProtection.

Parameters:
$userUser object to check permissions
Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 2350 of file Title.php.

References $wgNamespaceProtection, and User\isAllowed().

Referenced by checkSpecialsAndNSPermissions().

Check if this is a new page.

Returns:
bool

Reimplemented in FakeTitle.

Definition at line 4017 of file Title.php.

References $dbr, pageCond(), and wfGetDB().

Title::isProtected ( action = '')

Does the title correspond to a protected article?

Parameters:
$actionString the action the page is protected from, by default checks all actions.
Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 2318 of file Title.php.

References getRestrictions(), getRestrictionTypes(), and isSpecialPage().

Referenced by moveTo().

Title::isRedirect ( flags = 0)

Is this an article that is a redirect page? Uses link cache, adding it if necessary.

Parameters:
$flagsInt a bit field; may be Title::GAID_FOR_UPDATE to select for update
Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 2821 of file Title.php.

References getArticleID(), and LinkCache\singleton().

Referenced by CategoryViewer\addSubcategoryObject().

Title::isSemiProtected ( action = 'edit')

Is this page "semi-protected" - the *only* protection is autoconfirm?

Parameters:
$actionString Action to check (default: edit)
Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 2291 of file Title.php.

References exists(), and getRestrictions().

Checks if this page is just a one-rev redirect.

Adds lock, so don't use just for light purposes.

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 3773 of file Title.php.

References getDBkey(), getNamespace(), pageCond(), and wfGetDB().

Title::isSpecial ( name)

Returns true if this title resolves to the named special page.

Parameters:
$nameString The special page name
Returns:
boolean

Reimplemented in FakeTitle.

Definition at line 796 of file Title.php.

References getDBkey(), isSpecialPage(), and SpecialPageFactory\resolveAlias().

Referenced by checkReadPermissions(), and isValidRedirectTarget().

Returns true if this is a special page.

Returns:
boolean

Reimplemented in FakeTitle.

Definition at line 786 of file Title.php.

References getNamespace().

Referenced by SkinTemplate\buildPersonalUrls(), checkReadPermissions(), fixSpecialName(), getPageLanguage(), getPageViewLanguage(), getRestrictionTypes(), isProtected(), isSpecial(), and Linker\normaliseSpecialPage().

Is this a subpage?

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 925 of file Title.php.

References getText(), and hasSubpages().

Referenced by checkQuickPermissions().

Title::isSubpageOf ( Title title)

Check if this title is a subpage of another title.

Parameters:
$titleTitle
Returns:
Bool

Definition at line 4166 of file Title.php.

References getDBkey(), getInterwiki(), and getNamespace().

Is this a talk page of some sort?

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 1010 of file Title.php.

References getNamespace(), and MWNamespace\isTalk().

Referenced by checkQuickPermissions().

Determine whether the object refers to a page within this project and is transcludable.

Returns:
Bool TRUE if this is transcludable

Reimplemented in FakeTitle.

Definition at line 638 of file Title.php.

References Interwiki\fetch().

Title::isValidMoveOperation ( &$  nt,
auth = true,
reason = '' 
)

Check whether a given move operation would be valid.

Returns true if ok, or a getUserPermissionsErrors()-like array otherwise

Parameters:
$ntTitle the new title
$authBool indicates whether $wgUser's permissions should be checked
$reasonString is the log summary of the move, used for spam checking
Returns:
Mixed True on success, getUserPermissionsErrors()-like array on failure

Reimplemented in FakeTitle.

Definition at line 3337 of file Title.php.

References $wgUser, equals(), exists(), getArticleID(), getDBkey(), getNamespace(), getNsText(), getUserPermissionsErrors(), isMovable(), isValidMoveTarget(), EditPage\matchSummarySpamRegex(), validateFileMoveOperation(), wfMergeErrorArrays(), and wfRunHooks().

Referenced by moveTo().

Checks if $this can be moved to a given Title.

  • Selects for update, so don't call it unless you mean business
Parameters:
$ntTitle the new title to check
Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 3811 of file Title.php.

References $file, getPrefixedDBkey(), newFromText(), Revision\newFromTitle(), IDBAccessObject\READ_LATEST, wfDebug(), and wfLocalFile().

Referenced by isValidMoveOperation().

Check if this Title is a valid redirect target.

Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 4462 of file Title.php.

References isSpecial().

Referenced by newFromRedirectArray().

Can this title be added to a user's watchlist?

Returns:
Bool TRUE or FALSE

Reimplemented in FakeTitle.

Definition at line 777 of file Title.php.

References getNamespace(), and isExternal().

Does that page contain wikitext, or it is JS, CSS or whatever?

Returns:
Bool

Definition at line 946 of file Title.php.

References isCssJsSubpage(), isCssOrJsPage(), and wfRunHooks().

static Title::legalChars ( ) [static]

Get a regex character class describing the legal characters in a link.

Returns:
String the list of characters, not delimited

Definition at line 487 of file Title.php.

Referenced by ImageCleanup\buildSafeTitle(), languages\getMessagesWithDubiousLinks(), getTitleInvalidRegex(), Parser_LinkHooks\replaceInternalLinks2(), TitleTest\testLegalChars(), and wfStripIllegalFilenameChars().

Title::loadFromRow ( row)

Load Title object fields from a DB row.

If false is given, the title will be treated as non-existing.

Parameters:
$rowObject|bool database row

Definition at line 275 of file Title.php.

References if.

Title::loadRestrictions ( oldFashionedRestrictions = null)

Load restrictions from the page_restrictions table.

Parameters:
$oldFashionedRestrictionsString comma-separated list of page restrictions from page table (pre 1.10)

Reimplemented in FakeTitle.

Definition at line 2621 of file Title.php.

References $dbr, $res, $wgContLang, exists(), getArticleID(), getTitleProtection(), loadRestrictionsFromResultWrapper(), purgeExpiredRestrictions(), wfGetDB(), and wfTimestampNow().

Referenced by areRestrictionsCascading(), getRestrictionExpiry(), and getRestrictions().

Title::loadRestrictionsFromResultWrapper ( res,
oldFashionedRestrictions = null 
) [private]

Loads a string into mRestrictions array.

Parameters:
$resResource restrictions as an SQL result.
$oldFashionedRestrictionsString comma-separated list of page restrictions from page table (pre 1.10)

Definition at line 2520 of file Title.php.

References $res, and loadRestrictionsFromRows().

Referenced by loadRestrictions().

Title::loadRestrictionsFromRows ( rows,
oldFashionedRestrictions = null 
)

Compiles list of active page restrictions from both page table (pre 1.10) and page_restrictions table for this existing page.

Public for usage by LiquidThreads.

Parameters:
$rowsarray of db result objects
$oldFashionedRestrictionsstring comma-separated list of page restrictions from page table (pre 1.10)

Reimplemented in FakeTitle.

Definition at line 2539 of file Title.php.

References $dbr, $wgContLang, getArticleID(), getRestrictionTypes(), purgeExpiredRestrictions(), wfGetDB(), and wfTimestampNow().

Referenced by loadRestrictionsFromResultWrapper().

static Title::makeName ( ns,
title,
fragment = '',
interwiki = '' 
) [static]

Make a prefixed DB key from a DB key and a namespace index.

Parameters:
$nsInt numerical representation of the namespace
$titleString the DB key form the title
$fragmentString The link fragment (after the "#")
$interwikiString The interwiki prefix
Returns:
String the prefixed form of the title

Definition at line 556 of file Title.php.

References $title, and $wgContLang.

Referenced by MovePageForm\doSubmit(), LinkHolderArray\doVariants(), makeTitleSafe(), nameOf(), and TitleCleanup\processRow().

static& Title::makeTitle ( ns,
title,
fragment = '',
interwiki = '' 
) [static]

Create a new Title from a namespace index and a DB key.

It's assumed that $ns and $title are *valid*, for instance when they came directly from the database or a special page name. For convenience, spaces are converted to underscores so that eg user_text fields can be used directly.

Parameters:
$nsInt the namespace of the article
$titleString the unprefixed database key form
$fragmentString the link fragment (after the "#")
$interwikiString the interwiki prefix
Returns:
Title the new object

Definition at line 306 of file Title.php.

References $t, $title, and wfUrlencode().

Referenced by FakeDimensionFile\__construct(), NewParserTest\addDBData(), LinkBatch\addResultToCache(), ProtectionForm\buildForm(), LocalRepo\checkRedirect(), Orphans\checkSeparation(), CompressOld\compressWithConcat(), SpecialTags\doTagRow(), LinkHolderArray\doVariants(), CheckBadRedirects\execute(), ApiQueryDeletedrevs\execute(), DeleteDefaultMessages\execute(), ApiQueryFilearchive\execute(), DumpSisterSites\execute(), AttachLatest\execute(), FixDoubleRedirects\execute(), DumpLinks\execute(), NukeNS\execute(), ApiQueryRandom\extractRowInfo(), ApiQueryWatchlist\extractRowInfo(), ApiQueryLogEvents\extractRowInfo(), ApiQueryContributions\extractRowInfo(), ApiQueryRecentChanges\extractRowInfo(), ApiFeedContributions\feedItem(), SpecialNewpages\feedItem(), SpecialRecentChanges\filterByCategories(), ForeignAPIRepo\findBySha1(), DoubleRedirectJob\fixRedirects(), fixSpecialName(), FeedUtils\formatDiff(), ApiParse\formatLinks(), WantedCategoriesPage\formatResult(), UnusedCategoriesPage\formatResult(), AncientPagesPage\formatResult(), UnusedtemplatesPage\formatResult(), DoubleRedirectsPage\formatResult(), BrokenRedirectsPage\formatResult(), MIMEsearchPage\formatResult(), ListredirectsPage\formatResult(), DisambiguationsPage\formatResult(), LinkSearchPage\formatResult(), CategoryPager\formatRow(), NewFilesPager\formatRow(), DeletedContribsPager\formatRow(), ImageListPager\formatValue(), ChangesFeed\generateFeed(), getBrokenLinksFrom(), getCascadeProtectionSources(), DoubleRedirectJob\getFinalDestination(), RevDel_LogItem\getHTML(), SpecialExport\getLinks(), getLinksFrom(), getLinksTo(), ApiQueryInfo\getProtectionInfo(), DisambiguationsPage\getQueryFromLinkBatch(), SpecialMypage\getRedirect(), SpecialMytalk\getRedirect(), ListredirectsPage\getRedirectTarget(), ApiPageSet\getRedirectTargets(), RollbackEdits\getRollbackTitles(), getSubjectPage(), getTalkPage(), DatabaseLogEntry\getTarget(), RCDatabaseLogEntry\getTarget(), Parser\getTemplateDom(), EditPage\getTemplates(), TitleDependency\getTitle(), ResourceLoaderWikiModule\getTitleMtimes(), UserRightsProxy\getUserPage(), ApiPageSet\initFromQueryResult(), MediaWiki\main(), SquidUpdate\newFromLinksTo(), ForeignDBFile\newFromRow(), OldLocalFile\newFromRow(), newFromRow(), Revision\newNullRevision(), SpecialBlock\postText(), SpecialBlock\processForm(), WatchlistCleanup\processRow(), CapsCleanup\processRow(), SpecialUnblock\processUnblock(), GlobalWithDBTest\provideWfIsBadImageList(), PurgeDeletedFiles\purgeFromLogType(), PurgeList\purgeNamespace(), LinkHolderArray\replaceInternal(), ApiQueryProtectedTitles\run(), ApiQueryIWBacklinks\run(), ApiQueryLangBacklinks\run(), ApiQueryImages\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryCategoryMembers\run(), ApiQueryAllLinks\run(), ApiQueryCategories\run(), ApiQueryAllCategories\run(), ApiQueryAllPages\run(), ApiQueryQueryPage\run(), ApiQueryAllImages\run(), ApiQueryLinks\run(), DoubleRedirectJob\run(), ApiQueryRecentChanges\run(), UpdateSearchIndex\searchIndexUpdateCallback(), ArticleTest\setUp(), TitlePermissionTest\setUp(), SpecialRevisionDelete\showForm(), SpecialPrefixindex\showPrefixChunk(), NewParserTest\testFuzzTests(), ArticleTest\testWikiPageFactory(), CoreParserFunctions\urlFunction(), Linker\userLink(), Linker\userTalkLink(), and wfIsBadImage().

static Title::makeTitleSafe ( ns,
title,
fragment = '',
interwiki = '' 
) [static]

Create a new Title from a namespace index and a DB key.

The parameters will be checked for validity, which is a bit slower than makeTitle() but safer for user-provided data.

Parameters:
$nsInt the namespace of the article
$titleString database key form
$fragmentString the link fragment (after the "#")
$interwikiString interwiki prefix
Returns:
Title the new object, or NULL on an error

Definition at line 329 of file Title.php.

References $t, $title, MWNamespace\exists(), and makeName().

Referenced by UsersPager\__construct(), ImageCleanup\buildSafeTitle(), MovePageForm\doSubmit(), SpecialContributions\execute(), SpecialExport\execute(), ImportSiteScripts\execute(), MovePageForm\execute(), ApiFeedContributions\execute(), SpecialLog\execute(), RebuildFileCache\execute(), ApiQueryInfo\execute(), SpecialNewpages\form(), Linker\formatAutocommentsCallback(), Linker\formatLinksInCommentCallback(), PageQueryPage\formatResult(), PopularPagesPage\formatResult(), UnwatchedpagesPage\formatResult(), FewestrevisionsPage\formatResult(), MostlinkedCategoriesPage\formatResult(), MostcategoriesPage\formatResult(), ShortPagesPage\formatResult(), MostlinkedPage\formatResult(), MostinterwikisPage\formatResult(), MostlinkedTemplatesPage\formatResult(), SpecialProtectedtitles\formatRow(), SpecialProtectedpages\formatRow(), ImageListPager\formatValue(), Preferences\generateSkinOptions(), CategoryPager\getBody(), LinksUpdate\getCategoryInsertions(), SpecialStatistics\getMostViewedPages(), SpecialEditWatchlist\getNormalForm(), WantedFilesPage\getPageHeader(), ResourceLoaderUserModule\getPages(), ApiBase\getParameterFromSettings(), DisambiguationsPage\getQueryFromLinkBatch(), RandomPage\getRandomTitle(), LogPager\getStartBody(), MergeHistoryPager\getStartBody(), SpecialBlock\getTargetUserTitle(), UploadBase\getTitle(), SpecialEditWatchlist\getWatchlist(), LogPager\limitPerformer(), Skin\makeNSUrl(), Linker\makeThumbLink2(), TitleCleanup\moveInconsistentPage(), moveSubpages(), ImageQueryPage\outputResults(), CoreParserFunctions\pagesincategory(), ImageCleanup\processRow(), WikiImporter\processTitle(), RevisionDeleteUser\setUsernameBitfields(), SpecialBookSources\showList(), Preferences\skinPreferences(), PrefixSearch\specialSearch(), ExtraParserTest\testTrackingCategory(), LinksUpdateTest\testUpdate_iwlinks(), and wfStreamThumb().

Title::missingPermissionError ( action,
short 
) [private]

Get a description array when the user doesn't have the right to perform $action (i.e.

when User::isAllowed() returns false)

Parameters:
$actionString the action to check
$shortBoolean short circuit on first error
Returns:
Array list of errors

Definition at line 2080 of file Title.php.

References $wgLang, and User\getGroupsWithPermission().

Referenced by checkQuickPermissions(), and checkReadPermissions().

Title::moveNoAuth ( &$  nt)

Move this page without authentication.

Parameters:
$ntTitle the new page Title
Returns:
Mixed true on success, getUserPermissionsErrors()-like array on failure

Reimplemented in FakeTitle.

Definition at line 3323 of file Title.php.

References moveTo().

Title::moveSubpages ( nt,
auth = true,
reason = '',
createRedirect = true 
)

Move this page's subpages to be subpages of $nt.

Parameters:
$ntTitle Move target
$authbool Whether $wgUser's permissions should be checked
$reasonstring The reason for the move
$createRedirectbool Whether to create redirects from the old subpages to the new ones Ignored if the user doesn't have the 'suppressredirect' right
Returns:
mixed array with old page titles as keys, and strings (new page titles) or arrays (errors) as values, or an error array with numeric indices if no pages were moved

Reimplemented in FakeTitle.

Definition at line 3706 of file Title.php.

References $count, $success, StringUtils\escapeRegexReplacement(), getArticleID(), MWNamespace\getCanonicalName(), getDBkey(), getNamespace(), getSubpages(), MWNamespace\hasSubpages(), makeTitleSafe(), and userCan().

Title::moveTo ( &$  nt,
auth = true,
reason = '',
createRedirect = true 
)

Move a title to a new location.

Parameters:
$ntTitle the new title
$authBool indicates whether $wgUser's permissions should be checked
$reasonString the reason for the move
$createRedirectBool Whether to create a redirect from the old title to the new title. Ignored if the user doesn't have the suppressredirect right.
Returns:
Mixed true on success, getUserPermissionsErrors()-like array on failure

Reimplemented in FakeTitle.

Definition at line 3470 of file Title.php.

References $comment, $file, $wgUser, WatchedItem\duplicateEntries(), getArticleID(), getDBkey(), getNamespace(), getPrefixedText(), isProtected(), isValidMoveOperation(), moveToInternal(), Collation\singleton(), RepoGroup\singleton(), wfGetDB(), wfLocalFile(), wfMessage(), and wfRunHooks().

Referenced by moveNoAuth().

Title::moveToInternal ( &$  nt,
reason = '',
createRedirect = true 
) [private]

Move page to a title which is either a redirect to the source page or nonexistent.

Parameters:
$ntTitle the page to move to, which should be a redirect or nonexistent
$reasonString The reason for the move
$createRedirectBool Whether to leave a redirect at the old title. Does not check if the user has the suppressredirect right
Exceptions:
MWException

Definition at line 3586 of file Title.php.

References $comment, $wgContLang, $wgUser, WikiPage\factory(), MagicWord\get(), getArticleID(), RequestContext\newExtraneousContext(), LogFormatter\newFromEntry(), Revision\newNullRevision(), WikiPage\onArticleCreate(), WikiPage\onArticleDelete(), resetArticleID(), wfGetDB(), wfMessage(), and wfRunHooks().

Referenced by moveTo().

static Title::nameOf ( id) [static]

Get the prefixed DB key associated with an ID.

Parameters:
$idInt the page_id of the article
Returns:
Title an object representing the article, or NULL if no such article was found

Definition at line 465 of file Title.php.

References $dbr, $n, $s, makeName(), and wfGetDB().

static Title::newFromDBkey ( key) [static]

Create a new Title from a prefixed DB key.

Parameters:
$keyString the database key, which has underscores instead of spaces, possibly including namespace and interwiki prefixes
Returns:
Title, or NULL on an error

Definition at line 104 of file Title.php.

References $t.

Referenced by LinkCache\addLink(), and LinkHolderArray\doVariants().

static Title::newFromID ( id,
flags = 0 
) [static]

Create a new Title from an article ID.

Parameters:
$idInt the page_id corresponding to the Title to create
$flagsInt use Title::GAID_FOR_UPDATE to use master
Returns:
Title the new object, or NULL on an error

Definition at line 209 of file Title.php.

References $title, GAID_FOR_UPDATE, newFromRow(), and wfGetDB().

Referenced by CleanupSpam\cleanupArticle(), ApiMove\execute(), DisambiguationsPage\formatResult(), SpecialMergeHistory\merge(), and ApiComparePages\revisionOrTitleOrId().

static Title::newFromIDs ( ids) [static]

Make an array of titles from an array of IDs.

Parameters:
$idsArray of Int Array of IDs
Returns:
Array of Titles

Definition at line 234 of file Title.php.

References $dbr, $res, newFromRow(), and wfGetDB().

static Title::newFromRedirect ( text) [static]

Extract a redirect destination from a string and return the Title, or null if the text doesn't contain a valid redirect This will only return the very next target, useful for the redirect table and other checks that don't need full recursion.

Parameters:
$textString: Text with possible redirect
Returns:
Title: The corresponding Title

Definition at line 366 of file Title.php.

References newFromRedirectInternal().

Referenced by CheckBadRedirects\execute(), WikiPage\isRedirect(), and DoubleRedirectJob\run().

static Title::newFromRedirectArray ( text) [static]

Extract a redirect destination from a string and return an array of Titles, or null if the text doesn't contain a valid redirect The last element in the array is the final destination after all redirects have been resolved (up to $wgMaxRedirects times)

Parameters:
$textString Text with possible redirect
Returns:
Array of Titles, with the destination last

Definition at line 393 of file Title.php.

References $page, $title, WikiPage\factory(), isValidRedirectTarget(), and newFromRedirectInternal().

Referenced by ApiEditPage\execute(), and newFromRedirectRecurse().

static Title::newFromRedirectInternal ( text) [static, protected]

Really extract the redirect destination Do not call this function directly, use one of the newFromRedirect* functions above.

Parameters:
$textString Text with possible redirect
Returns:
Title

Definition at line 428 of file Title.php.

References $title, MagicWord\get(), and newFromText().

Referenced by newFromRedirect(), and newFromRedirectArray().

static Title::newFromRedirectRecurse ( text) [static]

Extract a redirect destination from a string and return the Title, or null if the text doesn't contain a valid redirect This will recurse down $wgMaxRedirects times or until a non-redirect target is hit in order to provide (hopefully) the Title of the final destination instead of another redirect.

Parameters:
$textString Text with possible redirect
Returns:
Title

Definition at line 379 of file Title.php.

References newFromRedirectArray().

Referenced by WikiPage\insertRedirect().

static Title::newFromRow ( row) [static]

Make a Title object from a DB row.

Parameters:
$rowObject database row (needs at least page_title,page_namespace)
Returns:
Title corresponding Title

Definition at line 263 of file Title.php.

References $t, and makeTitle().

Referenced by UpdateCollation\execute(), getRedirectsHere(), newFromID(), newFromIDs(), ApiPageSet\processDbRow(), ApiQueryLangBacklinks\run(), and ApiQueryIWBacklinks\run().

static Title::newFromText ( text,
defaultNamespace = NS_MAIN 
) [static]

Create a new Title from text, such as what one would find in a link.

De- codes any HTML entities in the text.

Parameters:
$textString the link text; spaces, prefixes, and an initial ':' indicating the main namespace are accepted.
$defaultNamespaceInt the namespace to use if none is speci- fied by a prefix. If you want to force a specific namespace even if $text might begin with a namespace prefix, use makeTitle() or makeTitleSafe().
Exceptions:
MWException
Returns:
Title|null - Title or null on an error.

Definition at line 127 of file Title.php.

References $t, $titleCache, and Sanitizer\decodeCharReferencesAndNormalize().

Referenced by PreferencesTest\__construct(), RecentChangeTest\__construct(), SearchUpdate\__construct(), ImageListPager\__construct(), DoubleRedirectJob\__construct(), ImportStreamSource\__construct(), LinkHolderArray\__wakeup(), BackupDumperPageTest\addDBData(), TextPassDumperTest\addDBData(), BackupDumperLoggerTest\addLogEntry(), ApiQueryLogEvents\addLogParams(), Skin\addToSidebarPlain(), ApiFormatXml\addXslt(), ApiQuerySiteinfo\appendRightsInfo(), CoreParserFunctions\basepagename(), CoreParserFunctions\basepagenamee(), SkinTemplate\buildPersonalUrls(), SpecialComparePages\checkExistingTitle(), LocalRepo\checkRedirect(), Skin\checkTitle(), ApiFeedWatchlist\createFeedItem(), RevisionStorageTest\createPage(), WikiPageTest\createPage(), UploadFromUrlTest\deleteFile(), ApiTestCaseUpload\deleteFileByFileName(), ApiTestCaseUpload\deleteFileByTitle(), CoreParserFunctions\displaytitle(), SpecialExport\doExport(), SpecialChangePassword\doReturnTo(), GenderCache\doTitlesArray(), Skin\drawCategoryBrowser(), ApiParse\execute(), Undelete\execute(), SpecialFilepath\execute(), ApiUndelete\execute(), ApiMove\execute(), ApiQueryLangLinks\execute(), ApiWatch\execute(), ApiQueryAllMessages\execute(), ApiQueryIWLinks\execute(), MaintenanceFormatInstallDoc\execute(), ApiExpandTemplates\execute(), NukePage\execute(), GetTextMaint\execute(), Protect\execute(), RollbackEdits\execute(), ApiQueryLogEvents\execute(), SpecialListGroupRights\execute(), MovePageForm\execute(), EditCLI\execute(), FixDoubleRedirects\execute(), SpecialLog\execute(), Orphans\execute(), DumpIterator\execute(), DeleteBatch\execute(), NamespaceConflictChecker\execute(), RebuildTextIndex\execute(), RunJobs\execute(), MoveBatch\execute(), CommandLineInstaller\execute(), UpdateMediaWiki\execute(), FileDuplicateSearchPage\execute(), SpecialRevisionDelete\execute(), SpecialEditWatchlist\extractTitles(), Skin\footerLink(), Linker\formatAutocommentsCallback(), ApiParse\formatIWLinks(), ApiParse\formatLangLinks(), Linker\formatLinksInCommentCallback(), MIMEsearchPage\formatResult(), CoreParserFunctions\fullpagename(), CoreParserFunctions\fullpagenamee(), CoreParserFunctions\gender(), Skin\getCategoryLinks(), Skin\getCopyright(), SpecialStatistics\getGroupStats(), SpecialExport\getLinks(), WantedFilesPage\getPageHeader(), getParentCategoryTree(), DisambiguationsPage\getQueryFromLinkBatch(), ResourceLoaderWikiModule\getScript(), ParserOutput\getSecondaryDataUpdates(), ResourceLoaderWikiModule\getStyles(), SpecialRecentchangeslinked\getTargetTitle(), CLIParser\getTitle(), UploadBase\getTitle(), ResourceLoaderWikiModule\getTitleMtimes(), ApiBase\getTitleOrPageId(), SideBarTest\initMessagesHref(), SearchEngineTest\insertPage(), isValidMoveTarget(), ApiParse\languagesHtml(), LogPager\limitTitle(), SkinTemplate\makeArticleUrlDetails(), Linker\makeBrokenLink(), Skin\makeI18nUrl(), Parser\makeImage(), Skin\makeKnownUrlDetails(), SkinTemplate\makeTalkUrlDetails(), PPFuzzTester\makeTitle(), LinksUpdateTest\makeTitleAndParserOutput(), Skin\makeUrl(), Skin\makeUrlDetails(), TitleCleanup\moveIllegalPage(), CoreParserFunctions\mwnamespace(), LegacyTemplate\nameAndLogin(), CoreParserFunctions\namespacee(), CoreParserFunctions\namespacenumber(), newFromRedirectInternal(), ForeignAPIFile\newFromTitle(), newMainPage(), WikiPageTest\newPage(), LegacyTemplate\otherLanguages(), SkinTemplate\outputPage(), CoreParserFunctions\pagename(), CoreParserFunctions\pagenamee(), RdfMetaData\pageOrString(), CoreParserFunctions\pagesize(), WikiImporter\processLogItem(), TitleCleanup\processRow(), WatchlistCleanup\processRow(), WikiImporter\processTitle(), ApiPageSet\processTitlesArray(), PurgeList\purgeList(), StandardTemplate\quickBar(), CologneBlueTemplate\quickBar(), ParserOutput\replaceEditSectionLinksCallback(), Parser_LinkHooks\replaceInternalLinksCallback(), ApiComparePages\revisionOrTitleOrId(), SpecialComparePages\revOrTitle(), RdfMetaData\rights(), ApiQueryImages\run(), ApiQueryCategories\run(), ApiQueryLinks\run(), WikiImporter\setTargetRootPage(), ParserPreloadTest\setUp(), ApiOptionsTest\setUp(), MagicVariableTest\setUp(), SpecialSearch\showResults(), SpecialEditWatchlist\showTitles(), CoreParserFunctions\subjectpagename(), CoreParserFunctions\subjectpagenamee(), CoreParserFunctions\subjectspace(), CoreParserFunctions\subjectspacee(), WebInstaller_Name\submit(), CoreParserFunctions\subpagename(), CoreParserFunctions\subpagenamee(), Skin\subPageSubtitle(), CologneBlueTemplate\sysLinks(), CoreParserFunctions\talkpagename(), CoreParserFunctions\talkpagenamee(), CoreParserFunctions\talkspace(), CoreParserFunctions\talkspacee(), TagHookTest\testBadFunctionTagHooks(), TagHookTest\testBadTagHooks(), ArticleTablesTest\testbug14404(), TitleTest\testBug31100FixSpecialName(), ExtraParserTest\testBug8689(), ExtraParserTest\testCleanSig(), ExtraParserTest\testCleanSigDisabled(), TestSample\testCreateBasicListOfTitles(), WikiPageTest\testDoDeleteArticle(), WikiPageTest\testDoEdit(), TitleMethodsTest\testEquals(), TagHookTest\testFunctionTagHooks(), TitleTest\testGetpageviewlanguage(), ParserOptionsTest\testGetParserCacheKeyWithDynamicDates(), ExtraParserTest\testGetPreloadText(), ApiWatchTest\testGetRollbackToken(), TitleMethodsTest\testHasSubjectNamespace(), TitleMethodsTest\testInNamespace(), TitleMethodsTest\testInNamespaces(), TitleMethodsTest\testIsCssJsSubpage(), TitleMethodsTest\testIsCssOrJsPage(), TitleMethodsTest\testIsCssSubpage(), TitleMethodsTest\testIsJsSubpage(), TitleTest\testIsValidMoveOperation(), TitleMethodsTest\testIsWikitextPage(), ExtraParserTest\testParse(), NewParserTest\testParserTest(), ExtraParserTest\testPreprocess(), ParserMethodsTest\testPreSaveTransform(), ExtraParserTest\testPreSaveTransform(), ApiPurgeTest\testPurgeMainPage(), TagHookTest\testTagHooks(), TemplateCategoriesTest\testTemplateCategories(), TestSample\testTitleObjectFromObject(), TestSample\testTitleObjectStringConversion(), ApiQueryTest\testTitlesAreRejectedIfInvalid(), ApiQueryTest\testTitlesGetNormalized(), ExtraParserTest\testTrackingCategory(), LinksUpdateTest\testUpdate_langlinks(), LinksUpdateTest\testUpdate_pagelinks(), LinksUpdateTest\testUpdate_templatelinks(), RevisionStorageTest\testUserWasLastToEdit(), PrefixSearch\titleSearch(), ApiQueryBase\titleToKey(), Parser\transformMsg(), SpecialEditWatchlist\unwatchTitles(), CoreParserFunctions\urlFunction(), SpecialEditWatchlist\watchTitles(), wfIsBadImage(), and wfViewPrevNext().

static Title::newFromURL ( url) [static]

THIS IS NOT THE FUNCTION YOU WANT.

Use Title::newFromText().

Example of wrong and broken code: $title = Title::newFromURL( $wgRequest->getVal( 'title' ) );

Example of right code: $title = Title::newFromText( $wgRequest->getVal( 'title' ) );

Create a new Title from URL-encoded text. Ensures that the given title's length does not exceed the maximum.

Parameters:
$urlString the title, as might be taken from a URL
Returns:
Title the new object, or NULL on an error

Definition at line 184 of file Title.php.

References $t, and $url.

Referenced by ImageListPager\__construct(), SkinTemplate\buildPersonalUrls(), SpecialRecentchangeslinked\doMainQuery(), NewFilesPager\getQueryInfo(), and CoreParserFunctions\urlFunction().

Get an associative array for selecting this title from the "page" table.

Returns:
Array suitable for the $where parameter of DB::select()

Reimplemented in FakeTitle.

Definition at line 3920 of file Title.php.

Referenced by getTouched(), invalidateCache(), isNewPage(), and isSingleRevRedirect().

Title::prefix ( name) [private]

Prefix some arbitrary text with the namespace or interwiki prefix of this object.

Parameters:
$nameString the text
Returns:
String the prefixed text

Definition at line 1100 of file Title.php.

References getNsText().

Referenced by getPrefixedDBkey(), getPrefixedText(), and getPrefixedURL().

static Title::purgeExpiredRestrictions ( ) [static]

Purge expired restrictions from the page_restrictions table.

Definition at line 2670 of file Title.php.

References wfGetDB().

Referenced by SpecialProtectedpages\execute(), SpecialProtectedtitles\execute(), getCascadeProtectionSources(), loadRestrictions(), and loadRestrictionsFromRows().

Purge all applicable Squid URLs.

Reimplemented in FakeTitle.

Definition at line 3308 of file Title.php.

References $urls, and getSquidURLs().

Referenced by WikiPage\onArticleEdit().

Title::quickUserCan ( action,
user = null 
)

Can $user perform $action on this page? This skips potentially expensive cascading permission checks as well as avoids expensive error formatting.

Suitable for use for nonessential UI controls in common cases, but _not_ for functional access control.

May provide false positives, but should never provide a false negative.

Parameters:
$actionString action that permission needs to be checked for
$userUser to check (since 1.19); $wgUser will be used if not provided.
Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 1563 of file Title.php.

References $user, and userCan().

Title::resetArticleID ( newid)

This clears some fields in this object, and clears any associated keys in the "bad links" section of the link cache.

Parameters:
$newidInt the new Article ID

Reimplemented in FakeTitle.

Definition at line 2886 of file Title.php.

References LinkCache\singleton().

Referenced by moveToInternal().

Title::resultToError ( errors,
result 
) [private]

Add the resulting error code to the errors array.

Parameters:
$errorsArray list of current errors
$resultMixed result of errors
Returns:
Array list of errors

Definition at line 1684 of file Title.php.

References $result.

Referenced by checkPermissionHooks().

Title::secureAndSplit ( ) [private]

Secure and split - main initialisation function for this object.

Assumes that mDbkeyform has been set, and is urldecoded and uses underscores, but not otherwise munged. This function removes illegal characters, splits off the interwiki and namespace prefixes, sets the other forms, and canonicalizes everything.

Returns:
Bool true on success

Definition at line 2931 of file Title.php.

References $wgContLang, capitalize(), getTitleInvalidRegex(), Interwiki\isValidInterwiki(), IP\sanitizeIP(), setFragment(), and wfUrlencode().

Title::setFragment ( fragment)

Set the fragment for this title.

Removes the first character from the specified fragment before setting, so it assumes you're passing it with an initial "#".

Deprecated for public use, use Title::makeTitle() with fragment parameter. Still in active use privately.

Parameters:
$fragmentString text

Reimplemented in FakeTitle.

Definition at line 1088 of file Title.php.

Referenced by secureAndSplit().

Update page_touched timestamps and send squid purge messages for pages linking to this title.

May be sent to the job queue depending on the number of links. Typically called on create and delete.

Reimplemented in FakeTitle.

Definition at line 4329 of file Title.php.

References getNamespace().

Title::updateTitleProtection ( create_perm,
reason,
expiry 
)

Update the title protection status.

Deprecated:
in 1.19; will be removed in 1.20. Use WikiPage::doUpdateRestrictions() instead.
Parameters:
$create_permString Permission required for creation
$reasonString Reason for protection
$expiryString Expiry timestamp
Returns:
boolean true

Reimplemented in FakeTitle.

Definition at line 2257 of file Title.php.

References $limit, $page, $wgUser, WikiPage\factory(), and wfDeprecated().

Title::userCan ( action,
user = null,
doExpensiveQueries = true 
)

Can $user perform $action on this page?

Parameters:
$actionString action that permission needs to be checked for
$userUser to check (since 1.19); $wgUser will be used if not provided.
$doExpensiveQueriesBool Set this to false to avoid doing unnecessary queries.
Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 1577 of file Title.php.

References $user, $wgUser, and getUserPermissionsErrorsInternal().

Referenced by checkActionPermissions(), moveSubpages(), quickUserCan(), and userCanRead().

Protect css subpages of user pages: can $wgUser edit this page?

Deprecated:
in 1.19; will be removed in 1.20. Use getUserPermissionsErrors() instead.
Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 2152 of file Title.php.

References $wgUser, and wfDeprecated().

Protect js subpages of user pages: can $wgUser edit this page?

Deprecated:
in 1.19; will be removed in 1.20. Use getUserPermissionsErrors() instead.
Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 2166 of file Title.php.

References $wgUser, and wfDeprecated().

Can $wgUser read this page?

Deprecated:
in 1.19; use userCan(), quickUserCan() or getUserPermissionsErrors() instead
Returns:
Bool
Todo:
fold these checks into userCan()

Reimplemented in FakeTitle.

Definition at line 1543 of file Title.php.

References userCan(), and wfDeprecated().

Is $wgUser watching this page?

Deprecated:
in 1.20; use User::isWatched() instead.
Returns:
Bool

Reimplemented in FakeTitle.

Definition at line 1523 of file Title.php.

References $wgUser.

Title::validateFileMoveOperation ( nt) [protected]

Check if the requested move target is a valid file move target.

Parameters:
Title$ntTarget title
Returns:
array List of errors

Definition at line 3425 of file Title.php.

References $file, $wgUser, File\checkExtensionCompatibility(), wfFindFile(), wfLocalFile(), and wfStripIllegalFilenameChars().

Referenced by isValidMoveOperation().


Member Data Documentation

Title::$mArticleID = -1

Cascade restrictions on this page to included templates and images?

Definition at line 66 of file Title.php.

Title::$mCascadeRestriction

Cascade restrictions on this page to included templates and images?

Definition at line 71 of file Title.php.

Title::$mCascadeSources

Where are the cascading restrictions coming from on this page?

Definition at line 75 of file Title.php.

Title::$mCascadingRestrictions

Cascade restrictions on this page to included templates and images?

Definition at line 72 of file Title.php.

Title::$mDbkeyform = ''

Cascade restrictions on this page to included templates and images?

Definition at line 61 of file Title.php.

Title::$mDefaultNamespace = NS_MAIN

Cascade restrictions on this page to included templates and images?

Definition at line 81 of file Title.php.

Title::$mEstimateRevisions [private]

Cascade restrictions on this page to included templates and images?

Definition at line 68 of file Title.php.

Title::$mFragment

Cascade restrictions on this page to included templates and images?

Definition at line 65 of file Title.php.

Title::$mHasCascadingRestrictions

Are cascading restrictions in effect on this page?

Definition at line 74 of file Title.php.

Title::$mHasSubpage

Cascade restrictions on this page to included templates and images?

Definition at line 87 of file Title.php.

Title::$mInterwiki = ''

Cascade restrictions on this page to included templates and images?

Definition at line 64 of file Title.php.

Title::$mLatestID = false

Cascade restrictions on this page to included templates and images?

Definition at line 67 of file Title.php.

Title::$mLength = -1

Cascade restrictions on this page to included templates and images?

Definition at line 84 of file Title.php.

Title::$mNamespace = NS_MAIN

Cascade restrictions on this page to included templates and images?

Definition at line 63 of file Title.php.

Title::$mNotificationTimestamp = array()

Cascade restrictions on this page to included templates and images?

Definition at line 86 of file Title.php.

Title::$mOldRestrictions = false

Cascade restrictions on this page to included templates and images?

Definition at line 70 of file Title.php.

Title::$mPrefixedText

Text form including namespace/interwiki, initialised on demand.

Definition at line 77 of file Title.php.

Title::$mRedirect = null

Cascade restrictions on this page to included templates and images?

Definition at line 85 of file Title.php.

Title::$mRestrictions = array()

Cascade restrictions on this page to included templates and images?

Definition at line 69 of file Title.php.

Title::$mRestrictionsExpiry = array()

When do the restrictions on this page expire?

Definition at line 73 of file Title.php.

Title::$mRestrictionsLoaded = false

Boolean for initialisation on demand.

Definition at line 76 of file Title.php.

Title::$mTextform = ''

Cascade restrictions on this page to included templates and images?

Definition at line 59 of file Title.php.

Title::$mTitleProtection

Cached value for getTitleProtection (create protection)

Definition at line 78 of file Title.php.

Title::$mUrlform = ''

Cascade restrictions on this page to included templates and images?

Definition at line 60 of file Title.php.

Title::$mUserCaseDBKey

Cascade restrictions on this page to included templates and images?

Definition at line 62 of file Title.php.

Title::$mWatched = null

Cascade restrictions on this page to included templates and images?

Definition at line 83 of file Title.php.

Title::$titleCache = array() [static, private]

Definition at line 36 of file Title.php.

Referenced by newFromText().

const Title::CACHE_MAX = 1000

Title::newFromText maintains a cache to avoid expensive re-normalization of commonly used titles.

On a batch operation this can become a memory leak if not bounded. After hitting this many titles reset the cache.

Definition at line 44 of file Title.php.

Used to be GAID_FOR_UPDATE define.

Used with getArticleID() and friends to use the master DB

Definition at line 50 of file Title.php.

Referenced by getFirstRevision(), getLatestRevID(), getNextRevisionID(), getPreviousRevisionID(), newFromID(), and UploadFromUrlTest\testLeaveMessage().


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