MediaWiki  REL1_19
FakeTitle Class Reference

Fake title class that triggers an error if any members are called. More...

Inheritance diagram for FakeTitle:
Collaboration diagram for FakeTitle:

List of all members.

Public Member Functions

 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.
 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.
 error ()
 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.
 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.
 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.
 getCascadeProtectionSources ($get_pages=true)
 Cascading protection: Get the source of any cascading restrictions on this page.
 getDBkey ()
 Get the main part with underscores.
 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= '', $variant=false)
 Get a real URL referring to this title, with interwiki link and fragment.
 getIndexTitle ()
 Get title for search index.
 getInternalURL ($query= '', $variant=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.
 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=array(), $variant=false)
 Get a URL that's the simplest URL that will be valid to link, locally, to the current Title.
 getLocalURL ($query= '', $variant=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.
 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.
 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.
 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?
 hasSubpages ()
 Does this have subpages? (Warning, usually requires an extra DB query.)
 invalidateCache ()
 Updates page_touched for this page; called from LinksUpdate.php.
 isAlwaysKnown ()
 Should links to this title be shown as potentially viewable (i.e.
 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.
 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?
 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?
 loadRestrictions ($res=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.
 moveOverExistingRedirect (&$nt, $reason= '', $createRedirect=true)
 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.
 moveToNewTitle (&$nt, $reason= '', $createRedirect=true)
 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?
 userCanEditCssJsSubpage ()
 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?

Detailed Description

Fake title class that triggers an error if any members are called.

Definition at line 6 of file FakeTitle.php.


Member Function Documentation

Returns cascading restrictions for the current article.

Returns:
Boolean

Reimplemented from Title.

Definition at line 67 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Is this in a namespace that allows actual pages?

Returns:
Bool

Reimplemented from Title.

Definition at line 110 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Could this title have a corresponding talk page?

Returns:
Bool TRUE or FALSE

Reimplemented from Title.

Definition at line 19 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Boolean

Reimplemented from Title.

Definition at line 122 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::countRevisionsBetween ( old,
new 
)

Get the number of revisions between the given revision.

Used for diffs and other things that really need it.

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

Reimplemented from Title.

Definition at line 105 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Remove any title protection due to page existing.

Reimplemented from Title.

Definition at line 50 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::equals ( Title title)

Compare with another title.

Parameters:
$titleTitle
Returns:
Bool

Reimplemented from Title.

Definition at line 106 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Definition at line 7 of file FakeTitle.php.

Referenced by areRestrictionsCascading(), canExist(), canTalk(), canUseNoindex(), countRevisionsBetween(), deleteTitleProtection(), equals(), escapeFullURL(), escapeLocalURL(), exists(), fixSpecialName(), getArticleID(), getBacklinkCache(), getBaseText(), getBrokenLinksFrom(), getCascadeProtectionSources(), getDBkey(), getDefaultNamespace(), getEarliestRevTime(), getEditURL(), getEscapedText(), getFirstRevision(), getFragment(), getFragmentForURL(), getFullText(), getFullURL(), getIndexTitle(), getInternalURL(), getInterwiki(), getLatestRevID(), getLength(), getLinksTo(), getLinkURL(), getLocalURL(), getNamespace(), getNamespaceKey(), getNextRevisionID(), getNotificationTimestamp(), getNsText(), getParentCategories(), getParentCategoryTree(), getPartialURL(), getPrefixedDBkey(), getPrefixedText(), getPrefixedURL(), getPreviousRevisionID(), getRedirectsHere(), getRestrictionExpiry(), getRestrictions(), getRestrictionTypes(), getSkinFromCssJsSubpage(), getSquidURLs(), getSubjectNsText(), getSubjectPage(), getSubpages(), getSubpageText(), getSubpageUrlForm(), getTalkNsText(), getTalkPage(), getTemplateLinksTo(), getText(), getTouched(), getUserCaseDBKey(), getUserPermissionsErrors(), hasSubpages(), invalidateCache(), isAlwaysKnown(), isCascadeProtected(), isContentPage(), isConversionTable(), isCssJsSubpage(), isCssOrJsPage(), isCssSubpage(), isDeleted(), isDeletedQuick(), isExternal(), isJsSubpage(), isKnown(), isLocal(), isMovable(), isNamespaceProtected(), isNewPage(), isProtected(), isRedirect(), isSemiProtected(), isSingleRevRedirect(), isSpecial(), isSpecialPage(), isSubpage(), isTalkPage(), isTrans(), isValidMoveOperation(), isValidMoveTarget(), isValidRedirectTarget(), isWatchable(), loadRestrictions(), loadRestrictionsFromRows(), moveNoAuth(), moveOverExistingRedirect(), moveSubpages(), moveTo(), moveToNewTitle(), pageCond(), purgeSquid(), quickUserCan(), resetArticleID(), setFragment(), touchLinks(), updateTitleProtection(), userCan(), userCanEditCssJsSubpage(), userCanEditCssSubpage(), userCanEditJsSubpage(), userCanRead(), and userIsWatching().

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

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

See getLocalURL for the arguments.

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

Reimplemented from Title.

Definition at line 36 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

See getLocalURL for the arguments.

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

Reimplemented from Title.

Definition at line 35 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Check if page exists.

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

Returns:
Bool

Reimplemented from Title.

Definition at line 107 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Otherwise, return $this

Returns:
Title

Reimplemented from Title.

Definition at line 117 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::getArticleID ( flags = 0)

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

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

Reimplemented from Title.

Definition at line 74 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get a backlink cache object.

Returns:
BacklinkCache

Reimplemented from Title.

Definition at line 121 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get the base page name, i.e.

the leftmost part before any slashes

Returns:
String Base name

Reimplemented from Title.

Definition at line 28 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

Reimplemented from Title.

Definition at line 85 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

Reimplemented from Title.

Definition at line 66 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get the main part with underscores.

Returns:
String: Main part of the title, with underscores

Reimplemented from Title.

Definition at line 13 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Int Default namespace index

Reimplemented from Title.

Definition at line 23 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get the oldest revision timestamp of this page.

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

Reimplemented from Title.

Definition at line 104 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get the edit URL for this Title.

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

Reimplemented from Title.

Definition at line 38 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get the HTML-escaped displayable text form.

Used for the title field in tags.

Returns:
String the text, including any prefixes

Reimplemented from Title.

Definition at line 39 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::getFirstRevision ( flags = 0)

Get the first revision of the page.

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

Reimplemented from Title.

Definition at line 102 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
String Title fragment

Reimplemented from Title.

Definition at line 21 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
String Fragment in URL form

Reimplemented from Title.

Definition at line 22 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

Reimplemented from Title.

Definition at line 27 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::getFullURL ( query = '',
query2 = false 
)

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

See getLocalURL for the arguments.

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

Reimplemented from Title.

Definition at line 32 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get title for search index.

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

Reimplemented from Title.

Definition at line 24 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Get the URL form for an internal link.

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

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

See getLocalURL for the arguments.

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

Reimplemented from Title.

Definition at line 37 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get the interwiki prefix (or null string)

Returns:
String Interwiki prefix

Reimplemented from Title.

Definition at line 20 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::getLatestRevID ( flags = 0)

What is the page_latest field for this page?

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

Reimplemented from Title.

Definition at line 77 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::getLength ( flags = 0)

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

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

Reimplemented from Title.

Definition at line 76 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

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

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

Reimplemented from Title.

Definition at line 83 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::getLinkURL ( query = array(),
query2 = false 
)

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

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

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

See getLocalURL for the arguments.

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

Reimplemented from Title.

Definition at line 34 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Get a URL with no fragment or server name.

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

Parameters:
$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.
$query2Mixed: An optional secondary query array. This one MUST be an array. If a string is passed it will be interpreted as a deprecated variant argument and urlencoded into a variant= argument. This second query argument will be added to the $query The second parameter is deprecated since 1.19. Pass it as a key,value pair in the first parameter array instead.
Returns:
String the URL

Reimplemented from Title.

Definition at line 33 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get the namespace index, i.e.

one of the NS_xxxx constants.

Returns:
Integer: Namespace index

Reimplemented from Title.

Definition at line 14 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

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

Reimplemented from Title.

Definition at line 114 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::getNextRevisionID ( revId,
flags = 0 
)

Get the revision ID of the next revision.

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

Reimplemented from Title.

Definition at line 101 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Parameters:
$userUser
Returns:
String|Null

Reimplemented from Title.

Definition at line 113 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get the namespace text.

Returns:
String: Namespace text

Reimplemented from Title.

Definition at line 15 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

Reimplemented from Title.

Definition at line 97 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::getParentCategoryTree ( children = array())

Get a tree of parent categories.

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

Reimplemented from Title.

Definition at line 98 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get the URL-encoded form of the main part.

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

Reimplemented from Title.

Definition at line 12 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get the prefixed database key form.

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

Reimplemented from Title.

Definition at line 25 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get the prefixed title with spaces.

This is the form usually used for display

Returns:
String the prefixed title, with spaces

Reimplemented from Title.

Definition at line 26 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
String the URL-encoded form

Reimplemented from Title.

Definition at line 31 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::getPreviousRevisionID ( revId,
flags = 0 
)

Get the revision ID of the previous revision.

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

Reimplemented from Title.

Definition at line 100 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::getRedirectsHere ( ns = null)

Get all extant redirects to this Title.

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

Reimplemented from Title.

Definition at line 119 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

Reimplemented from Title.

Definition at line 71 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Accessor/initialisation for mRestrictions.

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

Reimplemented from Title.

Definition at line 70 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Returns restriction types for the current Title.

Returns:
array applicable restriction types

Reimplemented from Title.

Definition at line 123 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

Reimplemented from Title.

Definition at line 59 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Array of String the URLs

Reimplemented from Title.

Definition at line 86 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
String Namespace text

Reimplemented from Title.

Definition at line 17 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Title the object for the subject page

Reimplemented from Title.

Definition at line 82 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::getSubpages ( limit = -1)

Get all subpages of this page.

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

Reimplemented from Title.

Definition at line 56 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

the rightmost part after any slashes

Returns:
String Subpage name

Reimplemented from Title.

Definition at line 29 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get a URL-encoded form of the subpage text.

Returns:
String URL-encoded subpage name

Reimplemented from Title.

Definition at line 30 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Get the namespace text of the talk page.

Returns:
String Namespace text

Reimplemented from Title.

Definition at line 18 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Title the object for the talk page

Reimplemented from Title.

Definition at line 80 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::getTemplateLinksTo ( options = array())

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

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

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

Reimplemented from Title.

Definition at line 84 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
String Main part of the title

Reimplemented from Title.

Definition at line 11 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::getTouched ( db = null)

Get the last touched timestamp.

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

Reimplemented from Title.

Definition at line 112 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
String DB key

Reimplemented from Title.

Definition at line 16 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Can $user perform $action on this page?

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

Reimplemented from Title.

Definition at line 48 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Bool

Reimplemented from Title.

Definition at line 55 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Bool true if the update succeded

Reimplemented from Title.

Definition at line 79 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

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

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

Returns:
Bool

Reimplemented from Title.

Definition at line 108 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

Reimplemented from Title.

Definition at line 65 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Boolean

Reimplemented from Title.

Definition at line 118 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Is this a conversion table for the LanguageConverter?

Returns:
Bool

Reimplemented from Title.

Definition at line 43 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Bool

Reimplemented from Title.

Definition at line 57 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Bool

Reimplemented from Title.

Definition at line 58 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Is this a .css subpage of a user page?

Returns:
Bool

Reimplemented from Title.

Definition at line 60 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Int the number of archived revisions

Reimplemented from Title.

Definition at line 72 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Boolean

Reimplemented from Title.

Definition at line 73 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Is this Title interwiki?

Returns:
Bool

Reimplemented from Title.

Definition at line 40 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Is this a .js subpage of a user page?

Returns:
Bool

Reimplemented from Title.

Definition at line 61 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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).

Returns:
Bool

Reimplemented from Title.

Definition at line 109 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

Reimplemented from Title.

Definition at line 9 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Bool TRUE or FALSE

Reimplemented from Title.

Definition at line 51 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Parameters:
$userUser object to check permissions
Returns:
Bool

Reimplemented from Title.

Definition at line 46 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Check if this is a new page.

Returns:
bool

Reimplemented from Title.

Definition at line 103 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::isProtected ( action = '')

Does the title correspond to a protected article?

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

Reimplemented from Title.

Definition at line 42 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::isRedirect ( flags = 0)

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

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

Reimplemented from Title.

Definition at line 75 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::isSemiProtected ( action = 'edit')

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

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

Reimplemented from Title.

Definition at line 41 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

Returns:
Bool

Reimplemented from Title.

Definition at line 94 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::isSpecial ( name)

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

Parameters:
$nameString The special page name
Returns:
boolean

Reimplemented from Title.

Definition at line 116 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Returns true if this is a special page.

Returns:
boolean

Reimplemented from Title.

Definition at line 115 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Is this a subpage?

Returns:
Bool

Reimplemented from Title.

Definition at line 54 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Is this a talk page of some sort?

Returns:
Bool

Reimplemented from Title.

Definition at line 53 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Bool TRUE if this is transcludable

Reimplemented from Title.

Definition at line 10 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Check whether a given move operation would be valid.

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

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

Reimplemented from Title.

Definition at line 89 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

Reimplemented from Title.

Definition at line 95 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Check if this Title is a valid redirect target.

Returns:
Bool

Reimplemented from Title.

Definition at line 120 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Returns:
Bool TRUE or FALSE

Reimplemented from Title.

Definition at line 96 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::loadRestrictions ( oldFashionedRestrictions = null)

Load restrictions from the page_restrictions table.

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

Reimplemented from Title.

Definition at line 69 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::loadRestrictionsFromRows ( rows,
oldFashionedRestrictions = null 
)

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

Public for usage by LiquidThreads.

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

Reimplemented from Title.

Definition at line 68 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Move this page without authentication.

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

Reimplemented from Title.

Definition at line 88 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::moveOverExistingRedirect ( &$  nt,
reason = '',
createRedirect = true 
)

Definition at line 91 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

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

Reimplemented from Title.

Definition at line 93 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Move a title to a new location.

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

Reimplemented from Title.

Definition at line 90 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::moveToNewTitle ( &$  nt,
reason = '',
createRedirect = true 
)

Definition at line 92 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

Reimplemented from Title.

Definition at line 99 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Purge all applicable Squid URLs.

Reimplemented from Title.

Definition at line 87 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::quickUserCan ( action,
user = null 
)

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

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

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

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

Reimplemented from Title.

Definition at line 45 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Parameters:
$newidInt the new Article ID

Reimplemented from Title.

Definition at line 78 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::setFragment ( fragment)

Set the fragment for this title.

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

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

Parameters:
$fragmentString text

Reimplemented from Title.

Definition at line 81 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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 from Title.

Definition at line 111 of file FakeTitle.php.

References error().

Here is the call graph for this function:

FakeTitle::updateTitleProtection ( create_perm,
reason,
expiry 
)

Update the title protection status.

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

Reimplemented from Title.

Definition at line 49 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

Can $user perform $action on this page?

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

Reimplemented from Title.

Definition at line 47 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Definition at line 62 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

Reimplemented from Title.

Definition at line 63 of file FakeTitle.php.

References error().

Here is the call graph for this function:

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

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

Reimplemented from Title.

Definition at line 64 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Can $wgUser read this page?

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

Reimplemented from Title.

Definition at line 52 of file FakeTitle.php.

References error().

Here is the call graph for this function:

Is $wgUser watching this page?

Returns:
Bool

Reimplemented from Title.

Definition at line 44 of file FakeTitle.php.

References error().

Here is the call graph for this function:


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