[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/specials/ -> SpecialVersion.php (summary)

Implements Special:Version Copyright © 2005 Ævar Arnfjörð Bjarmason

File Size: 1237 lines (36 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

SpecialVersion:: (33 methods):
  __construct()
  execute()
  getMediaWikiCredits()
  getCopyrightAndAuthorList()
  softwareInformation()
  getVersion()
  getVersionLinked()
  getVersionLinkedSvn()
  getwgVersionLinked()
  getVersionLinkedGit()
  getExtensionTypes()
  getExtensionTypeName()
  getExtensionCredits()
  getSkinCredits()
  getParserTags()
  getParserFunctionHooks()
  getExtensionCategory()
  compare()
  getCreditsForExtension()
  getWgHooks()
  openExtType()
  IPInfo()
  listAuthors()
  getExtAuthorsFileName()
  getExtLicenseFileName()
  listToText()
  arrayToString()
  getSvnInfo()
  getSvnRevision()
  getGitHeadSha1()
  getGitCurrentBranch()
  getEntryPointInfo()
  getGroupName()


Class: SpecialVersion  - X-Ref

Give information about the version of MediaWiki, PHP, the DB and extensions

__construct()   X-Ref
No description

execute( $par )   X-Ref
main()

param: string|null $par

getMediaWikiCredits()   X-Ref
Returns wiki text showing the license information.

return: string

getCopyrightAndAuthorList()   X-Ref
Get the "MediaWiki is copyright 2001-20xx by lots of cool guys" text

return: string

softwareInformation()   X-Ref
Returns wiki text showing the third party software versions (apache, php, mysql).

return: string

getVersion( $flags = '' )   X-Ref
Return a string of the MediaWiki version with SVN revision if available.

param: string $flags
return: mixed

getVersionLinked()   X-Ref
Return a wikitext-formatted string of the MediaWiki version with a link to
the SVN revision or the git SHA1 of head if available.
Git is prefered over Svn
The fallback is just $wgVersion

return: mixed

getVersionLinkedSvn()   X-Ref

return: string Global wgVersion + a link to subversion revision of svn BASE

getwgVersionLinked()   X-Ref

return: string

getVersionLinkedGit()   X-Ref

return: bool|string Global wgVersion + HEAD sha1 stripped to the first 7 chars

getExtensionTypes()   X-Ref
Returns an array with the base extension types.
Type is stored as array key, the message as array value.

TODO: ideally this would return all extension types.

return: array

getExtensionTypeName( $type )   X-Ref
Returns the internationalized name for an extension type.

param: string $type
return: string

getExtensionCredits()   X-Ref
Generate wikitext showing the name, URL, author and description of each extension.

return: string Wikitext

getSkinCredits()   X-Ref
Generate wikitext showing the name, URL, author and description of each skin.

return: string Wikitext

getParserTags()   X-Ref
Obtains a list of installed parser tags and the associated H2 header

return: string HTML output

getParserFunctionHooks()   X-Ref
Obtains a list of installed parser function hooks and the associated H2 header

return: string HTML output

getExtensionCategory( $type, $message )   X-Ref
Creates and returns the HTML for a single extension category.

param: string $type
param: string $message
return: string

compare( $a, $b )   X-Ref
Callback to sort extensions by type.

param: array $a
param: array $b
return: int

getCreditsForExtension( array $extension )   X-Ref
Creates and formats a version line for a single extension.

Information for five columns will be created. Parameters required in the
$extension array for part rendering are indicated in ()
- The name of (name), and URL link to (url), the extension
- Official version number (version) and if available version control system
revision (path), link, and date
- If available the short name of the license (license-name) and a linke
to ((LICENSE)|(COPYING))(\.txt)? if it exists.
- Description of extension (descriptionmsg or description)
- List of authors (author) and link to a ((AUTHORS)|(CREDITS))(\.txt)? file if it exists

param: array $extension
return: string Raw HTML

getWgHooks()   X-Ref
Generate wikitext showing hooks in $wgHooks.

return: string Wikitext

openExtType( $text = null, $name = null )   X-Ref
No description

IPInfo()   X-Ref
Get information about client's IP address.

return: string HTML fragment

listAuthors( $authors, $extName, $extDir )   X-Ref
Return a formatted unsorted list of authors

'And Others'
If an item in the $authors array is '...' it is assumed to indicate an
'and others' string which will then be linked to an ((AUTHORS)|(CREDITS))(\.txt)?
file if it exists in $dir.

Similarly an entry ending with ' ...]' is assumed to be a link to an
'and others' page.

If no '...' string variant is found, but an authors file is found an
'and others' will be added to the end of the credits.

param: string|array $authors
param: string $extName Name of the extension for link creation
param: string $extDir Path to the extension root directory
return: string HTML fragment

getExtAuthorsFileName( $extDir )   X-Ref
Obtains the full path of an extensions authors or credits file if
one exists.

param: string $extDir Path to the extensions root directory
return: bool|string False if no such file exists, otherwise returns

getExtLicenseFileName( $extDir )   X-Ref
Obtains the full path of an extensions copying or license file if
one exists.

param: string $extDir Path to the extensions root directory
return: bool|string False if no such file exists, otherwise returns

listToText( $list, $sort = true )   X-Ref
Convert an array of items into a list for display.

param: array $list List of elements to display
param: bool $sort Whether to sort the items in $list
return: string

arrayToString( $list )   X-Ref
Convert an array or object to a string for display.

param: mixed $list Will convert an array to string if given and return
return: mixed

getSvnInfo( $dir )   X-Ref
Get an associative array of information about a given path, from its .svn
subdirectory. Returns false on error, such as if the directory was not
checked out with subversion.

Returned keys are:
Required:
checkout-rev          The revision which was checked out
Optional:
directory-rev         The revision when the directory was last modified
url                   The subversion URL of the directory
repo-url              The base URL of the repository
viewvc-url            A ViewVC URL pointing to the checked-out revision
param: string $dir
return: array|bool

getSvnRevision( $dir )   X-Ref
Retrieve the revision number of a Subversion working directory.

param: string $dir Directory of the svn checkout
return: int Revision number

getGitHeadSha1( $dir )   X-Ref

param: string $dir Directory of the git checkout
return: bool|string Sha1 of commit HEAD points to

getGitCurrentBranch( $dir )   X-Ref

param: string $dir Directory of the git checkout
return: bool|string Branch currently checked out

getEntryPointInfo()   X-Ref
Get the list of entry points and their URLs

return: string Wikitext

getGroupName()   X-Ref
No description



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1