Inherited by FakeTitle.
Public Member Functions | |
isLocal () | |
Determine whether the object refers to a page within this project. | |
isTrans () | |
Determine whether the object refers to a page within this project and is transcludable. | |
getText () | |
Simple accessors. | |
getPartialURL () | |
Get the URL-encoded form of the main part. | |
getDBkey () | |
Get the main part with underscores. | |
getNamespace () | |
Get the namespace index, i.e. one of the NS_xxxx constants. | |
getNsText () | |
Get the namespace text. | |
getUserCaseDBKey () | |
Get the DB key with the initial letter case as specified by the user. | |
getSubjectNsText () | |
Get the namespace text of the subject (rather than talk) page. | |
getTalkNsText () | |
Get the namespace text of the talk page. | |
canTalk () | |
Could this title have a corresponding talk page? | |
getInterwiki () | |
Get the interwiki prefix (or null string). | |
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. | |
getDefaultNamespace () | |
Get the default namespace index, for when there is no namespace. | |
getIndexTitle () | |
Get title for search index. | |
getPrefixedDBkey () | |
Get the prefixed database key form. | |
getPrefixedText () | |
Get the prefixed title with spaces. | |
getFullText () | |
Get the prefixed title with spaces, plus any fragment (part beginning with '#'). | |
getBaseText () | |
Get the base name, i.e. | |
getSubpageText () | |
Get the lowest-level subpage name, i.e. | |
getSubpageUrlForm () | |
Get a URL-encoded form of the subpage text. | |
getPrefixedURL () | |
Get a URL-encoded title (not an actual URL) including interwiki. | |
getFullURL ($query= '', $variant=false) | |
Get a real URL referring to this title, with interwiki link and fragment. | |
getLocalURL ($query= '', $variant=false) | |
Get a URL with no fragment or server name. | |
getLinkUrl ($query=array(), $variant=false) | |
Get a URL that's the simplest URL that will be valid to link, locally, to the current Title. | |
escapeLocalURL ($query= '') | |
Get an HTML-escaped version of the URL form, suitable for using in a link, without a server name or fragment. | |
escapeFullURL ($query= '') | |
Get an HTML-escaped version of the URL form, suitable for using in a link, including the server name and fragment. | |
getInternalURL ($query= '', $variant=false) | |
Get the URL form for an internal link. | |
getEditURL () | |
Get the edit URL for this Title. | |
getEscapedText () | |
Get the HTML-escaped displayable text form. | |
isExternal () | |
Is this Title interwiki? | |
isSemiProtected ($action= 'edit') | |
Is this page "semi-protected" - the *only* protection is autoconfirm? | |
isProtected ($action= '') | |
Does the title correspond to a protected article? | |
isConversionTable () | |
Is this a conversion table for the LanguageConverter? | |
userIsWatching () | |
Is $wgUser watching this page? | |
quickUserCan ($action) | |
Can $wgUser perform $action on this page? This skips potentially expensive cascading permission checks as well as avoids expensive error formatting. | |
isNamespaceProtected () | |
Determines if $wgUser is unable to edit this page because it has been protected by $wgNamespaceProtection. | |
userCan ($action, $doExpensiveQueries=true) | |
Can $wgUser perform $action on this page? | |
getUserPermissionsErrors ($action, $user, $doExpensiveQueries=true, $ignoreErrors=array()) | |
Can $user perform $action on this page? | |
updateTitleProtection ($create_perm, $reason, $expiry) | |
Update the title protection status. | |
deleteTitleProtection () | |
Remove any title protection due to page existing. | |
isMovable () | |
Would anybody with sufficient privileges be able to move this page? Some pages just aren't movable. | |
userCanRead () | |
Can $wgUser read this page? | |
isTalkPage () | |
Is this a talk page of some sort? | |
isSubpage () | |
Is this a subpage? | |
hasSubpages () | |
Does this have subpages? (Warning, usually requires an extra DB query. | |
getSubpages ($limit=-1) | |
Get all subpages of this page. | |
isCssOrJsPage () | |
Could this page contain custom CSS or JavaScript, based on the title? | |
isCssJsSubpage () | |
Is this a .css or .js subpage of a user page? | |
isValidCssJsSubpage () | |
Is this a *valid* .css or .js subpage of a user page? Check that the corresponding skin exists. | |
getSkinFromCssJsSubpage () | |
Trim down a .css or .js subpage title to get the corresponding skin name. | |
isCssSubpage () | |
Is this a .css subpage of a user page? | |
isJsSubpage () | |
Is this a .js subpage of a user 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? | |
isCascadeProtected () | |
Cascading protection: Return true if cascading restrictions apply to this page, false if not. | |
getCascadeProtectionSources ($get_pages=true) | |
Cascading protection: Get the source of any cascading restrictions on this page. | |
areRestrictionsCascading () | |
loadRestrictionsFromRows ($rows, $oldFashionedRestrictions=null) | |
loadRestrictions ($oldFashionedRestrictions=null) | |
Load restrictions from the page_restrictions table. | |
getRestrictions ($action) | |
Accessor/initialisation for mRestrictions. | |
getRestrictionExpiry ($action) | |
Get the expiry time for the restriction against a given action. | |
isDeleted () | |
Is there a version of this page in the deletion archive? | |
isDeletedQuick () | |
Is there a version of this page in the deletion archive? | |
getArticleID ($flags=0) | |
Get the article ID for this Title from the link cache, adding it if necessary. | |
isRedirect ($flags=0) | |
Is this an article that is a redirect page? Uses link cache, adding it if necessary. | |
getLength ($flags=0) | |
What is the length of this page? Uses link cache, adding it if necessary. | |
getLatestRevID ($flags=0) | |
What is the page_latest field for this page? | |
resetArticleID ($newid) | |
This clears some fields in this object, and clears any associated keys in the "bad links" section of the link cache. | |
invalidateCache () | |
Updates page_touched for this page; called from LinksUpdate.php. | |
prefix ($name) | |
Prefix some arbitrary text with the namespace or interwiki prefix of this object. | |
setFragment ($fragment) | |
Set the fragment for this title. | |
getTalkPage () | |
Get a Title object associated with the talk page of this article. | |
getSubjectPage () | |
Get a title object associated with the subject page of this talk page. | |
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. | |
getTemplateLinksTo ($options=array()) | |
Get an array of Title objects using this Title as a template Also stores the IDs in the link cache. | |
getBrokenLinksFrom () | |
Get an array of Title objects referring to non-existent articles linked from this page. | |
getSquidURLs () | |
Get a list of URLs to purge from the Squid cache when this page changes. | |
purgeSquid () | |
Purge all applicable Squid URLs. | |
moveNoAuth (&$nt) | |
Move this page without authentication. | |
isValidMoveOperation (&$nt, $auth=true, $reason= '') | |
Check whether a given move operation would be valid. | |
moveTo (&$nt, $auth=true, $reason= '', $createRedirect=true) | |
Move a title to a new location. | |
moveSubpages ($nt, $auth=true, $reason= '', $createRedirect=true) | |
Move this page's subpages to be subpages of $nt. | |
isSingleRevRedirect () | |
Checks if this page is just a one-rev redirect. | |
isValidMoveTarget ($nt) | |
Checks if $this can be moved to a given Title
| |
isWatchable () | |
Can this title be added to a user's watchlist? | |
getParentCategories () | |
Get categories to which this Title belongs and return an array of categories' names. | |
getParentCategoryTree ($children=array()) | |
Get a tree of parent categories. | |
pageCond () | |
Get an associative array for selecting this title from the "page" table. | |
getPreviousRevisionID ($revId, $flags=0) | |
Get the revision ID of the previous revision. | |
getNextRevisionID ($revId, $flags=0) | |
Get the revision ID of the next revision. | |
getFirstRevision ($flags=0) | |
Get the first revision of the page. | |
isNewPage () | |
Check if this is a new page. | |
getEarliestRevTime () | |
Get the oldest revision timestamp of this page. | |
countRevisionsBetween ($old, $new) | |
Get the number of revisions between the given revision IDs. | |
equals (Title $title) | |
Compare with another title. | |
__toString () | |
Return a string representation of this title. | |
exists () | |
Check if page exists. | |
isAlwaysKnown () | |
Should links to this title be shown as potentially viewable (i.e. | |
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). | |
canExist () | |
Is this in a namespace that allows actual pages? | |
touchLinks () | |
Update page_touched timestamps and send squid purge messages for pages linking to this title. | |
getTouched ($db=null) | |
Get the last touched timestamp. | |
getNotificationTimestamp ($user=null) | |
Get the timestamp when this page was updated since the user last saw it. | |
trackbackURL () | |
Get the trackback URL for this page. | |
trackbackRDF () | |
Get the trackback RDF for this page. | |
getNamespaceKey ($prepend= 'nstab-') | |
Generate strings used for xml 'id' names in monobook tabs. | |
isSpecialPage () | |
Returns true if this is a special page. | |
isSpecial ($name) | |
Returns true if this title resolves to the named special page. | |
fixSpecialName () | |
If the Title refers to a special page alias which is not the local default,. | |
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? | |
getRedirectsHere ($ns=null) | |
Get all extant redirects to this Title. | |
isValidRedirectTarget () | |
Check if this Title is a valid redirect target. | |
getBacklinkCache () | |
Get a backlink cache object. | |
canUseNoindex () | |
Whether the magic words __INDEX__ and __NOINDEX__ function for this page. | |
getRestrictionTypes () | |
Static Public Member Functions | |
static | newFromDBkey ($key) |
Create a new Title from a prefixed DB key. | |
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 | 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 | newFromRow ($row) |
Make a Title object from a DB row. | |
static & | makeTitle ($ns, $title, $fragment= '') |
Create a new Title from a namespace index and a DB key. | |
static | makeTitleSafe ($ns, $title, $fragment= '') |
Create a new Title from a namespace index and a DB key. | |
static | newMainPage () |
Create a new Title for the Main Page. | |
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 | 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 | 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 | nameOf ($id) |
Get the prefixed DB key associated with an ID. | |
static | legalChars () |
Get a regex character class describing the legal characters in a link. | |
static | indexTitle ($ns, $title) |
Get a string representation of a title suitable for including in a search index. | |
static | makeName ($ns, $title, $fragment= '') |
Make a prefixed DB key from a DB key and a namespace index. | |
static | escapeFragmentForURL ($fragment) |
Escape a text fragment, say from a link, for a URL. | |
static | purgeExpiredRestrictions () |
Purge expired restrictions from the page_restrictions table. | |
static | getTitleInvalidRegex () |
static | capitalize ($text, $ns=NS_MAIN) |
Capitalize a text if it belongs to a namespace that capitalizes. | |
static | compare ($a, $b) |
Callback for usort() to do title sorts by (namespace, title). | |
Public Attributes | |
const | CACHE_MAX = 1000 |
Title::newFromText maintains a cache to avoid expensive re-normalization of commonly used titles. | |
Private member variables | |
Please use the accessor functions instead.
| |
$mTextform = '' | |
Text form (spaces not underscores) of the main part. | |
$mUrlform = '' | |
URL-encoded form of the main part. | |
$mDbkeyform = '' | |
Main part with underscores. | |
$mUserCaseDBKey | |
DB key with the initial letter in the case specified by the user. | |
$mNamespace = NS_MAIN | |
Namespace index, i.e. one of the NS_xxxx constants. | |
$mInterwiki = '' | |
Interwiki prefix (or null string). | |
$mFragment | |
Title fragment (i.e. the bit after the #). | |
$mArticleID = -1 | |
Article ID, fetched from the link cache on demand. | |
$mLatestID = false | |
ID of most recent revision. | |
$mRestrictions = array() | |
Array of groups allowed to edit this article. | |
$mOldRestrictions = false | |
Text form (spaces not underscores) of the main part. | |
$mCascadeRestriction | |
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. | |
$mDefaultNamespace = NS_MAIN | |
Namespace index when there is no namespace. | |
$mWatched = null | |
Is $wgUser watching this page? null if unfilled, accessed through userIsWatching(). | |
$mLength = -1 | |
The page length, 0 for special pages. | |
$mRedirect = null | |
Is the article at this title a redirect? | |
$mNotificationTimestamp = array() | |
Associative array of user ID -> timestamp/false. | |
$mBacklinkCache = null | |
Cache of links to this title. | |
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 | |
__construct () | |
Constructor. | |
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. | |
getTitleProtection () | |
Is this title subject to title protection? | |
loadRestrictionsFromResultWrapper ($res, $oldFashionedRestrictions=null) | |
Loads a string into mRestrictions array. | |
secureAndSplit () | |
Secure and split - main initialisation function for this object. | |
moveOverExistingRedirect (&$nt, $reason= '', $createRedirect=true) | |
Move page to a title which is at present a redirect to the source page. | |
moveToNewTitle (&$nt, $reason= '', $createRedirect=true) | |
Move page to non-existing title. | |
Static Private Attributes | |
Static cache variables | |
static | $titleCache = array() |
static | $interwikiCache = array() |
Optionally may contain an interwiki designation or namespace.
Definition at line 19 of file Title.php.
Title::__toString | ( | ) |
Return a string representation of this title.
Definition at line 3456 of file Title.php.
References getPrefixedText().
Title::areRestrictionsCascading | ( | ) |
Reimplemented in FakeTitle.
Definition at line 1867 of file Title.php.
References loadRestrictions().
Title::canExist | ( | ) |
Title::canTalk | ( | ) |
Could this title have a corresponding talk page?
Reimplemented in FakeTitle.
Definition at line 583 of file Title.php.
References MWNamespace::canTalk().
Title::canUseNoindex | ( | ) |
Whether the magic words __INDEX__ and __NOINDEX__ function for this page.
Reimplemented in FakeTitle.
Definition at line 3779 of file Title.php.
References $wgArticleRobotPolicies, $wgContentNamespaces, and $wgExemptFromUserRobotsControl.
static Title::capitalize | ( | $ | text, | |
$ | ns = NS_MAIN | |||
) | [static] |
Capitalize a text if it belongs to a namespace that capitalizes.
Definition at line 2245 of file Title.php.
References $wgContLang, and MWNamespace::isCapitalized().
Referenced by CategoryPager::__construct(), UploadBase::checkWarnings(), secureAndSplit(), and wfSpecialWithoutinterwiki().
static Title::compare | ( | $ | a, | |
$ | b | |||
) | [static] |
Callback for usort() to do title sorts by (namespace, title).
Definition at line 3443 of file Title.php.
Referenced by ApiQueryInfo::execute().
Title::countRevisionsBetween | ( | $ | old, | |
$ | new | |||
) |
Title::deleteTitleProtection | ( | ) |
Remove any title protection due to page existing.
Reimplemented in FakeTitle.
Definition at line 1498 of file Title.php.
References $dbw, getDBkey(), getNamespace(), and wfGetDB().
Title::equals | ( | Title $ | title | ) |
Compare with another title.
<b> | Title : $title |
Reimplemented in FakeTitle.
Definition at line 3433 of file Title.php.
References getDBkey(), getInterwiki(), and getNamespace().
Referenced by Parser::getTemplateDom(), and isValidMoveOperation().
static Title::escapeFragmentForURL | ( | $ | fragment | ) | [static] |
Escape a text fragment, say from a link, for a URL.
Definition at line 503 of file Title.php.
References Sanitizer::escapeId().
Referenced by getFragmentForURL().
Title::escapeFullURL | ( | $ | query = '' |
) |
Get an HTML-escaped version of the URL form, suitable for using in a link, including the server name and fragment.
$query | String : : an optional query string |
Reimplemented in FakeTitle.
Definition at line 885 of file Title.php.
References getFullURL().
Title::escapeLocalURL | ( | $ | query = '' |
) |
Get an HTML-escaped version of the URL form, suitable for using in a link, without a server name or fragment.
$query | String : : an optional query string |
Reimplemented in FakeTitle.
Definition at line 874 of file Title.php.
References getLocalURL().
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 3469 of file Title.php.
Referenced by getEarliestRevTime(), getRestrictionTypes(), getTitleProtection(), isAlwaysKnown(), isKnown(), isSemiProtected(), isValidMoveOperation(), and loadRestrictions().
Title::fixSpecialName | ( | ) |
If the Title refers to a special page alias which is not the local default,.
Reimplemented in FakeTitle.
Definition at line 3686 of file Title.php.
References SpecialPage::getLocalNameFor(), getNamespace(), makeTitle(), and SpecialPage::resolveAlias().
Title::getArticleID | ( | $ | flags = 0 |
) |
Get the article ID for this Title from the link cache, adding it if necessary.
$flags | Integer : : a bit field; may be GAID_FOR_UPDATE to select for update |
Reimplemented in FakeTitle.
Definition at line 2092 of file Title.php.
References getNamespace(), and LinkCache::singleton().
Referenced by getLength(), isRedirect(), isValidMoveOperation(), moveOverExistingRedirect(), moveTo(), moveToNewTitle(), and Parser::statelessFetchTemplate().
Title::getBacklinkCache | ( | ) |
Title::getBaseText | ( | ) |
Get the base name, i.e.
the leftmost parts before the /
Reimplemented in FakeTitle.
Definition at line 665 of file Title.php.
References getText(), and MWNamespace::hasSubpages().
Title::getBrokenLinksFrom | ( | ) |
Get an array of Title objects referring to non-existent articles linked from this page.
Reimplemented in FakeTitle.
Definition at line 2561 of file Title.php.
References $dbr, $res, makeTitle(), and wfGetDB().
Title::getCascadeProtectionSources | ( | $ | get_pages = true |
) |
Cascading protection: Get the source of any cascading restrictions on this page.
$get_pages | Boolean : : Whether or not to retrieve the actual pages that the restrictions have come from. |
Reimplemented in FakeTitle.
Definition at line 1783 of file Title.php.
References $dbr, $res, Block::decodeExpiry(), getDBkey(), getNamespace(), makeTitle(), purgeExpiredRestrictions(), wfGetDB(), wfProfileIn(), wfProfileOut(), and wfTimestampNow().
Referenced by getUserPermissionsErrorsInternal(), and isCascadeProtected().
Title::getDBkey | ( | ) |
Get the main part with underscores.
Reimplemented in FakeTitle.
Definition at line 530 of file Title.php.
Referenced by TitleDependency::__construct(), CoreLinkFunctions::categoryLinkHook(), deleteTitleProtection(), equals(), Linker::formatAutocommentsCallback(), getCascadeProtectionSources(), getLinksTo(), getNotificationTimestamp(), getRedirectsHere(), getSubjectPage(), getSubpages(), getTalkPage(), Parser::getTemplateDom(), getTitleProtection(), isAlwaysKnown(), isDeleted(), isDeletedQuick(), isSingleRevRedirect(), isSpecial(), isValidMoveOperation(), Parser::makeImage(), moveSubpages(), moveTo(), Linker::normaliseSpecialPage(), updateTitleProtection(), and userCanRead().
Title::getDefaultNamespace | ( | ) |
Title::getEarliestRevTime | ( | ) |
Title::getEditURL | ( | ) |
Title::getEscapedText | ( | ) |
Get the HTML-escaped displayable text form.
Used for the title field in tags.
Reimplemented in FakeTitle.
Definition at line 922 of file Title.php.
References getPrefixedText().
Title::getFirstRevision | ( | $ | flags = 0 |
) |
Title::getFragment | ( | ) |
Get the Title fragment (i.e. the bit after the #) in text form.
Reimplemented in FakeTitle.
Definition at line 595 of file Title.php.
Referenced by getLinkUrl(), and Linker::normaliseSpecialPage().
Title::getFragmentForURL | ( | ) |
Get the fragment in URL form, including the "#" character if there is one.
Reimplemented in FakeTitle.
Definition at line 600 of file Title.php.
References escapeFragmentForURL().
Referenced by getFullURL(), and getLinkUrl().
Title::getFullText | ( | ) |
Get the prefixed title with spaces, plus any fragment (part beginning with '#').
Reimplemented in FakeTitle.
Definition at line 653 of file Title.php.
References getPrefixedText().
Referenced by getParentCategories().
Title::getFullURL | ( | $ | query = '' , |
|
$ | variant = false | |||
) |
Get a real URL referring to this title, with interwiki link and fragment.
$query | { String :,} 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). | |
$variant | String : : language variant of url (for sr, zh..) |
Reimplemented in FakeTitle.
Definition at line 719 of file Title.php.
References $url, $wgContLang, $wgRequest, $wgServer, Interwiki::fetch(), getFragmentForURL(), getLocalURL(), getNsText(), wfAppendQuery(), wfArrayToCGI(), wfRunHooks(), and wfUrlencode().
Referenced by escapeFullURL(), getLinkUrl(), getLocalURL(), and trackbackRDF().
Title::getIndexTitle | ( | ) |
Get title for search index.
Reimplemented in FakeTitle.
Definition at line 618 of file Title.php.
References indexTitle().
Title::getInternalURL | ( | $ | query = '' , |
|
$ | variant = false | |||
) |
Get the URL form for an internal link.
$query | String : : an optional query string | |
$variant | String : : language variant of url (for sr, zh..) |
Reimplemented in FakeTitle.
Definition at line 898 of file Title.php.
References $url, $wgInternalServer, getLocalURL(), and wfRunHooks().
Referenced by getSquidURLs().
Title::getInterwiki | ( | ) |
Title::getLatestRevID | ( | $ | flags = 0 |
) |
What is the page_latest field for this page?
$flags | Integer : : a bit field; may be GAID_FOR_UPDATE to select for update |
Reimplemented in FakeTitle.
Definition at line 2153 of file Title.php.
References pageCond(), and wfGetDB().
Referenced by moveOverExistingRedirect().
Title::getLength | ( | $ | flags = 0 |
) |
What is the length of this page? Uses link cache, adding it if necessary.
$flags | Integer : : a bit field; may be GAID_FOR_UPDATE to select for update |
Reimplemented in FakeTitle.
Definition at line 2135 of file Title.php.
References getArticleID(), and LinkCache::singleton().
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.
array | $options may be FOR UPDATE |
Reimplemented in FakeTitle.
Definition at line 2510 of file Title.php.
References $options, $res, getDBkey(), getNamespace(), makeTitle(), LinkCache::singleton(), and wfGetDB().
Referenced by getTemplateLinksTo().
Title::getLinkUrl | ( | $ | query = array() , |
|
$ | variant = 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.
$query | { String :} : An associative array of key => value pairs for the query string. Keys and values will be escaped. | |
$variant | String : : Language variant of URL (for sr, zh..). Ignored for external links. Default is "false" (same variant as current page, for anonymous users). |
Reimplemented in FakeTitle.
Definition at line 855 of file Title.php.
References getFragment(), getFragmentForURL(), getFullURL(), getLocalURL(), getPrefixedText(), isExternal(), wfProfileIn(), and wfProfileOut().
Title::getLocalURL | ( | $ | query = '' , |
|
$ | variant = false | |||
) |
Get a URL with no fragment or server name.
If this page is generated with action=render, $wgServer is prepended.
mixed | $query an optional query string; if not specified, $wgArticlePath will be used. Can be specified as an associative array as well, e.g., array( 'action' => 'edit' ) (keys and values will be URL-escaped). | |
$variant | String : : language variant of url (for sr, zh..) |
Reimplemented in FakeTitle.
Definition at line 765 of file Title.php.
References $action, $url, $wgActionPaths, $wgArticlePath, $wgContLang, $wgRequest, $wgScript, $wgServer, $wgUser, $wgVariantArticlePath, getFullURL(), getPrefixedDBkey(), isExternal(), wfAppendQuery(), wfArrayToCGI(), wfRunHooks(), and wfUrlencode().
Referenced by escapeLocalURL(), EditPage::getActionURL(), getEditURL(), getFullURL(), getInternalURL(), getLinkUrl(), and Linker::makeThumbLink2().
Title::getNamespace | ( | ) |
Get the namespace index, i.e. one of the NS_xxxx constants.
Reimplemented in FakeTitle.
Definition at line 535 of file Title.php.
Referenced by TitleDependency::__construct(), deleteTitleProtection(), equals(), fixSpecialName(), Linker::formatAutocommentsCallback(), getArticleID(), getCascadeProtectionSources(), getLinksTo(), getNamespaceKey(), getNotificationTimestamp(), getRedirectsHere(), getRestrictionTypes(), getSubjectPage(), getSubpages(), getTalkPage(), Parser::getTemplateDom(), getTitleProtection(), getUserPermissionsErrorsInternal(), isContentPage(), isConversionTable(), isDeleted(), isDeletedQuick(), isMovable(), isProtected(), isSingleRevRedirect(), isSpecial(), isSpecialPage(), isTalkPage(), isValidMoveOperation(), isWatchable(), moveSubpages(), moveTo(), Linker::normaliseSpecialPage(), Parser::statelessFetchTemplate(), touchLinks(), updateTitleProtection(), and userCanRead().
Title::getNamespaceKey | ( | $ | prepend = 'nstab-' |
) |
Generate strings used for xml 'id' names in monobook tabs.
Reimplemented in FakeTitle.
Definition at line 3636 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 | Integer : : Revision ID. Get the revision that was after this one. | |
$flags | Integer : : GAID_FOR_UPDATE |
Reimplemented in FakeTitle.
Definition at line 3348 of file Title.php.
References 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 3566 of file Title.php.
References $dbr, $wgShowUpdatedMarker, $wgUser, getDBkey(), getNamespace(), and wfGetDB().
Title::getNsText | ( | ) |
Get the namespace text.
Reimplemented in FakeTitle.
Definition at line 540 of file Title.php.
References $wgContLang, MWNamespace::exists(), and MWNamespace::getCanonicalName().
Referenced by getFullURL(), getUserPermissionsErrorsInternal(), isValidMoveOperation(), and prefix().
Title::getParentCategories | ( | ) |
Get categories to which this Title belongs and return an array of categories' names.
Reimplemented in FakeTitle.
Definition at line 3253 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 | : an array with the children in the keys, to check for circular refs |
Reimplemented in FakeTitle.
Definition at line 3284 of file Title.php.
References getParentCategories(), and newFromText().
Title::getPartialURL | ( | ) |
Title::getPrefixedDBkey | ( | ) |
Get the prefixed database key form.
Reimplemented in FakeTitle.
Definition at line 627 of file Title.php.
Referenced by getLocalURL(), Parser::getTemplateDom(), isValidMoveTarget(), Linker::makeImageLink2(), Parser::mergeSectionTrees(), moveTo(), resetArticleID(), and trackbackURL().
Title::getPrefixedText | ( | ) |
Get the prefixed title with spaces.
This is the form usually used for display
Reimplemented in FakeTitle.
Definition at line 638 of file Title.php.
Referenced by __toString(), Linker::buildRollbackLink(), getEscapedText(), getFullText(), getLinkUrl(), Linker::makeBrokenImageLinkObj(), moveOverExistingRedirect(), moveTo(), moveToNewTitle(), userCanRead(), and SpecialWhatLinksHere::wlhLink().
Title::getPrefixedURL | ( | ) |
Title::getPreviousRevisionID | ( | $ | revId, | |
$ | flags = 0 | |||
) |
Get the revision ID of the previous revision.
$revId | Integer : : Revision ID. Get the revision that was before this one. | |
$flags | Integer : : GAID_FOR_UPDATE |
Reimplemented in FakeTitle.
Definition at line 3329 of file Title.php.
References wfGetDB().
Title::getRedirectsHere | ( | $ | ns = null |
) |
Get all extant redirects to this Title.
$ns | { Integer :, Null :} Single namespace to consider; NULL to consider all namespaces |
Reimplemented in FakeTitle.
Definition at line 3717 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 2033 of file Title.php.
References $action, and loadRestrictions().
Title::getRestrictions | ( | $ | action | ) |
Accessor/initialisation for mRestrictions.
$action | String : : action that permission needs to be checked for |
Reimplemented in FakeTitle.
Definition at line 2019 of file Title.php.
References $action, and loadRestrictions().
Referenced by getUserPermissionsErrorsInternal(), isProtected(), isSemiProtected(), and updateTitleProtection().
Title::getRestrictionTypes | ( | ) |
Reimplemented in FakeTitle.
Definition at line 3791 of file Title.php.
References $wgRestrictionTypes, exists(), getNamespace(), and wfRunHooks().
Referenced by isProtected(), and loadRestrictionsFromRows().
Title::getSkinFromCssJsSubpage | ( | ) |
Trim down a .css or .js subpage title to get the corresponding skin name.
Reimplemented in FakeTitle.
Definition at line 1721 of file Title.php.
Referenced by isValidCssJsSubpage().
Title::getSquidURLs | ( | ) |
Get a list of URLs to purge from the Squid cache when this page changes.
Reimplemented in FakeTitle.
Definition at line 2598 of file Title.php.
References $urls, $wgContLang, and getInternalURL().
Referenced by moveOverExistingRedirect(), and purgeSquid().
Title::getSubjectNsText | ( | ) |
Get the namespace text of the subject (rather than talk) page.
Reimplemented in FakeTitle.
Definition at line 567 of file Title.php.
References $wgContLang, and MWNamespace::getSubject().
Referenced by getNamespaceKey().
Title::getSubjectPage | ( | ) |
Get a title object associated with the subject page of this talk page.
Reimplemented in FakeTitle.
Definition at line 2491 of file Title.php.
References getDBkey(), getNamespace(), MWNamespace::getSubject(), and makeTitle().
Title::getSubpages | ( | $ | limit = -1 |
) |
Get all subpages of this page.
$limit | Maximum number of subpages to fetch; -1 for no limit |
Reimplemented in FakeTitle.
Definition at line 1667 of file Title.php.
References $dbr, $options, getDBkey(), getNamespace(), MWNamespace::hasSubpages(), TitleArray::newFromResult(), and wfGetDB().
Referenced by hasSubpages(), and moveSubpages().
Title::getSubpageText | ( | ) |
Get the lowest-level subpage name, i.e.
the rightmost part after /
Reimplemented in FakeTitle.
Definition at line 681 of file Title.php.
References MWNamespace::hasSubpages().
Referenced by getSubpageUrlForm().
Title::getSubpageUrlForm | ( | ) |
Get a URL-encoded form of the subpage text.
Reimplemented in FakeTitle.
Definition at line 693 of file Title.php.
References getSubpageText(), and wfUrlencode().
Title::getTalkNsText | ( | ) |
Get the namespace text of the talk page.
Reimplemented in FakeTitle.
Definition at line 575 of file Title.php.
References $wgContLang, and MWNamespace::getTalk().
Title::getTalkPage | ( | ) |
Get a Title object associated with the talk page of this article.
Reimplemented in FakeTitle.
Definition at line 2481 of file Title.php.
References getDBkey(), getNamespace(), MWNamespace::getTalk(), and makeTitle().
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.
array | $options may be FOR UPDATE |
Reimplemented in FakeTitle.
Definition at line 2551 of file Title.php.
References $options, and getLinksTo().
Title::getText | ( | ) |
Simple accessors.
Get the text form (spaces not underscores) of the main part
Reimplemented in FakeTitle.
Definition at line 520 of file Title.php.
Referenced by getBaseText(), isConversionTable(), isSubpage(), Parser::makeImage(), Linker::makeMediaLinkObj(), Parser::statelessFetchTemplate(), and trackbackRDF().
static Title::getTitleInvalidRegex | ( | ) | [static] |
Definition at line 2222 of file Title.php.
References legalChars(), and csslex::URL.
Referenced by secureAndSplit().
Title::getTitleProtection | ( | ) | [private] |
Is this title subject to title protection?
Definition at line 1410 of file Title.php.
References $dbr, $res, exists(), getDBkey(), getNamespace(), and wfGetDB().
Referenced by getUserPermissionsErrorsInternal(), and loadRestrictions().
Title::getTouched | ( | $ | db = null |
) |
Title::getUserCaseDBKey | ( | ) |
Title::getUserPermissionsErrors | ( | $ | action, | |
$ | user, | |||
$ | doExpensiveQueries = true , |
|||
$ | ignoreErrors = array() | |||
) |
Can $user perform $action on this page?
FIXME: This *does not* check throttles (User::pingLimiter()).
$action | String : :action that permission needs to be checked for | |
$user | User : user to check | |
$doExpensiveQueries | Boolean : : Set this to false to avoid doing unnecessary queries. | |
$ignoreErrors | { String :} : Set this to a list of message keys whose corresponding errors may be ignored. |
Reimplemented in FakeTitle.
Definition at line 1073 of file Title.php.
References $action, $name, $wgContLang, $wgEmailConfirmToEdit, $wgLang, $wgUser, getUserPermissionsErrorsInternal(), StubObject::isRealObject(), wfGetIP(), wfMsg(), wfTimestamp(), and User::whoIs().
Referenced by getUserPermissionsErrorsInternal(), and isValidMoveOperation().
Title::getUserPermissionsErrorsInternal | ( | $ | action, | |
$ | user, | |||
$ | doExpensiveQueries = true , |
|||
$ | short = false | |||
) | [private] |
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 : user to check | |
$doExpensiveQueries | Boolean : : Set this to false to avoid doing unnecessary queries. | |
$short | Boolean : : Set this to true to stop after the first permission error. |
Definition at line 1164 of file Title.php.
References $action, $page, $result, $wgGroupPermissions, getCascadeProtectionSources(), User::getGroupsWithPermission(), getNamespace(), getNsText(), getRestrictions(), getTitleProtection(), getUserPermissionsErrors(), isCssJsSubpage(), isCssSubpage(), isJsSubpage(), isMovable(), MWNamespace::isMovable(), isNamespaceProtected(), isSubpage(), isTalkPage(), wfMsg(), wfProfileIn(), wfProfileOut(), wfRunHooks(), and User::whoIs().
Referenced by getUserPermissionsErrors(), and userCan().
Title::hasSubpages | ( | ) |
Does this have subpages? (Warning, usually requires an extra DB query.
)
Reimplemented in FakeTitle.
Definition at line 1641 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 | Integer : : a namespace index | |
$title | String : : text-form main part |
Definition at line 434 of file Title.php.
References $t, $title, $wgContLang, and SearchEngine::legalSearchChars().
Referenced by SearchUpdate::doUpdate(), and getIndexTitle().
Title::invalidateCache | ( | ) |
Updates page_touched for this page; called from LinksUpdate.php.
Reimplemented in FakeTitle.
Definition at line 2186 of file Title.php.
References $dbw, $success, HTMLFileCache::clearFileCache(), pageCond(), wfGetDB(), and wfReadOnly().
Title::isAlwaysKnown | ( | ) |
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 3489 of file Title.php.
References exists(), getDBkey(), wfFindFile(), and wfMsgWeirdKey().
Referenced by isKnown().
Title::isCascadeProtected | ( | ) |
Cascading protection: Return true if cascading restrictions apply to this page, false if not.
Reimplemented in FakeTitle.
Definition at line 1770 of file Title.php.
References getCascadeProtectionSources().
Title::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?
Reimplemented in FakeTitle.
Definition at line 3706 of file Title.php.
References getNamespace(), and MWNamespace::isContent().
Referenced by moveTo().
Title::isConversionTable | ( | ) |
Is this a conversion table for the LanguageConverter?
Reimplemented in FakeTitle.
Definition at line 991 of file Title.php.
References getNamespace(), and getText().
Title::isCssJsSubpage | ( | ) |
Is this a .css or .js subpage of a user page?
Reimplemented in FakeTitle.
Definition at line 1702 of file Title.php.
Referenced by getUserPermissionsErrorsInternal(), and isValidCssJsSubpage().
Title::isCssOrJsPage | ( | ) |
Title::isCssSubpage | ( | ) |
Is this a .css subpage of a user page?
Reimplemented in FakeTitle.
Definition at line 1730 of file Title.php.
Referenced by getUserPermissionsErrorsInternal().
Title::isDeleted | ( | ) |
Is there a version of this page in the deletion archive?
Reimplemented in FakeTitle.
Definition at line 2044 of file Title.php.
References $dbr, $n, getDBkey(), getNamespace(), and wfGetDB().
Title::isDeletedQuick | ( | ) |
Is there a version of this page in the deletion archive?
Reimplemented in FakeTitle.
Definition at line 2067 of file Title.php.
References $dbr, getDBkey(), getNamespace(), and wfGetDB().
Title::isExternal | ( | ) |
Is this Title interwiki?
Reimplemented in FakeTitle.
Definition at line 930 of file Title.php.
Referenced by getLinkUrl(), getLocalURL(), and isWatchable().
Title::isJsSubpage | ( | ) |
Is this a .js subpage of a user page?
Reimplemented in FakeTitle.
Definition at line 1737 of file Title.php.
Referenced by getUserPermissionsErrorsInternal().
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 3522 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 479 of file Title.php.
References Interwiki::fetch().
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 1512 of file Title.php.
References getInterwiki(), and getNamespace().
Referenced by getUserPermissionsErrorsInternal(), and isValidMoveOperation().
Title::isNamespaceProtected | ( | ) |
Determines if $wgUser is unable to edit this page because it has been protected by $wgNamespaceProtection.
Reimplemented in FakeTitle.
Definition at line 1040 of file Title.php.
References $wgNamespaceProtection, and $wgUser.
Referenced by getUserPermissionsErrorsInternal().
Title::isNewPage | ( | ) |
Title::isProtected | ( | $ | action = '' |
) |
Does the title correspond to a protected article?
$what | String : : the action the page is protected from, by default checks all actions. |
Reimplemented in FakeTitle.
Definition at line 963 of file Title.php.
References $action, $wgRestrictionLevels, getNamespace(), getRestrictions(), and getRestrictionTypes().
Referenced by moveTo().
Title::isRedirect | ( | $ | flags = 0 |
) |
Is this an article that is a redirect page? Uses link cache, adding it if necessary.
$flags | Integer : : a bit field; may be GAID_FOR_UPDATE to select for update |
Reimplemented in FakeTitle.
Definition at line 2116 of file Title.php.
References getArticleID(), and LinkCache::singleton().
Title::isSemiProtected | ( | $ | action = 'edit' |
) |
Title::isSingleRevRedirect | ( | ) |
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 3162 of file Title.php.
References $dbw, 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 3672 of file Title.php.
References $name, getDBkey(), getNamespace(), and SpecialPage::resolveAliasWithSubpage().
Referenced by isValidRedirectTarget(), and userCanRead().
Title::isSpecialPage | ( | ) |
Returns true if this is a special page.
Reimplemented in FakeTitle.
Definition at line 3664 of file Title.php.
References getNamespace().
Title::isSubpage | ( | ) |
Is this a subpage?
Reimplemented in FakeTitle.
Definition at line 1631 of file Title.php.
References getText(), and hasSubpages().
Referenced by getUserPermissionsErrorsInternal().
Title::isTalkPage | ( | ) |
Is this a talk page of some sort?
Reimplemented in FakeTitle.
Definition at line 1623 of file Title.php.
References getNamespace(), and MWNamespace::isTalk().
Referenced by getUserPermissionsErrorsInternal().
Title::isTrans | ( | ) |
Determine whether the object refers to a page within this project and is transcludable.
Reimplemented in FakeTitle.
Definition at line 493 of file Title.php.
References Interwiki::fetch().
Title::isValidCssJsSubpage | ( | ) |
Is this a *valid* .css or .js subpage of a user page? Check that the corresponding skin exists.
Reimplemented in FakeTitle.
Definition at line 1710 of file Title.php.
References getSkinFromCssJsSubpage(), Skin::getSkinNames(), and isCssJsSubpage().
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 | Boolean : : 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 2646 of file Title.php.
References $wgUser, File::checkExtensionCompatibility(), equals(), exists(), getArticleID(), getDBkey(), getNamespace(), getNsText(), getUserPermissionsErrors(), isMovable(), isValidMoveTarget(), EditPage::matchSummarySpamRegex(), wfFindFile(), wfLocalFile(), wfMergeErrorArrays(), wfRunHooks(), and wfStripIllegalFilenameChars().
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 3200 of file Title.php.
References $dbw, getPrefixedDBkey(), newFromText(), Revision::newFromTitle(), wfDebug(), wfGetDB(), and wfLocalFile().
Referenced by isValidMoveOperation().
Title::isValidRedirectTarget | ( | ) |
Check if this Title is a valid redirect target.
Reimplemented in FakeTitle.
Definition at line 3747 of file Title.php.
References $wgInvalidRedirectTargets, and isSpecial().
Title::isWatchable | ( | ) |
Can this title be added to a user's watchlist?
Reimplemented in FakeTitle.
Definition at line 3242 of file Title.php.
References getNamespace(), and isExternal().
static Title::legalChars | ( | ) | [static] |
Get a regex character class describing the legal characters in a link.
Definition at line 420 of file Title.php.
References $wgLegalTitleChars.
Referenced by languages::getMessagesWithDubiousLinks(), getTitleInvalidRegex(), Parser_LinkHooks::replaceInternalLinks2(), Parser::replaceInternalLinks2(), TitleTest::testLegalChars(), and wfStripIllegalFilenameChars().
Title::loadRestrictions | ( | $ | oldFashionedRestrictions = null |
) |
Load restrictions from the page_restrictions table.
Reimplemented in FakeTitle.
Definition at line 1966 of file Title.php.
References $dbr, $res, Block::decodeExpiry(), 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. |
Definition at line 1879 of file Title.php.
References $dbr, $res, $rows, loadRestrictionsFromRows(), and wfGetDB().
Referenced by loadRestrictions().
Title::loadRestrictionsFromRows | ( | $ | rows, | |
$ | oldFashionedRestrictions = null | |||
) |
Reimplemented in FakeTitle.
Definition at line 1890 of file Title.php.
References $dbr, $rows, Block::decodeExpiry(), getRestrictionTypes(), purgeExpiredRestrictions(), wfGetDB(), and wfTimestampNow().
Referenced by loadRestrictionsFromResultWrapper().
static Title::makeName | ( | $ | ns, | |
$ | title, | |||
$ | fragment = '' | |||
) | [static] |
Make a prefixed DB key from a DB key and a namespace index.
$ns | Integer : : numerical representation of the namespace | |
$title | String : : the DB key form the title | |
$fragment | String : : The link fragment (after the "#") |
Definition at line 461 of file Title.php.
References $name, $title, and $wgContLang.
Referenced by MovePageForm::doSubmit(), LinkHolderArray::doVariants(), makeTitleSafe(), nameOf(), and TitleCleanup::processRow().
static& Title::makeTitle | ( | $ | ns, | |
$ | title, | |||
$ | fragment = '' | |||
) | [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 | Integer : : the namespace of the article | |
$title | String : : the unprefixed database key form | |
$fragment | String : : The link fragment (after the "#") |
Definition at line 247 of file Title.php.
References $t, $title, and wfUrlencode().
Referenced by SearchResult::__construct(), LinkBatch::addResultToCache(), MediaWiki::articleFromTitle(), ProtectionForm::buildForm(), LocalRepo::checkRedirect(), Orphans::checkSeparation(), compressWithConcat(), Article::confirmDelete(), CategoryViewer::doCategoryQuery(), SpecialTags::doTagRow(), IPUnblockForm::doUnblock(), UpdateSearchIndex::doUpdateSearchIndex(), LinkHolderArray::doVariants(), NukeNS::execute(), DumpSisterSites::execute(), DumpLinks::execute(), CheckBadRedirects::execute(), AttachLatest::execute(), ApiQueryDeletedrevs::execute(), ApiQueryBacklinks::extractRedirRowInfo(), ApiQueryWatchlist::extractRowInfo(), ApiQueryContributions::extractRowInfo(), ApiQueryRecentChanges::extractRowInfo(), ApiQueryRandom::extractRowInfo(), ApiQueryLogEvents::extractRowInfo(), ApiQueryBacklinks::extractRowInfo(), Article::fetchContent(), SpecialRecentChanges::filterByCategories(), ForeignAPIRepo::findBySha1(), DoubleRedirectJob::fixRedirects(), fixSpecialName(), ImagePage::followRedirect(), FeedUtils::formatDiff(), ApiParse::formatLinks(), WantedCategoriesPage::formatResult(), UnwatchedpagesPage::formatResult(), UnusedtemplatesPage::formatResult(), UnusedCategoriesPage::formatResult(), PopularPagesPage::formatResult(), MostrevisionsPage::formatResult(), MostlinkedCategoriesPage::formatResult(), MIMEsearchPage::formatResult(), ListredirectsPage::formatResult(), LinkSearchPage::formatResult(), FileDuplicateSearchPage::formatResult(), DoubleRedirectsPage::formatResult(), DisambiguationsPage::formatResult(), BrokenRedirectsPage::formatResult(), AncientPagesPage::formatResult(), UsersPager::formatRow(), DeletedContribsPager::formatRow(), CategoryPager::formatRow(), ImageListPager::formatValue(), AllmessagesTablePager::formatValue(), ParserTest::fuzzTest(), ChangesFeed::generateFeed(), GenerateSitemap::generateLimit(), getBrokenLinksFrom(), User::getCanonicalName(), getCascadeProtectionSources(), IPBlockForm::getConvenienceLinks(), DoubleRedirectJob::getFinalDestination(), Article::getHiddenCategories(), RevDel_LogItem::getHTML(), SpecialExport::getLinks(), getLinksTo(), RecentChange::getMovedToTitle(), MessageCache::getMsgFromNamespace(), SearchEngine::getNearMatchInternal(), ApiQueryInfo::getProtectionInfo(), SpecialMytalk::getRedirect(), SpecialMypage::getRedirect(), File::getRedirectedTitle(), ImagePage::getRedirectTarget(), Article::getRedirectTarget(), ApiPageSet::getRedirectTargets(), RollbackEdits::getRollbackTitles(), LogEventsList::getShowHideLinks(), DisambiguationsPage::getSQL(), getSubjectPage(), getTalkPage(), Parser::getTemplateDom(), EditPage::getTemplates(), Revision::getTitle(), RecentChange::getTitle(), TitleDependency::getTitle(), SpecialPage::getTitleFor(), LogPage::getTitleLink(), Article::getUsedTemplates(), UserRightsProxy::getUserPage(), User::getUserPage(), ImagePage::imageLinks(), ApiPageSet::initFromQueryResult(), LogEventsList::logLine(), GenerateSitemap::main(), newFromIDs(), SquidUpdate::newFromLinksTo(), newFromRow(), OldLocalFile::newFromRow(), ForeignDBFile::newFromRow(), ArchivedFile::newFromRow(), XmlDumpWriter::openPage(), WikiImporter::out_append(), ApiPageSet::processDbRow(), WatchlistCleanup::processRow(), CapsCleanup::processRow(), DeleteDefaultMessages::reallyExecute(), LinkHolderArray::replaceInternal(), Revision::Revision(), DoubleRedirectJob::run(), ApiQueryWatchlistRaw::run(), ApiQueryProtectedTitles::run(), ApiQueryLinks::run(), ApiQueryImages::run(), ApiQueryExtLinksUsage::run(), ApiQueryDuplicateFiles::run(), ApiQueryCategoryMembers::run(), ApiQueryCategories::run(), ApiQueryBacklinks::run(), ApiQueryAllpages::run(), ApiQueryAllLinks::run(), ApiQueryAllimages::run(), ApiQueryAllCategories::run(), RecentChange::save(), SpecialAllpages::showChunk(), SpecialRevisionDelete::showForm(), FileDeleteForm::showForm(), SpecialWhatLinksHere::showIndirectLinks(), SpecialPrefixindex::showPrefixChunk(), SpecialUpload::showUploadWarning(), PrefixSearch::specialSearch(), CoreParserFunctions::urlFunction(), Linker::userLink(), Linker::userTalkLink(), ImagePage::view(), wfIsBadImage(), wfSpecialLinkSearch(), wfSpecialNewimages(), wfSpecialRemoveRestrictionsProcess(), and XmlDumpWriter::writeLogItem().
static Title::makeTitleSafe | ( | $ | ns, | |
$ | title, | |||
$ | fragment = '' | |||
) | [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 | Integer : : the namespace of the article | |
$title | String : : the database key form | |
$fragment | String : : The link fragment (after the "#") |
Definition at line 269 of file Title.php.
References $t, $title, and makeName().
Referenced by UsersPager::__construct(), AllmessagesTablePager::__construct(), ActiveUsersPager::__construct(), UnregisteredLocalFile::__construct(), OutputPage::addCategoryLinks(), Parser::addTrackingCategory(), WatchlistEditor::buildRemoveList(), ImageCleanup::buildSafeTitle(), MovePageForm::doSubmit(), RebuildFileCache::execute(), SpecialExport::execute(), DeletedContributionsPage::execute(), SpecialContributions::execute(), ApiQueryInfo::execute(), SpecialContributions::feed(), RepoGroup::findFile(), FileRepo::findFile(), RepoGroup::findFiles(), SpecialNewpages::form(), Linker::formatAutocommentsCallback(), Linker::formatLinksInCommentCallback(), ShortPagesPage::formatResult(), SpecialMostlinkedtemplates::formatResult(), MostlinkedPage::formatResult(), MostcategoriesPage::formatResult(), FewestrevisionsPage::formatResult(), WantedQueryPage::formatResult(), PageQueryPage::formatResult(), ProtectedTitlesForm::formatRow(), ProtectedPagesForm::formatRow(), SpecialNewpages::formatRow(), Preferences::generateSkinOptions(), UsersPager::getBody(), CategoryPager::getBody(), LinksUpdate::getCategoryInsertions(), OutputPage::getHeadScripts(), SpecialStatistics::getMostViewedPages(), SpecialAllpages::getNamespaceKeyAndText(), ApiBase::getParameterFromSettings(), NewPagesPager::getQueryInfo(), RandomPage::getRandomTitle(), SpecialPage::getSafeTitleFor(), DisambiguationsPage::getSQL(), MergeHistoryPager::getStartBody(), LogPager::getStartBody(), UploadBase::getTitle(), Category::getTitle(), WatchlistEditor::getWatchlist(), WatchlistEditor::getWatchlistInfo(), User::idFromName(), LogPager::limitUser(), Linker::makeMediaLink(), makeNSUrl(), Linker::makeThumbLink2(), TitleCleanup::moveInconsistentPage(), moveSubpages(), FileRepo::newFile(), Image::newFromName(), Category::newFromName(), LanguageConverter::parseCachedTable(), ApiQueryBacklinks::parseContinueParam(), Job::pop(), Job::pop_type(), ImageQueryPage::prepareImage(), ImageCleanup::processRow(), PatrolLog::record(), NamespaceConflictChecker::reportConflict(), NamespaceConflictChecker::resolveConflict(), NamespaceConflictChecker::resolveConflictOn(), IPBlockForm::setUsernameBitfields(), UndeleteForm::showHistory(), UndeleteForm::showList(), SpecialBookSources::showList(), SpecialAllpages::showToplevel(), SpecialUpload::showViewDeletedLinks(), wfSpecialFilepath(), and wfThumbMain().
Title::moveNoAuth | ( | &$ | nt | ) |
Title::moveOverExistingRedirect | ( | &$ | nt, | |
$ | reason = '' , |
|||
$ | createRedirect = true | |||
) | [private] |
Move page to a title which is at present a redirect to the source page.
&$nt | Title : the page to move to, which should currently be a redirect | |
$reason | String : : The reason for the move | |
$createRedirect | Boolean : : Whether to leave a redirect at the old title. Ignored if the user doesn't have the suppressredirect right |
Reimplemented in FakeTitle.
Definition at line 2891 of file Title.php.
References $dbw, $urls, $wgContLang, $wgUser, $wgUseSquid, $wgUseTrackbacks, MagicWord::get(), getArticleID(), getLatestRevID(), getPrefixedText(), getSquidURLs(), Revision::newNullRevision(), resetArticleID(), wfGetDB(), wfMsgForContent(), wfRunHooks(), and wfTimestampNow().
Referenced by moveTo().
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 3100 of file Title.php.
References $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 | Boolean : : indicates whether $wgUser's permissions should be checked | |
$reason | String : : The reason for the move | |
$createRedirect | Boolean : : 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 2750 of file Title.php.
References $dbw, $wgMessageCache, $wgUser, WatchedItem::duplicateEntries(), getArticleID(), getDBkey(), getNamespace(), getPrefixedDBkey(), getPrefixedText(), isContentPage(), isProtected(), isValidMoveOperation(), moveOverExistingRedirect(), wfGetDB(), wfLocalFile(), wfMsgForContent(), and wfRunHooks().
Referenced by moveNoAuth().
Title::moveToNewTitle | ( | &$ | nt, | |
$ | reason = '' , |
|||
$ | createRedirect = true | |||
) | [private] |
Move page to non-existing title.
&$nt | {Title} the new Title | |
$reason | {} The reason for the move | |
$createRedirect | {} 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 3007 of file Title.php.
References $dbw, $wgContLang, $wgUser, $wgUseSquid, MagicWord::get(), getArticleID(), getPrefixedText(), Revision::newNullRevision(), Article::onArticleCreate(), purgeSquid(), resetArticleID(), wfGetDB(), wfMsgExt(), wfMsgForContent(), and wfRunHooks().
static Title::nameOf | ( | $ | id | ) | [static] |
static Title::newFromDBkey | ( | $ | key | ) | [static] |
Create a new Title from a prefixed DB key.
$key | {} The database key, which has underscores instead of spaces, possibly including namespace and interwiki prefixes |
Definition at line 83 of file Title.php.
References $t.
Referenced by LinkCache::addLink(), LinkHolderArray::doVariants(), and wfAjaxWatch().
static Title::newFromID | ( | $ | id, | |
$ | flags = 0 | |||
) | [static] |
Create a new Title from an article ID.
$id | Integer : : the page_id corresponding to the Title to create | |
$flags | Integer : : use GAID_FOR_UPDATE to use master |
Definition at line 188 of file Title.php.
References $title, newFromRow(), and wfGetDB().
Referenced by MediaWiki::checkInitialQueries(), CleanupSpam::cleanupArticle(), ApiMove::execute(), ApiDelete::execute(), RefreshLinks::fixLinksFromArticle(), RefreshLinks::fixRedirect(), DisambiguationsPage::formatResult(), and MergehistoryForm::merge().
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 301 of file Title.php.
References newFromRedirectInternal().
Referenced by CheckBadRedirects::execute(), ListredirectsPage::formatResult(), Article::getAutosummary(), Article::insertRedirect(), EditPage::internalAttemptSave(), Article::isRedirect(), DoubleRedirectJob::run(), Parser::statelessFetchTemplate(), and Article::updateRevisionOn().
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 328 of file Title.php.
References $title, $wgMaxRedirects, and newFromRedirectInternal().
Referenced by 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 365 of file Title.php.
References $title, MagicWord::get(), and newFromText().
Referenced by newFromRedirect(), and newFromRedirectArray().
static Title::newFromRedirectRecurse | ( | $ | text | ) | [static] |
Extract a redirect destination from a string and return the Title, or null if the text doesn't contain a valid redirect This will recurse down $wgMaxRedirects times or until a non-redirect target is hit in order to provide (hopefully) the Title of the final destination instead of another redirect.
$text | String : : Text with possible redirect |
Definition at line 314 of file Title.php.
References newFromRedirectArray().
Referenced by Article::followRedirectText(), and Article::isRedirect().
static Title::newFromRow | ( | $ | row | ) | [static] |
Make a Title object from a DB row.
$row | Row : (needs at least page_title,page_namespace) |
Definition at line 224 of file Title.php.
References $t, and makeTitle().
Referenced by ContribsPager::formatRow(), File::getLinksTo(), getRedirectsHere(), newFromID(), and TitleArrayFromResult::setCurrent().
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 104 of file Title.php.
References $t, $titleCache, and Sanitizer::decodeCharReferences().
Referenced by DoubleRedirectJob::__construct(), ParserTest::addArticle(), ApiQueryLogEvents::addLogParams(), Skin::addMetadataLinks(), addToSidebar(), ApiFormatXml::addXslt(), ApiQuerySiteinfo::appendGeneralInfo(), ApiQuerySiteinfo::appendRightsInfo(), CoreParserFunctions::basepagename(), CoreParserFunctions::basepagenamee(), Parser::braceSubstitution(), SkinTemplate::buildPersonalUrls(), LocalRepo::checkRedirect(), checkTitle(), ApiFeedWatchlist::createFeedItem(), CoreParserFunctions::displaytitle(), SpecialExport::doExport(), SpecialResetpass::doReturnTo(), drawCategoryBrowser(), Linker::editSectionLinkForOther(), Undelete::execute(), RunJobs::execute(), RollbackEdits::execute(), RebuildTextIndex::execute(), RebuildRecentchanges::execute(), PurgeList::execute(), Protect::execute(), Orphans::execute(), NukePage::execute(), NamespaceConflictChecker::execute(), MoveBatch::execute(), GetTextMaint::execute(), EditCLI::execute(), DeleteBatch::execute(), AddWiki::execute(), SpecialRevisionDelete::execute(), SpecialListGroupRights::execute(), ApiWatch::execute(), ApiUndelete::execute(), ApiRollback::execute(), ApiQueryLogEvents::execute(), ApiPurge::execute(), ApiProtect::execute(), ApiParse::execute(), ApiMove::execute(), ApiExpandTemplates::execute(), ApiEditPage::execute(), ApiDelete::execute(), WatchlistEditor::extractTitles(), DBConnectionError::fileCachedPage(), LanguageConverter::findVariantLink(), footerLink(), Linker::formatAutocommentsCallback(), Parser::formatHeadings(), Linker::formatLinksInCommentCallback(), MIMEsearchPage::formatResult(), FileDuplicateSearchPage::formatResult(), CoreParserFunctions::fullpagename(), CoreParserFunctions::fullpagenamee(), CoreParserFunctions::gender(), User::getCanonicalName(), getCategoryLinks(), getCopyright(), User::getGroupPage(), SpecialStatistics::getGroupStats(), RecentChange::getIRCLine(), SpecialExport::getLinks(), SearchEngine::getNearMatchInternal(), getParentCategoryTree(), EditPage::getPreloadedText(), DisambiguationsPage::getSQL(), SpecialRecentchangeslinked::getTargetTitle(), LogPage::getTitleLink(), SpecialSearch::goResult(), isValidMoveTarget(), User::isValidUserName(), LogPager::limitTitle(), PageArchive::listPagesByPrefix(), LoginForm::LoginForm(), LogEventsList::logLine(), SkinTemplate::makeArticleUrlDetails(), Linker::makeBrokenLink(), Skin::makeGlobalVariablesScript(), makeI18nUrl(), Parser::makeImage(), Linker::makeKnownLink(), makeKnownUrlDetails(), Linker::makeStubLink(), SkinTemplate::makeTalkUrlDetails(), PPFuzzTester::makeTitle(), makeUrl(), makeUrlDetails(), TitleCleanup::moveIllegalPage(), CoreParserFunctions::mwnamespace(), nameAndLogin(), CoreParserFunctions::namespacee(), ImportStreamSource::newFromInterwiki(), newFromRedirectInternal(), newMainPage(), otherLanguages(), WikiImporter::out_append(), SkinTemplate::outputPage(), WikiExporter::pageByName(), CoreParserFunctions::pagename(), CoreParserFunctions::pagenamee(), RdfMetaData::pageOrString(), CoreParserFunctions::pagesize(), ApiQueryBacklinks::processContinue(), WatchlistCleanup::processRow(), TitleCleanup::processRow(), ApiPageSet::processTitlesArray(), SkinStandard::quickBar(), SkinCologneBlue::quickBar(), EnhancedChangesList::recentChangesBlockLine(), OldChangesList::recentChangesLine(), Parser::renderImageGallery(), Parser::replaceInternalLinks2(), Parser_LinkHooks::replaceInternalLinksCallback(), OutputPage::returnToMain(), RdfMetaData::rights(), ApiQueryCategoryMembers::run(), ApiQueryCategories::run(), MWGearmanJob::runNoSwitch(), ParserTest::runTest(), SearchUpdate::SearchUpdate(), Parser::setTitle(), EditPage::showCustomIntro(), SpecialSearch::showInterwikiHit(), SpecialSearch::showResults(), WatchlistEditor::showTitles(), CoreParserFunctions::subjectpagename(), CoreParserFunctions::subjectpagenamee(), CoreParserFunctions::subjectspace(), CoreParserFunctions::subjectspacee(), CoreParserFunctions::subpagename(), CoreParserFunctions::subpagenamee(), subPageSubtitle(), LoginForm::successfulLogin(), SkinCologneBlue::sysLinks(), CoreParserFunctions::talkpagename(), CoreParserFunctions::talkpagenamee(), CoreParserFunctions::talkspace(), CoreParserFunctions::talkspacee(), Parser::testPreprocess(), Parser::testPst(), Parser::testSrvus(), PrefixSearch::titleSearch(), ApiQueryBase::titleToKey(), WatchlistEditor::unwatchTitles(), CoreParserFunctions::urlFunction(), WatchlistEditor::watchTitles(), wfIsBadImage(), wfSpecialFileDuplicateSearch(), wfSpecialMovepage(), wfSpecialNewimages(), wfViewPrevNext(), wlDaysLink(), and wlHoursLink().
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 162 of file Title.php.
References $t, $url, and $wgLegalTitleChars.
Referenced by ImageListPager::__construct(), MediaWiki::checkInitialQueries(), SpecialRecentchangeslinked::doMainQuery(), SpecialWhatLinksHere::execute(), DBConnectionError::fileCachedPage(), MergehistoryForm::MergehistoryForm(), UndeleteForm::UndeleteForm(), CoreParserFunctions::urlFunction(), and wfSpecialNewimages().
static Title::newMainPage | ( | ) | [static] |
Create a new Title for the Main Page.
Definition at line 283 of file Title.php.
References $title, newFromText(), and wfMsgForContent().
Referenced by EmaillingJob::__construct(), MediaWiki::checkInitialQueries(), SkinCologneBlue::doAfterContent(), SkinCologneBlue::doBeforeContent(), SpecialResetpass::doReturnTo(), FileDeleteForm::execute(), Preferences::generateSkinOptions(), XmlDumpWriter::homelink(), OutputPage::loginToUse(), logoText(), mainPageLink(), makeMainPageUrl(), OutputPage::returnToMain(), LoginForm::successfulLogin(), and Article::view().
Title::pageCond | ( | ) |
Get an associative array for selecting this title from the "page" table.
Reimplemented in FakeTitle.
Definition at line 3313 of file Title.php.
Referenced by getLatestRevID(), getTouched(), invalidateCache(), isNewPage(), and isSingleRevRedirect().
Title::prefix | ( | $ | name | ) |
Prefix some arbitrary text with the namespace or interwiki prefix of this object.
$name | String : : the text |
Definition at line 2208 of file Title.php.
References $name, and getNsText().
Referenced by getPrefixedDBkey(), getPrefixedText(), and getPrefixedURL().
static Title::purgeExpiredRestrictions | ( | ) | [static] |
Purge expired restrictions from the page_restrictions table.
Definition at line 2002 of file Title.php.
References $dbw, and wfGetDB().
Referenced by getCascadeProtectionSources(), loadRestrictions(), loadRestrictionsFromRows(), ProtectedTitlesForm::showList(), ProtectedPagesForm::showList(), and Article::updateRestrictions().
Title::purgeSquid | ( | ) |
Purge all applicable Squid URLs.
Reimplemented in FakeTitle.
Definition at line 2620 of file Title.php.
References $urls, $wgUseSquid, and getSquidURLs().
Referenced by moveToNewTitle().
Title::quickUserCan | ( | $ | action | ) |
Can $wgUser 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 |
Reimplemented in FakeTitle.
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 | Integer : : the new Article ID |
Reimplemented in FakeTitle.
Definition at line 2172 of file Title.php.
References getPrefixedDBkey(), and LinkCache::singleton().
Referenced by moveOverExistingRedirect(), and moveToNewTitle().
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 2264 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 2473 of file Title.php.
Referenced by secureAndSplit().
Title::touchLinks | ( | ) |
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 3540 of file Title.php.
References getNamespace().
Title::trackbackRDF | ( | ) |
Get the trackback RDF for this page.
Reimplemented in FakeTitle.
Definition at line 3609 of file Title.php.
References $tburl, $title, $url, getFullURL(), getText(), and trackbackURL().
Title::trackbackURL | ( | ) |
Get the trackback URL for this page.
Reimplemented in FakeTitle.
Definition at line 3598 of file Title.php.
References $wgScriptExtension, $wgScriptPath, $wgServer, and getPrefixedDBkey().
Referenced by trackbackRDF().
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 1439 of file Title.php.
References $dbw, $title, $wgContLang, $wgUser, Block::encodeExpiry(), getDBkey(), getNamespace(), getRestrictions(), wfGetDB(), wfMsgForContent(), and wfTimestampNow().
Title::userCan | ( | $ | action, | |
$ | doExpensiveQueries = true | |||
) |
Can $wgUser perform $action on this page?
$action | String : : action that permission needs to be checked for | |
$doExpensiveQueries | Boolean : : Set this to false to avoid doing unnecessary queries. |
Reimplemented in FakeTitle.
Definition at line 1057 of file Title.php.
References $action, $wgUser, and getUserPermissionsErrorsInternal().
Referenced by moveSubpages(), and quickUserCan().
Title::userCanEditCssSubpage | ( | ) |
Title::userCanEditJsSubpage | ( | ) |
Title::userCanRead | ( | ) |
Can $wgUser read this page?
Reimplemented in FakeTitle.
Definition at line 1521 of file Title.php.
References $name, $result, $wgGroupPermissions, $wgRevokePermissions, $wgUser, $wgWhitelistRead, getDBkey(), getNamespace(), getPrefixedText(), SpecialPage::getTitleFor(), isSpecial(), SpecialPage::resolveAliasWithSubpage(), and wfRunHooks().
Title::userIsWatching | ( | ) |
Title::$mArticleID = -1 |
Title::$mBacklinkCache = null |
Title::$mCascadeRestriction |
Title::$mCascadeSources |
Title::$mDefaultNamespace = NS_MAIN |
Title::$mFragment |
Title::$mHasCascadingRestrictions |
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::$mUserCaseDBKey |
Title::$mWatched = null |
Is $wgUser watching this page? null if unfilled, accessed through userIsWatching().
Title::$titleCache = array() [static, private] |
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.