MediaWiki
REL1_19
|
Represents a title within MediaWiki. More...
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) | |
Get the number of authors between the given 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) | |
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. | |
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.
| |
$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? | |
$mBacklinkCache = null | |
Cascade restrictions on this page to included templates and images? | |
$mEstimateRevisions | |
Cascade restrictions on this page to included templates and images? |
Represents a title within MediaWiki.
Optionally may contain an interwiki designation or namespace.
Return a string representation of this title.
Definition at line 1138 of file Title.php.
References getPrefixedText().
Returns cascading restrictions for the current article.
Reimplemented in FakeTitle.
Definition at line 2489 of file Title.php.
References loadRestrictions().
Title::canExist | ( | ) |
Title::canTalk | ( | ) |
Could this title have a corresponding talk page?
Reimplemented in FakeTitle.
Definition at line 753 of file Title.php.
References MWNamespace\canTalk().
Whether the magic words __INDEX__ and __NOINDEX__ function for this page.
Reimplemented in FakeTitle.
Definition at line 4406 of file Title.php.
References $wgContentNamespaces, and $wgExemptFromUserRobotsControl.
static Title::capitalize | ( | $ | text, |
$ | ns = NS_MAIN |
||
) | [static] |
Capitalize a text string for a title if it belongs to a namespace that capitalizes.
$text | String containing title to capitalize |
$ns | int namespace index, defaults to NS_MAIN |
Definition at line 2891 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.
$action | String the action to check |
$user | User to check |
$errors | Array list of current errors |
$doExpensiveQueries | Boolean whether or not to perform expensive queries |
$short | Boolean short circuit on first error |
Definition at line 1855 of file Title.php.
References $user, $wgDeleteRevisionsLimit, $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.
$action | String the action to check |
$user | User to check |
$errors | Array list of current errors |
$doExpensiveQueries | Boolean whether or not to perform expensive queries |
$short | Boolean short circuit on first error |
Definition at line 1816 of file Title.php.
References $page, $user, getCascadeProtectionSources(), and isCssJsSubpage().
Title::checkCSSandJSPermissions | ( | $ | action, |
$ | user, | ||
$ | errors, | ||
$ | doExpensiveQueries, | ||
$ | short | ||
) | [private] |
Check CSS/JS sub-page permissions.
$action | String the action to check |
$user | User user to check |
$errors | Array list of current errors |
$doExpensiveQueries | Boolean whether or not to perform expensive queries |
$short | Boolean short circuit on first error |
Definition at line 1756 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.
$action | String the action to check |
$user | User user to check |
$errors | Array list of current errors |
$doExpensiveQueries | Boolean whether or not to perform expensive queries |
$short | Boolean short circuit on first error |
Definition at line 1785 of file Title.php.
References $user, and getRestrictions().
Title::checkPermissionHooks | ( | $ | action, |
$ | user, | ||
$ | errors, | ||
$ | doExpensiveQueries, | ||
$ | short | ||
) | [private] |
Check various permission hooks.
$action | String the action to check |
$user | User user to check |
$errors | Array list of current errors |
$doExpensiveQueries | Boolean whether or not to perform expensive queries |
$short | Boolean short circuit on first error |
Definition at line 1696 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.
$action | String the action to check |
$user | User user to check |
$errors | Array list of current errors |
$doExpensiveQueries | Boolean whether or not to perform expensive queries |
$short | Boolean short circuit on first error |
Definition at line 1608 of file Title.php.
References $user, $wgGroupPermissions, isSubpage(), isTalkPage(), and missingPermissionError().
Title::checkReadPermissions | ( | $ | action, |
$ | user, | ||
$ | errors, | ||
$ | doExpensiveQueries, | ||
$ | short | ||
) | [private] |
Check that the user is allowed to read this page.
$action | String the action to check |
$user | User to check |
$errors | Array list of current errors |
$doExpensiveQueries | Boolean whether or not to perform expensive queries |
$short | Boolean short circuit on first error |
Definition at line 1976 of file Title.php.
References $user, $wgGroupPermissions, $wgRevokePermissions, $wgWhitelistRead, 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.
$action | String the action to check |
$user | User user to check |
$errors | Array list of current errors |
$doExpensiveQueries | Boolean whether or not to perform expensive queries |
$short | Boolean short circuit on first error |
Definition at line 1726 of file Title.php.
References $user, getNsText(), isNamespaceProtected(), and wfMsg().
Title::checkUserBlock | ( | $ | action, |
$ | user, | ||
$ | errors, | ||
$ | doExpensiveQueries, | ||
$ | short | ||
) | [private] |
Check that the user isn't blocked from editting.
$action | String the action to check |
$user | User to check |
$errors | Array list of current errors |
$doExpensiveQueries | Boolean whether or not to perform expensive queries |
$short | Boolean short circuit on first error |
Definition at line 1911 of file Title.php.
References $user, $wgContLang, $wgEmailConfirmToEdit, $wgLang, false, wfMessage(), wfMsg(), wfTimestamp(), and User\whoIs().
static Title::compare | ( | $ | a, |
$ | b | ||
) | [static] |
Callback for usort() to do title sorts by (namespace, title)
Definition at line 579 of file Title.php.
Referenced by ApiQueryInfo\execute().
Title::countAuthorsBetween | ( | $ | old, |
$ | new, | ||
$ | limit | ||
) |
Get the number of authors between the given revision IDs.
Used for diffs and other things that really need it.
$old | int|Revision Old revision or rev ID (first before range) |
$new | int|Revision New revision or rev ID (first after range) |
$limit | Int Maximum number of authors |
Definition at line 4063 of file Title.php.
References $dbr, $limit, $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.
$old | int|Revision Old revision or rev ID (first before range) |
$new | int|Revision New revision or rev ID (first after range) |
Reimplemented in FakeTitle.
Definition at line 4033 of file Title.php.
References $dbr, Revision\newFromTitle(), and wfGetDB().
Remove any title protection due to page existing.
Reimplemented in FakeTitle.
Definition at line 2259 of file Title.php.
References getDBkey(), getNamespace(), and wfGetDB().
Title::equals | ( | Title $ | title | ) |
Compare with another title.
$title | Title |
Reimplemented in FakeTitle.
Definition at line 4091 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.
Definition at line 1482 of file Title.php.
References getCanonicalURL(), and wfDeprecated().
static Title::escapeFragmentForURL | ( | $ | fragment | ) | [static] |
Escape a text fragment, say from a link, for a URL.
$fragment | string containing a URL or link fragment (after the "#") |
Definition at line 563 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.
Reimplemented in FakeTitle.
Definition at line 1426 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.
Reimplemented in FakeTitle.
Definition at line 1412 of file Title.php.
References getLocalURL(), and wfDeprecated().
Title::exists | ( | ) |
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.
Reimplemented in FakeTitle.
Definition at line 4119 of file Title.php.
Referenced by estimateRevisionCount(), getRestrictionTypes(), getTitleProtection(), SpecialUpload\getUploadForm(), 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
Reimplemented in FakeTitle.
Definition at line 807 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();
Definition at line 1230 of file Title.php.
References wfArrayToCGI(), and 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().
Title::getArticleID | ( | $ | flags = 0 | ) |
Get the article ID for this Title from the link cache, adding it if necessary.
$flags | Int a bit field; may be Title::GAID_FOR_UPDATE to select for update |
Reimplemented in FakeTitle.
Definition at line 2777 of file Title.php.
References getNamespace(), and LinkCache\singleton().
Referenced by countAuthorsBetween(), getLatestRevID(), getLength(), isRedirect(), isValidMoveOperation(), moveTo(), and moveToInternal().
Get the base page name, i.e.
the leftmost part before any slashes
Reimplemented in FakeTitle.
Definition at line 1161 of file Title.php.
References getText(), and MWNamespace\hasSubpages().
Get an array of Title objects referring to non-existent articles linked from this page.
Reimplemented in FakeTitle.
Definition at line 3232 of file Title.php.
References $dbr, $res, 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.
Definition at line 1467 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.
$getPages | Bool Whether or not to retrieve the actual pages that the restrictions have come from. |
Reimplemented in FakeTitle.
Definition at line 2368 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.
$prefix | string The prefix to be used, specified using {{defaultsort:}} or like [[Category:Foo|prefix]]. Empty for no prefix. |
Definition at line 4427 of file Title.php.
References getText(), and wfRunHooks().
Title::getDBkey | ( | ) |
Get the main part with underscores.
Reimplemented in FakeTitle.
Definition at line 669 of file Title.php.
Referenced by TitleDependency\__construct(), CoreLinkFunctions\categoryLinkHook(), checkReadPermissions(), LocalRepo\checkRedirect(), deleteTitleProtection(), equals(), SpecialPageFactory\executePath(), Linker\formatAutocommentsCallback(), getCascadeProtectionSources(), getLinksTo(), getLocalURL(), FileRepo\getNameFromTitle(), getNotificationTimestamp(), getRedirectsHere(), getSubjectPage(), getSubpages(), getTalkPage(), getTitleProtection(), WatchAction\getWatchToken(), LocalRepo\invalidateImageRedirect(), isAlwaysKnown(), isDeleted(), isDeletedQuick(), isSingleRevRedirect(), isSpecial(), isSubpageOf(), isValidMoveOperation(), moveSubpages(), moveTo(), ForeignAPIFile\newFromTitle(), and Linker\normaliseSpecialPage().
Get the default message text or false if the message doesn't exist.
Definition at line 4203 of file Title.php.
References $wgContLang, getNamespace(), MessageCache\singleton(), and wfMessage().
Title::getEarliestRevTime | ( | $ | flags = 0 | ) |
Get the oldest revision timestamp of this page.
$flags | Int Title::GAID_FOR_UPDATE |
Reimplemented in FakeTitle.
Definition at line 3975 of file Title.php.
References getFirstRevision().
Get the edit URL for this Title.
Reimplemented in FakeTitle.
Definition at line 1493 of file Title.php.
References getLocalURL().
Get the HTML-escaped displayable text form.
Used for the title field in tags.
Reimplemented in FakeTitle.
Definition at line 1193 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.
bool | $exists | True 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 |
Definition at line 2165 of file Title.php.
References $wgRestrictionTypes.
Referenced by ApiQueryAllpages\getAllowedParams(), getRestrictionTypes(), and SpecialProtectedpages\getTypeMenu().
Title::getFirstRevision | ( | $ | flags = 0 | ) |
Get the first revision of the page.
$flags | Int Title::GAID_FOR_UPDATE |
Reimplemented in FakeTitle.
Definition at line 3953 of file Title.php.
References GAID_FOR_UPDATE, and wfGetDB().
Referenced by getEarliestRevTime().
Get the Title fragment (i.e. the bit after the #) in text form.
Reimplemented in FakeTitle.
Definition at line 1055 of file Title.php.
Referenced by getLinkURL(), and Linker\normaliseSpecialPage().
Get the fragment in URL form, including the "#" character if there is one.
Reimplemented in FakeTitle.
Definition at line 1063 of file Title.php.
References escapeFragmentForURL().
Referenced by getCanonicalURL(), getFullURL(), and getLinkURL().
Get the prefixed title with spaces, plus any fragment (part beginning with '#')
Reimplemented in FakeTitle.
Definition at line 1148 of file Title.php.
References getPrefixedText().
Referenced by getParentCategories().
Title::getFullURL | ( | $ | query = '' , |
$ | query2 = false |
||
) |
Get a real URL referring to this title, with interwiki link and fragment.
See getLocalURL for the arguments.
Reimplemented in FakeTitle.
Definition at line 1264 of file Title.php.
References $url, fixUrlQueryArgs(), getFragmentForURL(), getLocalURL(), wfExpandUrl(), and wfRunHooks().
Referenced by escapeFullURL(), and getLinkURL().
Get title for search index.
Reimplemented in FakeTitle.
Definition at line 1046 of file Title.php.
References indexTitle().
Title::getInternalURL | ( | $ | query = '' , |
$ | query2 = false |
||
) |
Get the URL form for an internal link.
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.
Reimplemented in FakeTitle.
Definition at line 1445 of file Title.php.
References $url, $wgInternalServer, $wgServer, fixUrlQueryArgs(), getLocalURL(), wfExpandUrl(), and wfRunHooks().
Referenced by getSquidURLs().
Get the interwiki prefix (or null string)
Reimplemented in FakeTitle.
Definition at line 615 of file Title.php.
Referenced by XmlDumpWriter\canonicalTitle(), equals(), isMovable(), and isSubpageOf().
Title::getLatestRevID | ( | $ | flags = 0 | ) |
What is the page_latest field for this page?
$flags | Int a bit field; may be Title::GAID_FOR_UPDATE to select for update |
Reimplemented in FakeTitle.
Definition at line 2843 of file Title.php.
References getArticleID(), and LinkCache\singleton().
Referenced by moveToInternal().
Title::getLength | ( | $ | flags = 0 | ) |
What is the length of this page? Uses link cache, adding it if necessary.
$flags | Int a bit field; may be Title::GAID_FOR_UPDATE to select for update |
Reimplemented in FakeTitle.
Definition at line 2823 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.
$options | Array: may be FOR UPDATE |
$table | String: table name |
$prefix | String: fields prefix |
Definition at line 3168 of file Title.php.
References $options, $res, 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.
$options | Array: may be FOR UPDATE |
$table | String: table name |
$prefix | String: fields prefix |
Reimplemented in FakeTitle.
Definition at line 3110 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.
Reimplemented in FakeTitle.
Definition at line 1390 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.
$query | {,} 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. |
$query2 | Mixed: 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. |
Reimplemented in FakeTitle.
Definition at line 1300 of file Title.php.
References $matches, $url, $wgActionPaths, $wgArticlePath, $wgScript, $wgServer, $wgVariantArticlePath, Interwiki\fetch(), fixUrlQueryArgs(), getDBkey(), getNsText(), getPageLanguage(), getPrefixedDBkey(), wfAppendQuery(), wfRunHooks(), and wfUrlencode().
Referenced by escapeLocalURL(), EditPage\getActionURL(), getCanonicalURL(), getEditURL(), getFullURL(), getInternalURL(), getLinkURL(), Linker\makeThumbLink2(), and Language\numLink().
Get the namespace index, i.e.
one of the NS_xxxx constants.
Reimplemented in FakeTitle.
Definition at line 687 of file Title.php.
Referenced by TitleDependency\__construct(), XmlDumpWriter\canonicalTitle(), checkReadPermissions(), deleteTitleProtection(), equals(), WikiPage\factory(), Linker\formatAutocommentsCallback(), getArticleID(), getCascadeProtectionSources(), getDefaultMessageText(), getLinksTo(), getNamespaceKey(), getNotificationTimestamp(), getPageLanguage(), getRedirectsHere(), getRestrictionTypes(), getSubjectPage(), getSubpages(), getTalkPage(), getTitleProtection(), hasSubjectNamespace(), inNamespace(), isContentPage(), isConversionTable(), isDeleted(), isDeletedQuick(), isMovable(), isSingleRevRedirect(), isSpecialPage(), isSubpageOf(), isTalkPage(), isValidMoveOperation(), isWatchable(), moveSubpages(), moveTo(), and touchLinks().
Title::getNamespaceKey | ( | $ | prepend = 'nstab-' | ) |
Generate strings used for xml 'id' names in monobook tabs.
$prepend | string defaults to 'nstab-' |
Reimplemented in FakeTitle.
Definition at line 4310 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.
$revId | Int Revision ID. Get the revision that was after this one. |
$flags | Int Title::GAID_FOR_UPDATE |
Reimplemented in FakeTitle.
Definition at line 3935 of file Title.php.
References GAID_FOR_UPDATE, and wfGetDB().
Title::getNotificationTimestamp | ( | $ | user = null | ) |
Get the timestamp when this page was updated since the user last saw it.
$user | User |
Reimplemented in FakeTitle.
Definition at line 4273 of file Title.php.
References $dbr, $user, $wgShowUpdatedMarker, $wgUser, getDBkey(), getNamespace(), and wfGetDB().
Title::getNsText | ( | ) |
Get the namespace text.
Reimplemented in FakeTitle.
Definition at line 696 of file Title.php.
References $wgContLang, MWNamespace\exists(), MWNamespace\getCanonicalName(), getText(), MWNamespace\hasGenderDistinction(), and GenderCache\singleton().
Referenced by checkActionPermissions(), checkSpecialsAndNSPermissions(), getLocalURL(), isValidMoveOperation(), and prefix().
Get the language in which the content of this page is written.
Defaults to $wgContLang, but in certain cases it can be e.g. $wgLang (such as special pages, which are in the user language).
Definition at line 4454 of file Title.php.
References $wgContLang, $wgLang, getNamespace(), getText(), isCssOrJsPage(), isSpecialPage(), MessageCache\singleton(), wfGetLangObj(), and wfRunHooks().
Referenced by getLocalURL().
Get categories to which this Title belongs and return an array of categories' names.
Reimplemented in FakeTitle.
Definition at line 3837 of file Title.php.
References $dbr, $res, $wgContLang, getFullText(), and wfGetDB().
Referenced by getParentCategoryTree().
Title::getParentCategoryTree | ( | $ | children = array() | ) |
Get a tree of parent categories.
$children | Array with the children in the keys, to check for circular refs |
Reimplemented in FakeTitle.
Definition at line 3873 of file Title.php.
References getParentCategories(), and newFromText().
Get the prefixed database key form.
Reimplemented in FakeTitle.
Definition at line 1111 of file Title.php.
References prefix().
Referenced by getLocalURL(), isValidMoveTarget(), and Linker\makeImageLink2().
Get the prefixed title with spaces.
This is the form usually used for display
Reimplemented in FakeTitle.
Definition at line 1123 of file Title.php.
References prefix().
Referenced by __toString(), Linker\buildRollbackLink(), XmlDumpWriter\canonicalTitle(), checkReadPermissions(), getEscapedText(), getFullText(), getLinkURL(), getRestrictionTypes(), SpecialContributions\getUserLinks(), Linker\makeBrokenImageLinkObj(), moveTo(), and SpecialWhatLinksHere\wlhLink().
Get a URL-encoded title (not an actual URL) including interwiki.
Reimplemented in FakeTitle.
Definition at line 1214 of file Title.php.
References prefix(), and wfUrlencode().
Title::getPreviousRevisionID | ( | $ | revId, |
$ | flags = 0 |
||
) |
Get the revision ID of the previous revision.
$revId | Int Revision ID. Get the revision that was before this one. |
$flags | Int Title::GAID_FOR_UPDATE |
Reimplemented in FakeTitle.
Definition at line 3916 of file Title.php.
References GAID_FOR_UPDATE, and wfGetDB().
Title::getRedirectsHere | ( | $ | ns = null | ) |
Get all extant redirects to this Title.
$ns | Int|Null Single namespace to consider; NULL to consider all namespaces |
Reimplemented in FakeTitle.
Definition at line 4341 of file Title.php.
References $dbr, $res, getDBkey(), getNamespace(), newFromRow(), and wfGetDB().
Title::getRestrictionExpiry | ( | $ | action | ) |
Get the expiry time for the restriction against a given action.
Reimplemented in FakeTitle.
Definition at line 2477 of file Title.php.
References loadRestrictions().
Title::getRestrictions | ( | $ | action | ) |
Accessor/initialisation for mRestrictions.
$action | String action that permission needs to be checked for |
Reimplemented in FakeTitle.
Definition at line 2462 of file Title.php.
References loadRestrictions().
Referenced by checkPageRestrictions(), isProtected(), and isSemiProtected().
Returns restriction types for the current Title.
Reimplemented in FakeTitle.
Definition at line 2183 of file Title.php.
References exists(), getFilteredRestrictionTypes(), getNamespace(), getPrefixedText(), isSpecialPage(), wfDebug(), and wfRunHooks().
Referenced by isProtected(), and loadRestrictionsFromRows().
Get a list of URLs to purge from the Squid cache when this page changes.
Reimplemented in FakeTitle.
Definition at line 3269 of file Title.php.
References $urls, $wgContLang, and getInternalURL().
Referenced by purgeSquid().
Get the namespace text of the subject (rather than talk) page.
Reimplemented in FakeTitle.
Definition at line 733 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.
Reimplemented in FakeTitle.
Definition at line 1022 of file Title.php.
References getDBkey(), getNamespace(), MWNamespace\getSubject(), and makeTitle().
Title::getSubpages | ( | $ | limit = -1 | ) |
Get all subpages of this page.
$limit | Int maximum number of subpages to fetch; -1 for no limit |
Reimplemented in FakeTitle.
Definition at line 2699 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
Reimplemented in FakeTitle.
Definition at line 1179 of file Title.php.
References MWNamespace\hasSubpages().
Referenced by getSubpageUrlForm().
Get a URL-encoded form of the subpage text.
Reimplemented in FakeTitle.
Definition at line 1203 of file Title.php.
References getSubpageText(), and wfUrlencode().
Get the namespace text of the talk page.
Reimplemented in FakeTitle.
Definition at line 743 of file Title.php.
References $wgContLang, and MWNamespace\getTalk().
Get a Title object associated with the talk page of this article.
Reimplemented in FakeTitle.
Definition at line 1012 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.
$options | Array: may be FOR UPDATE |
Definition at line 3222 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.
$options | Array: may be FOR UPDATE |
Reimplemented in FakeTitle.
Definition at line 3152 of file Title.php.
References $options, and getLinksTo().
Title::getText | ( | ) |
Get the text form (spaces not underscores) of the main part.
Reimplemented in FakeTitle.
Definition at line 651 of file Title.php.
Referenced by XmlDumpWriter\canonicalTitle(), getBaseText(), getCategorySortkey(), getNsText(), getPageLanguage(), isConversionTable(), isSubpage(), 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.
Definition at line 486 of file Title.php.
References legalChars().
Referenced by Language\isValidCode(), and secureAndSplit().
Title::getTitleProtection | ( | ) | [private] |
Is this title subject to title protection? Title protection is the one applied against creation of such title.
Definition at line 2210 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.
$db | DatabaseBase: optional db |
Reimplemented in FakeTitle.
Definition at line 4261 of file Title.php.
References pageCond(), and wfGetDB().
Returns the DB name of the distant wiki which owns the object.
Definition at line 638 of file Title.php.
References Interwiki\fetch().
Get the DB key with the initial letter case as specified by the user.
Reimplemented in FakeTitle.
Definition at line 678 of file Title.php.
Referenced by FileRepo\getNameFromTitle().
Title::getUserPermissionsErrors | ( | $ | action, |
$ | user, | ||
$ | doExpensiveQueries = true , |
||
$ | ignoreErrors = array() |
||
) |
Can $user perform $action on this page?
$action | String action that permission needs to be checked for |
$user | User to check |
$doExpensiveQueries | Bool Set this to false to avoid doing unnecessary queries by skipping checks for cascading protections and user blocks. |
$ignoreErrors | Array of Strings Set this to a list of message keys whose corresponding errors may be ignored. |
Reimplemented in FakeTitle.
Definition at line 1582 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)
$action | String action that permission needs to be checked for |
$user | User to check |
$doExpensiveQueries | Bool Set this to false to avoid doing unnecessary queries. |
$short | Bool Set this to true to stop after the first permission error. |
Definition at line 2097 of file Title.php.
References $user, wfProfileIn(), and wfProfileOut().
Referenced by checkActionPermissions(), getUserPermissionsErrors(), and userCan().
Does this page have source text?
Definition at line 4179 of file Title.php.
References $wgContLang, exists(), MessageCache\singleton(), and wfMessage().
Referenced by isAlwaysKnown().
Title::hasSubjectNamespace | ( | $ | ns | ) |
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.
Definition at line 867 of file Title.php.
References getNamespace(), and MWNamespace\subjectEquals().
Does this have subpages? (Warning, usually requires an extra DB query.)
Reimplemented in FakeTitle.
Definition at line 2671 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.
$ns | Int a namespace index |
$title | String text-form main part |
Definition at line 514 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.
$ns | int The namespace |
Definition at line 830 of file Title.php.
References equals(), and getNamespace().
Referenced by inNamespaces().
Returns true if the title is inside one of the specified namespaces.
...$namespaces | The namespaces to check for |
Definition at line 841 of file Title.php.
References inNamespace().
Updates page_touched for this page; called from LinksUpdate.php.
Reimplemented in FakeTitle.
Definition at line 4225 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.)
Reimplemented in FakeTitle.
Definition at line 4139 of file Title.php.
References exists(), getDBkey(), hasSourceText(), and wfFindFile().
Referenced by isKnown().
Check whether the number of revisions of this page surpasses $wgDeleteRevisionsLimit.
Definition at line 3995 of file Title.php.
References $wgDeleteRevisionsLimit, and estimateRevisionCount().
Referenced by checkActionPermissions().
Cascading protection: Return true if cascading restrictions apply to this page, false if not.
Reimplemented in FakeTitle.
Definition at line 2353 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?
Reimplemented in FakeTitle.
Definition at line 878 of file Title.php.
References getNamespace(), and MWNamespace\isContent().
Is this a conversion table for the LanguageConverter?
Reimplemented in FakeTitle.
Definition at line 929 of file Title.php.
References getNamespace(), and getText().
Is this a .css or .js subpage of a user page?
Reimplemented in FakeTitle.
Definition at line 962 of file Title.php.
Referenced by checkCascadingSourcesRestrictions(), and isWikitextPage().
Could this page contain custom CSS or JavaScript, based on the title?
Reimplemented in FakeTitle.
Definition at line 951 of file Title.php.
References wfRunHooks().
Referenced by getPageLanguage(), and isWikitextPage().
Is this a .css subpage of a user page?
Reimplemented in FakeTitle.
Definition at line 985 of file Title.php.
Referenced by checkCSSandJSPermissions().
Title::isDeleted | ( | ) |
Is there a version of this page in the deletion archive?
Reimplemented in FakeTitle.
Definition at line 2726 of file Title.php.
References $dbr, $n, getDBkey(), getNamespace(), and wfGetDB().
Is there a version of this page in the deletion archive?
Reimplemented in FakeTitle.
Definition at line 2751 of file Title.php.
References $dbr, getDBkey(), getNamespace(), and wfGetDB().
Is this Title interwiki?
Reimplemented in FakeTitle.
Definition at line 606 of file Title.php.
Referenced by getLinkURL(), and isWatchable().
Is this a .js subpage of a user page?
Reimplemented in FakeTitle.
Definition at line 994 of file Title.php.
Referenced by checkCSSandJSPermissions().
Title::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).
Reimplemented in FakeTitle.
Definition at line 4170 of file Title.php.
References exists(), and isAlwaysKnown().
Title::isLocal | ( | ) |
Determine whether the object refers to a page within this project.
Reimplemented in FakeTitle.
Definition at line 593 of file Title.php.
References Interwiki\fetch().
Is this the mainpage?
Definition at line 909 of file Title.php.
References equals(), and newMainPage().
Title::isMovable | ( | ) |
Would anybody with sufficient privileges be able to move this page? Some pages just aren't movable.
Reimplemented in FakeTitle.
Definition at line 888 of file Title.php.
References $result, getInterwiki(), getNamespace(), MWNamespace\isMovable(), and wfRunHooks().
Referenced by checkActionPermissions(), and isValidMoveOperation().
Title::isNamespaceProtected | ( | User $ | user | ) |
Determines if $user is unable to edit this page because it has been protected by $wgNamespaceProtection.
$user | User object to check permissions |
Reimplemented in FakeTitle.
Definition at line 2335 of file Title.php.
References $wgNamespaceProtection, and User\isAllowed().
Referenced by checkSpecialsAndNSPermissions().
Title::isNewPage | ( | ) |
Title::isProtected | ( | $ | action = '' | ) |
Does the title correspond to a protected article?
$action | String the action the page is protected from, by default checks all actions. |
Reimplemented in FakeTitle.
Definition at line 2303 of file Title.php.
References $wgRestrictionLevels, 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.
$flags | Int a bit field; may be Title::GAID_FOR_UPDATE to select for update |
Reimplemented in FakeTitle.
Definition at line 2802 of file Title.php.
References getArticleID(), and LinkCache\singleton().
Referenced by OutputPage\addBacklinkSubtitle().
Title::isSemiProtected | ( | $ | action = 'edit' | ) |
Checks if this page is just a one-rev redirect.
Adds lock, so don't use just for light purposes.
Reimplemented in FakeTitle.
Definition at line 3753 of file Title.php.
References getDBkey(), getNamespace(), pageCond(), and wfGetDB().
Title::isSpecial | ( | $ | name | ) |
Returns true if this title resolves to the named special page.
$name | String The special page name |
Reimplemented in FakeTitle.
Definition at line 791 of file Title.php.
References getDBkey(), isSpecialPage(), and SpecialPageFactory\resolveAlias().
Referenced by checkReadPermissions(), and isValidRedirectTarget().
Returns true if this is a special page.
Reimplemented in FakeTitle.
Definition at line 781 of file Title.php.
References getNamespace().
Referenced by SkinTemplate\buildPersonalUrls(), checkReadPermissions(), fixSpecialName(), getPageLanguage(), getRestrictionTypes(), isProtected(), isSpecial(), and Linker\normaliseSpecialPage().
Title::isSubpage | ( | ) |
Is this a subpage?
Reimplemented in FakeTitle.
Definition at line 918 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.
$title | Title |
Definition at line 4104 of file Title.php.
References getDBkey(), getInterwiki(), and getNamespace().
Is this a talk page of some sort?
Reimplemented in FakeTitle.
Definition at line 1003 of file Title.php.
References getNamespace(), and MWNamespace\isTalk().
Referenced by checkQuickPermissions().
Title::isTrans | ( | ) |
Determine whether the object refers to a page within this project and is transcludable.
Reimplemented in FakeTitle.
Definition at line 625 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
$nt | Title the new title |
$auth | Bool indicates whether $wgUser's permissions should be checked |
$reason | String is the log summary of the move, used for spam checking |
Reimplemented in FakeTitle.
Definition at line 3320 of file Title.php.
References $wgUser, equals(), exists(), getArticleID(), getDBkey(), getNamespace(), getNsText(), getUserPermissionsErrors(), isMovable(), isValidMoveTarget(), EditPage\matchSummarySpamRegex(), validateFileMoveOperation(), wfMergeErrorArrays(), and wfRunHooks().
Referenced by moveTo().
Title::isValidMoveTarget | ( | $ | nt | ) |
Checks if $this can be moved to a given Title.
$nt | Title the new title to check |
Reimplemented in FakeTitle.
Definition at line 3791 of file Title.php.
References $file, getPrefixedDBkey(), newFromText(), Revision\newFromTitle(), wfDebug(), and wfLocalFile().
Referenced by isValidMoveOperation().
Check if this Title is a valid redirect target.
Reimplemented in FakeTitle.
Definition at line 4372 of file Title.php.
References $wgInvalidRedirectTargets, and isSpecial().
Referenced by newFromRedirectArray(), and XmlDumpWriter\openPage().
Can this title be added to a user's watchlist?
Reimplemented in FakeTitle.
Definition at line 772 of file Title.php.
References getNamespace(), and isExternal().
Does that page contain wikitext, or it is JS, CSS or whatever?
Definition at line 939 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.
Definition at line 474 of file Title.php.
References $wgLegalTitleChars.
Referenced by languages\getMessagesWithDubiousLinks(), getTitleInvalidRegex(), Parser_LinkHooks\replaceInternalLinks2(), Parser\replaceInternalLinks2(), TitleTest\testLegalChars(), and wfStripIllegalFilenameChars().
Title::loadFromRow | ( | $ | row | ) |
Title::loadRestrictions | ( | $ | oldFashionedRestrictions = null | ) |
Load restrictions from the page_restrictions table.
$oldFashionedRestrictions | String comma-separated list of page restrictions from page table (pre 1.10) |
Reimplemented in FakeTitle.
Definition at line 2602 of file Title.php.
References $dbr, $res, $wgContLang, exists(), getTitleProtection(), loadRestrictionsFromResultWrapper(), purgeExpiredRestrictions(), wfGetDB(), and wfTimestampNow().
Referenced by areRestrictionsCascading(), getRestrictionExpiry(), and getRestrictions().
Title::loadRestrictionsFromResultWrapper | ( | $ | res, |
$ | oldFashionedRestrictions = null |
||
) | [private] |
Loads a string into mRestrictions array.
$res | Resource restrictions as an SQL result. |
$oldFashionedRestrictions | String comma-separated list of page restrictions from page table (pre 1.10) |
Definition at line 2504 of file Title.php.
References $res, $rows, 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.
$rows | array of db result objects |
$oldFashionedRestrictions | string comma-separated list of page restrictions from page table (pre 1.10) |
Reimplemented in FakeTitle.
Definition at line 2523 of file Title.php.
References $dbr, $rows, $wgContLang, 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.
$ns | Int numerical representation of the namespace |
$title | String the DB key form the title |
$fragment | String The link fragment (after the "#") |
$interwiki | String The interwiki prefix |
Definition at line 543 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.
$ns | Int the namespace of the article |
$title | String the unprefixed database key form |
$fragment | String the link fragment (after the "#") |
$interwiki | String the interwiki prefix |
Definition at line 297 of file Title.php.
References $t, $title, and wfUrlencode().
Referenced by FakeDimensionFile\__construct(), NewParserTest\addDBData(), CategoryViewer\addFragmentToTitle(), LinkBatch\addResultToCache(), ProtectionForm\buildForm(), LocalRepo\checkRedirect(), Orphans\checkSeparation(), CompressOld\compressWithConcat(), Article\confirmDelete(), SpecialTags\doTagRow(), LinkHolderArray\doVariants(), CheckBadRedirects\execute(), DeleteDefaultMessages\execute(), DumpSisterSites\execute(), AttachLatest\execute(), ApiQueryDeletedrevs\execute(), FixDoubleRedirects\execute(), ApiQueryFilearchive\execute(), DumpLinks\execute(), NukeNS\execute(), ApiQueryBacklinks\extractRedirRowInfo(), ApiQueryRandom\extractRowInfo(), ApiQueryWatchlist\extractRowInfo(), ApiQueryLogEvents\extractRowInfo(), ApiQueryContributions\extractRowInfo(), ApiQueryRecentChanges\extractRowInfo(), ApiQueryBacklinks\extractRowInfo(), SpecialRecentChanges\filterByCategories(), ForeignAPIRepo\findBySha1(), DoubleRedirectJob\fixRedirects(), fixSpecialName(), WikiFilePage\followRedirect(), FeedUtils\formatDiff(), ApiParse\formatLinks(), WantedCategoriesPage\formatResult(), PopularPagesPage\formatResult(), UnusedCategoriesPage\formatResult(), AncientPagesPage\formatResult(), UnusedtemplatesPage\formatResult(), UnwatchedpagesPage\formatResult(), MostlinkedCategoriesPage\formatResult(), DoubleRedirectsPage\formatResult(), BrokenRedirectsPage\formatResult(), ShortPagesPage\formatResult(), MIMEsearchPage\formatResult(), MostlinkedTemplatesPage\formatResult(), ListredirectsPage\formatResult(), DisambiguationsPage\formatResult(), FileDuplicateSearchPage\formatResult(), LinkSearchPage\formatResult(), NewFilesPager\formatRow(), CategoryPager\formatRow(), UsersPager\formatRow(), DeletedContribsPager\formatRow(), SpecialNewpages\formatRow(), ImageListPager\formatValue(), AllmessagesTablePager\formatValue(), ParserTest\fuzzTest(), ChangesFeed\generateFeed(), GenerateSitemap\generateLimit(), getBrokenLinksFrom(), User\getCanonicalName(), getCascadeProtectionSources(), DoubleRedirectJob\getFinalDestination(), WikiPage\getHiddenCategories(), RevDel_LogItem\getHTML(), SpecialExport\getLinks(), getLinksFrom(), getLinksTo(), RecentChange\getMovedToTitle(), MessageCache\getMsgFromNamespace(), SearchEngine\getNearMatchInternal(), ApiQueryInfo\getProtectionInfo(), DisambiguationsPage\getQueryInfo(), SpecialMypage\getRedirect(), SpecialMytalk\getRedirect(), File\getRedirectedTitle(), WikiFilePage\getRedirectTarget(), ListredirectsPage\getRedirectTarget(), WikiPage\getRedirectTarget(), ApiPageSet\getRedirectTargets(), RollbackEdits\getRollbackTitles(), getSubjectPage(), getTalkPage(), DatabaseLogEntry\getTarget(), RCDatabaseLogEntry\getTarget(), Parser\getTemplateDom(), EditPage\getTemplates(), RecentChange\getTitle(), TitleDependency\getTitle(), SpecialPage\getTitleFor(), LogPage\getTitleLink(), ResourceLoaderWikiModule\getTitleMtimes(), User\getTokenUrl(), UserRightsProxy\getUserPage(), User\getUserPage(), ImagePage\imageLinks(), ApiPageSet\initFromQueryResult(), SearchResult\initFromRow(), GenerateSitemap\main(), MediaWiki\main(), SquidUpdate\newFromLinksTo(), OldLocalFile\newFromRow(), ForeignDBFile\newFromRow(), ArchivedFile\newFromRow(), newFromRow(), Article\newFromTitle(), XmlDumpWriter\openPage(), MediaWiki\parseTitle(), SpecialBlock\postText(), ApiPageSet\processDbRow(), SpecialBlock\processForm(), WatchlistCleanup\processRow(), CapsCleanup\processRow(), WikiImporter\processTitle(), SpecialUnblock\processUnblock(), GlobalWithDBTest\provideWfIsBadImageList(), PurgeDeletedFiles\purgeFromLogType(), PurgeList\purgeNamespace(), LinkHolderArray\replaceInternal(), ApiQueryImages\run(), ApiQueryIWBacklinks\run(), ApiQueryLangBacklinks\run(), ApiQueryProtectedTitles\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryDuplicateFiles\run(), ApiQueryAllLinks\run(), ApiQueryAllCategories\run(), ApiQueryCategoryMembers\run(), ApiQueryCategories\run(), ApiQueryAllpages\run(), DoubleRedirectJob\run(), ApiQueryQueryPage\run(), ApiQueryAllimages\run(), ApiQueryLinks\run(), ApiQueryRecentChanges\run(), ApiQueryBacklinks\run(), RecentChange\save(), UpdateSearchIndex\searchIndexUpdateCallback(), TitlePermissionTest\setTitle(), ArticleTest\setUp(), TitlePermissionTest\setUp(), ParserTest\setupDatabase(), SpecialAllpages\showChunk(), FileDeleteForm\showForm(), SpecialRevisionDelete\showForm(), SpecialWhatLinksHere\showIndirectLinks(), SpecialPrefixindex\showPrefixChunk(), SpecialUpload\showUploadWarning(), TitlePermissionTest\testCascadingSourcesRestrictions(), NewParserTest\testFuzzTests(), ArticleTest\testWikiPageFactory(), CoreParserFunctions\urlFunction(), Linker\userLink(), Linker\userTalkLink(), ImagePage\view(), wfIsBadImage(), and XmlDumpWriter\writeLogItem().
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.
$ns | Int the namespace of the article |
$title | String database key form |
$fragment | String the link fragment (after the "#") |
$interwiki | String interwiki prefix |
Definition at line 320 of file Title.php.
References $t, $title, and makeName().
Referenced by UsersPager\__construct(), ActiveUsersPager\__construct(), AllmessagesTablePager\__construct(), OutputPage\addCategoryLinks(), Parser\addTrackingCategory(), ImageCleanup\buildSafeTitle(), DifferenceEngine\deletedLink(), MovePageForm\doSubmit(), ImportSiteScripts\execute(), SpecialContributions\execute(), SpecialExport\execute(), RebuildFileCache\execute(), MovePageForm\execute(), ApiFeedContributions\execute(), SpecialLog\execute(), ApiQueryInfo\execute(), SpecialNewpages\form(), Linker\formatAutocommentsCallback(), Linker\formatLinksInCommentCallback(), PageQueryPage\formatResult(), MostcategoriesPage\formatResult(), FewestrevisionsPage\formatResult(), MostlinkedPage\formatResult(), WantedQueryPage\formatResult(), SpecialProtectedtitles\formatRow(), SpecialProtectedpages\formatRow(), ImageListPager\formatValue(), Preferences\generateSkinOptions(), CategoryPager\getBody(), UsersPager\getBody(), LinksUpdate\getCategoryInsertions(), SpecialStatistics\getMostViewedPages(), SpecialAllpages\getNamespaceKeyAndText(), SpecialEditWatchlist\getNormalForm(), WantedFilesPage\getPageHeader(), ResourceLoaderUserModule\getPages(), ApiBase\getParameterFromSettings(), DisambiguationsPage\getQueryInfo(), NewPagesPager\getQueryInfo(), RandomPage\getRandomTitle(), SpecialPage\getSafeTitleFor(), LogPager\getStartBody(), MergeHistoryPager\getStartBody(), Category\getTitle(), UploadBase\getTitle(), SpecialUpload\getUploadForm(), SpecialEditWatchlist\getWatchlist(), User\idFromName(), LogPager\limitPerformer(), Skin\makeNSUrl(), Linker\makeThumbLink2(), TitleCleanup\moveInconsistentPage(), moveSubpages(), Category\newFromName(), File\normalizeTitle(), ImageQueryPage\outputResults(), LanguageConverter\parseCachedTable(), ApiQueryBacklinks\parseContinueParam(), Job\pop(), Job\pop_type(), ImageCleanup\processRow(), PatrolLog\record(), NamespaceConflictChecker\reportConflict(), NamespaceConflictChecker\resolveConflict(), NamespaceConflictChecker\resolveConflictOn(), RevisionDeleteUser\setUsernameBitfields(), SpecialUndelete\showHistory(), SpecialBookSources\showList(), SpecialUndelete\showList(), SpecialAllpages\showToplevel(), SpecialUpload\showViewDeletedLinks(), Preferences\skinPreferences(), PrefixSearch\specialSearch(), ExtraParserTest\testTrackingCategory(), ApiFileRevert\validateParameters(), 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)
$action | String the action to check |
$short | Boolean short circuit on first error |
Definition at line 2065 of file Title.php.
References $wgLang, and User\getGroupsWithPermission().
Referenced by checkQuickPermissions(), and checkReadPermissions().
Title::moveNoAuth | ( | &$ | nt | ) |
Title::moveSubpages | ( | $ | nt, |
$ | auth = true , |
||
$ | reason = '' , |
||
$ | createRedirect = true |
||
) |
Move this page's subpages to be subpages of $nt.
$nt | Title Move target |
$auth | bool Whether $wgUser's permissions should be checked |
$reason | string The reason for the move |
$createRedirect | bool Whether to create redirects from the old subpages to the new ones Ignored if the user doesn't have the 'suppressredirect' right |
Reimplemented in FakeTitle.
Definition at line 3686 of file Title.php.
References $count, $success, $wgMaximumMovedPages, StringUtils\escapeRegexReplacement(), 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.
$nt | Title the new title |
$auth | Bool indicates whether $wgUser's permissions should be checked |
$reason | String the reason for the move |
$createRedirect | Bool Whether to create a redirect from the old title to the new title. Ignored if the user doesn't have the suppressredirect right. |
Reimplemented in FakeTitle.
Definition at line 3453 of file Title.php.
References $comment, $file, $wgUser, WatchedItem\duplicateEntries(), getArticleID(), getDBkey(), getNamespace(), getPrefixedText(), isProtected(), isValidMoveOperation(), moveToInternal(), Collation\singleton(), RepoGroup\singleton(), wfGetDB(), wfLocalFile(), wfMsgForContent(), 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.
$nt | Title the page to move to, which should be a redirect or nonexistent |
$reason | String The reason for the move |
$createRedirect | Bool Whether to leave a redirect at the old title. Ignored if the user doesn't have the suppressredirect right |
Definition at line 3565 of file Title.php.
References $comment, $wgContLang, $wgUser, WikiPage\factory(), MagicWord\get(), getArticleID(), getLatestRevID(), RequestContext\newExtraneousContext(), LogFormatter\newFromEntry(), Revision\newNullRevision(), WikiPage\onArticleCreate(), WikiPage\onArticleDelete(), resetArticleID(), wfGetDB(), wfMsgForContent(), and wfRunHooks().
Referenced by moveTo().
static Title::nameOf | ( | $ | id | ) | [static] |
Get the prefixed DB key associated with an ID.
$id | Int the page_id of the article |
Definition at line 452 of file Title.php.
References $dbr, $n, makeName(), and wfGetDB().
static Title::newFromDBkey | ( | $ | key | ) | [static] |
Create a new Title from a prefixed DB key.
$key | String the database key, which has underscores instead of spaces, possibly including namespace and interwiki prefixes |
Definition at line 102 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.
$id | Int the page_id corresponding to the Title to create |
$flags | Int use Title::GAID_FOR_UPDATE to use master |
Definition at line 207 of file Title.php.
References $title, GAID_FOR_UPDATE, newFromRow(), and wfGetDB().
Referenced by CleanupSpam\cleanupArticle(), ApiParse\execute(), ApiMove\execute(), ApiDelete\execute(), RefreshLinks\fixLinksFromArticle(), RefreshLinks\fixRedirect(), DisambiguationsPage\formatResult(), SpecialMergeHistory\merge(), MediaWiki\parseTitle(), and ApiQueryCategoryMembers\run().
static Title::newFromIDs | ( | $ | ids | ) | [static] |
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.
$text | String: Text with possible redirect |
Definition at line 353 of file Title.php.
References newFromRedirectInternal().
Referenced by CheckBadRedirects\execute(), WikiPage\getAutosummary(), EditPage\internalAttemptSave(), WikiPage\isRedirect(), DoubleRedirectJob\run(), and Parser\statelessFetchTemplate().
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)
$text | String Text with possible redirect |
Definition at line 380 of file Title.php.
References $page, $title, $wgMaxRedirects, WikiPage\factory(), isValidRedirectTarget(), and newFromRedirectInternal().
Referenced by ApiEditPage\execute(), EditPage\getPreviewText(), newFromRedirectRecurse(), and Article\view().
static Title::newFromRedirectInternal | ( | $ | text | ) | [static, protected] |
Really extract the redirect destination Do not call this function directly, use one of the newFromRedirect* functions above.
$text | String Text with possible redirect |
Definition at line 415 of file Title.php.
References $title, $wgMaxRedirects, 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.
$text | String Text with possible redirect |
Definition at line 366 of file Title.php.
References newFromRedirectArray().
Referenced by WikiPage\insertRedirect(), and WikiPage\updateRevisionOn().
static Title::newFromRow | ( | $ | row | ) | [static] |
Make a Title object from a DB row.
$row | Object database row (needs at least page_title,page_namespace) |
Definition at line 253 of file Title.php.
References $t, and makeTitle().
Referenced by CategoryViewer\doCategoryQuery(), SpecialNewpages\formatRow(), ContribsPager\formatRow(), getRedirectsHere(), newFromID(), newFromIDs(), ApiQueryLangBacklinks\run(), ApiQueryIWBacklinks\run(), TitleArrayFromResult\setCurrent(), and SpecialAllpages\showChunk().
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.
$text | String the link text; spaces, prefixes, and an initial ':' indicating the main namespace are accepted. |
$defaultNamespace | Int 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(). |
Definition at line 124 of file Title.php.
References $t, $titleCache, and Sanitizer\decodeCharReferencesAndNormalize().
Referenced by SearchUpdate\__construct(), DoubleRedirectJob\__construct(), ImageListPager\__construct(), Installer\__construct(), LinkHolderArray\__wakeup(), ParserTest\addArticle(), MediaWikiTestCase\addCoreDBData(), ApiQueryLogEvents\addLogParams(), Skin\addToSidebarPlain(), ApiFormatXml\addXslt(), ApiQuerySiteinfo\appendRightsInfo(), CoreParserFunctions\basepagename(), CoreParserFunctions\basepagenamee(), Parser\braceSubstitution(), SkinTemplate\buildPersonalUrls(), SpecialComparePages\checkExistingTitle(), LocalRepo\checkRedirect(), Skin\checkTitle(), ApiFeedWatchlist\createFeedItem(), UploadFromUrlTest\deleteFile(), ApiTestCaseUpload\deleteFileByFileName(), ApiTestCaseUpload\deleteFileByTitle(), CoreParserFunctions\displaytitle(), SpecialExport\doExport(), SpecialChangeEmail\doReturnTo(), SpecialChangePassword\doReturnTo(), Skin\drawCategoryBrowser(), MaintenanceFormatInstallDoc\execute(), GetTextMaint\execute(), ApiParse\execute(), NukePage\execute(), Undelete\execute(), SpecialFilepath\execute(), RollbackEdits\execute(), ApiProtect\execute(), ApiUndelete\execute(), Protect\execute(), ApiMove\execute(), EditCLI\execute(), ApiQueryLangLinks\execute(), ApiWatch\execute(), ApiQueryAllmessages\execute(), FixDoubleRedirects\execute(), ApiQueryIWLinks\execute(), ApiEditPage\execute(), ApiExpandTemplates\execute(), Orphans\execute(), SpecialListGroupRights\execute(), DumpIterator\execute(), ApiQueryLogEvents\execute(), MovePageForm\execute(), DeleteBatch\execute(), RunJobs\execute(), NamespaceConflictChecker\execute(), RebuildTextIndex\execute(), ApiDelete\execute(), SpecialLog\execute(), MoveBatch\execute(), CommandLineInstaller\execute(), UpdateMediaWiki\execute(), FileDuplicateSearchPage\execute(), SpecialRevisionDelete\execute(), SpecialEditWatchlist\extractTitles(), DBConnectionError\fileCachedPage(), LanguageConverter\findVariantLink(), Skin\footerLink(), Linker\formatAutocommentsCallback(), ApiParse\formatIWLinks(), ApiParse\formatLangLinks(), Linker\formatLinksInCommentCallback(), MIMEsearchPage\formatResult(), FileDuplicateSearchPage\formatResult(), CoreParserFunctions\fullpagename(), CoreParserFunctions\fullpagenamee(), CoreParserFunctions\gender(), User\getCanonicalName(), Skin\getCategoryLinks(), Skin\getCopyright(), User\getGroupPage(), SpecialStatistics\getGroupStats(), OutputPage\getHeadLinks(), RecentChange\getIRCLine(), SpecialExport\getLinks(), MoveLogFormatter\getMessageParameters(), SearchEngine\getNearMatchInternal(), WantedFilesPage\getPageHeader(), getParentCategoryTree(), EditPage\getPreloadedText(), MoveLogFormatter\getPreloadTitles(), DisambiguationsPage\getQueryInfo(), ApiRollback\getRbTitle(), ResourceLoaderWikiModule\getScript(), ResourceLoaderWikiModule\getStyles(), SpecialRecentchangeslinked\getTargetTitle(), CLIParser\getTitle(), UploadBase\getTitle(), LogPage\getTitleLink(), ResourceLoaderWikiModule\getTitleMtimes(), SpecialSearch\goResult(), SideBarTest\initMessagesHref(), SearchEngineTest\insertPage(), isValidMoveTarget(), User\isValidUserName(), ApiParse\languagesHtml(), LogPager\limitTitle(), PageArchive\listPagesByPrefix(), LoginForm\load(), LogEventsList\logActionLinks(), SkinTemplate\makeArticleUrlDetails(), Linker\makeBrokenLink(), Skin\makeI18nUrl(), Parser\makeImage(), Skin\makeKnownUrlDetails(), SkinTemplate\makeTalkUrlDetails(), PPFuzzTester\makeTitle(), Skin\makeUrl(), Skin\makeUrlDetails(), TitleCleanup\moveIllegalPage(), CoreParserFunctions\mwnamespace(), LegacyTemplate\nameAndLogin(), CoreParserFunctions\namespacee(), ImportStreamSource\newFromInterwiki(), newFromRedirectInternal(), ForeignAPIFile\newFromTitle(), newMainPage(), LegacyTemplate\otherLanguages(), ApiQuery\outputGeneralPageInfo(), SkinTemplate\outputPage(), WikiExporter\pageByName(), CoreParserFunctions\pagename(), CoreParserFunctions\pagenamee(), RdfMetaData\pageOrString(), CoreParserFunctions\pagesize(), MessageCache\parse(), ApiQueryBacklinks\processContinue(), WikiImporter\processLogItem(), TitleCleanup\processRow(), WatchlistCleanup\processRow(), WikiImporter\processTitle(), ApiPageSet\processTitlesArray(), PurgeList\purgeList(), StandardTemplate\quickBar(), CologneBlueTemplate\quickBar(), OldChangesList\recentChangesLine(), Parser\renderImageGallery(), ParserOutput\replaceEditSectionLinksCallback(), Parser\replaceInternalLinks2(), Parser_LinkHooks\replaceInternalLinksCallback(), OutputPage\returnToMain(), ApiComparePages\revisionOrTitle(), SpecialComparePages\revOrTitle(), RdfMetaData\rights(), ApiQueryImages\run(), ApiQueryCategories\run(), ApiQueryCategoryMembers\run(), ApiQueryLinks\run(), ParserTest\runTest(), Parser\setTitle(), ParserPreloadTest\setUp(), MagicVariableTest\setUp(), EditPage\showCustomIntro(), SpecialSearch\showInterwikiHit(), SpecialSearch\showResults(), SpecialEditWatchlist\showTitles(), CoreParserFunctions\subjectpagename(), CoreParserFunctions\subjectpagenamee(), CoreParserFunctions\subjectspace(), CoreParserFunctions\subjectspacee(), WebInstaller_Name\submit(), CoreParserFunctions\subpagename(), CoreParserFunctions\subpagenamee(), Skin\subPageSubtitle(), LoginForm\successfulLogin(), 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(), TitleMethodsTest\testEquals(), TagHookTest\testFunctionTagHooks(), ParserOptionsTest\testGetParserCacheKeyWithDynamicDates(), ExtraParserTest\testGetPreloadText(), ApiWatchTest\testGetRollbackToken(), TitleMethodsTest\testHasSubjectNamespace(), TitleMethodsTest\testInNamespace(), TitleMethodsTest\testInNamespaces(), TitleTest\testIsValidMoveOperation(), ExtraParserTest\testParse(), NewParserTest\testParserTest(), ExtraParserTest\testPreprocess(), ExtraParserTest\testPreSaveTransform(), ApiPurgeTest\testPurgeMainPage(), TagHookTest\testTagHooks(), TemplateCategoriesTest\testTemplateCategories(), TestSample\testTitleObjectFromObject(), TestSample\testTitleObjectStringConversion(), ApiQueryTest\testTitlesAreRejectedIfInvalid(), ApiQueryTest\testTitlesGetNormalized(), ExtraParserTest\testTrackingCategory(), 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.
$url | String the title, as might be taken from a URL |
Definition at line 181 of file Title.php.
References $t, $url, and $wgLegalTitleChars.
Referenced by ImageListPager\__construct(), SkinTemplate\buildPersonalUrls(), SpecialRecentchangeslinked\doMainQuery(), SpecialWhatLinksHere\execute(), NewFilesPager\getQueryInfo(), SpecialUndelete\loadRequest(), SpecialMergeHistory\loadRequestParams(), MediaWiki\parseTitle(), OutputPage\showPermissionsErrorPage(), and CoreParserFunctions\urlFunction().
static Title::newMainPage | ( | ) | [static] |
Create a new Title for the Main Page.
Definition at line 335 of file Title.php.
References $title, newFromText(), and wfMsgForContent().
Referenced by EmaillingJob\__construct(), ApiQuerySiteinfo\appendGeneralInfo(), Installer\createMainpage(), CologneBlueTemplate\doAfterContent(), CologneBlueTemplate\doBeforeContent(), SpecialChangeEmail\doReturnTo(), SpecialChangePassword\doReturnTo(), ApiRsd\execute(), FileDeleteForm\execute(), Preferences\generateSkinOptions(), ResourceLoaderStartUpModule\getConfig(), XmlDumpWriter\homelink(), isMainPage(), Skin\logoText(), Skin\mainPageLink(), Skin\makeMainPageUrl(), SpecialPasswordReset\onSubmit(), MediaWiki\parseTitle(), OutputPage\returnToMain(), OutputPage\showPermissionsErrorPage(), LoginForm\successfulLogin(), and TestSample\testSetUpMainPageTitleForNextTest().
Title::pageCond | ( | ) |
Get an associative array for selecting this title from the "page" table.
Reimplemented in FakeTitle.
Definition at line 3900 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.
$name | String the text |
Definition at line 1093 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 2651 of file Title.php.
References wfGetDB().
Referenced by WikiPage\doUpdateRestrictions(), SpecialProtectedtitles\execute(), SpecialProtectedpages\execute(), getCascadeProtectionSources(), loadRestrictions(), and loadRestrictionsFromRows().
Purge all applicable Squid URLs.
Reimplemented in FakeTitle.
Definition at line 3291 of file Title.php.
References $urls, $wgUseSquid, and getSquidURLs().
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.
$action | String action that permission needs to be checked for |
$user | User to check (since 1.19); $wgUser will be used if not provided. |
Reimplemented in FakeTitle.
Definition at line 1547 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.
$newid | Int the new Article ID |
Reimplemented in FakeTitle.
Definition at line 2867 of file Title.php.
References LinkCache\singleton().
Referenced by moveToInternal().
Title::resultToError | ( | $ | errors, |
$ | result | ||
) | [private] |
Add the resulting error code to the errors array.
$errors | Array list of current errors |
$result | Mixed result of errors |
Definition at line 1668 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.
Definition at line 2912 of file Title.php.
References $wgContLang, $wgLocalInterwiki, 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.
$fragment | String text |
Reimplemented in FakeTitle.
Definition at line 1081 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 4245 of file Title.php.
References getNamespace().
Title::updateTitleProtection | ( | $ | create_perm, |
$ | reason, | ||
$ | expiry | ||
) |
Update the title protection status.
$create_perm | String Permission required for creation |
$reason | String Reason for protection |
$expiry | String Expiry timestamp |
Reimplemented in FakeTitle.
Definition at line 2242 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?
$action | String action that permission needs to be checked for |
$user | User to check (since 1.19); $wgUser will be used if not provided. |
$doExpensiveQueries | Bool Set this to false to avoid doing unnecessary queries. |
Reimplemented in FakeTitle.
Definition at line 1561 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?
Reimplemented in FakeTitle.
Definition at line 2137 of file Title.php.
References $wgUser, and wfDeprecated().
Protect js subpages of user pages: can $wgUser edit this page?
Reimplemented in FakeTitle.
Definition at line 2151 of file Title.php.
References $wgUser, and wfDeprecated().
Can $wgUser read this page?
Reimplemented in FakeTitle.
Definition at line 1527 of file Title.php.
References userCan(), and wfDeprecated().
Title::validateFileMoveOperation | ( | $ | nt | ) | [protected] |
Check if the requested move target is a valid file move target.
Title | $nt | Target title |
Definition at line 3408 of file Title.php.
References $file, $wgUser, File\checkExtensionCompatibility(), wfFindFile(), wfLocalFile(), and wfStripIllegalFilenameChars().
Referenced by isValidMoveOperation().
Title::$mArticleID = -1 |
Title::$mBacklinkCache = null |
Title::$mCascadeRestriction |
Title::$mCascadeSources |
Title::$mCascadingRestrictions |
Title::$mDbkeyform = '' |
Title::$mDefaultNamespace = NS_MAIN |
Title::$mEstimateRevisions [private] |
Title::$mFragment |
Title::$mHasCascadingRestrictions |
Title::$mInterwiki = '' |
Title::$mLatestID = false |
Title::$mLength = -1 |
Title::$mNamespace = NS_MAIN |
Title::$mNotificationTimestamp = array() |
Title::$mOldRestrictions = false |
Title::$mPrefixedText |
Title::$mRedirect = null |
Title::$mRestrictions = array() |
Title::$mRestrictionsExpiry = array() |
Title::$mRestrictionsLoaded = false |
Title::$mTextform = '' |
Title::$mTitleProtection |
Title::$mUrlform = '' |
Title::$mUserCaseDBKey |
Title::$mWatched = null |
Title::$titleCache = array() [static, private] |
Definition at line 34 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.
const Title::GAID_FOR_UPDATE = 1 |
Used to be GAID_FOR_UPDATE define.
Used with getArticleID() and friends to use the master DB
Definition at line 48 of file Title.php.
Referenced by WikiPage\doDeleteArticleReal(), getFirstRevision(), getNextRevisionID(), getPreviousRevisionID(), EditPage\internalAttemptSave(), newFromID(), and UploadFromUrlTest\testLeaveMessage().