SpecialVersion Class Reference
[SpecialPage]

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

Inherits SpecialPage.

List of all members.

Public Member Functions

 __construct ()
 execute ($par)
 main()
 extensionCredits ()
 Generate wikitext showing extensions name, URL, author and description.
 compare ($a, $b)
 Callback to sort extensions by type.
 formatCredits ($extension)
 wgHooks ()
 IPInfo ()
 listToText ($list, $sort=true)

Static Public Member Functions

static MediaWikiCredits ()
 #@+
static softwareInformation ()
static getVersion ($flags= '')
 Return a string of the MediaWiki version with SVN revision if available.
static getVersionLinked ()
 Return a wikitext-formatted string of the MediaWiki version with a link to the SVN revision if available.
static arrayToString ($list)
static getSvnInfo ($dir)
 Get an associative array of information about a given path, from its .svn subdirectory.
static getSvnRevision ($dir)
 Retrieve the revision number of a Subversion working directory.

Static Public Attributes

static $viewvcUrls

Private Member Functions

 openExtType ($text, $name=null)

Private Attributes

 $firstExtOpened = true


Detailed Description

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

Author:
Ævar Arnfjörð Bjarmason <avarab@gmail.com> Copyright © 2005, Ævar Arnfjörð Bjarmason http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later

Definition at line 12 of file SpecialVersion.php.


Constructor & Destructor Documentation

SpecialVersion::__construct (  ) 

Definition at line 22 of file SpecialVersion.php.


Member Function Documentation

static SpecialVersion::arrayToString ( list  )  [static]

Parameters:
mixed $list Will convert an array to string if given and return the paramater unaltered otherwise
Returns:
mixed

Definition at line 398 of file SpecialVersion.php.

Referenced by listToText().

SpecialVersion::compare ( a,
b 
)

Callback to sort extensions by type.

Definition at line 237 of file SpecialVersion.php.

References $wgLang.

SpecialVersion::execute ( par  ) 

SpecialVersion::extensionCredits (  ) 

Generate wikitext showing extensions name, URL, author and description.

Definition at line 181 of file SpecialVersion.php.

References $i, $out, $wgExtensionCredits, $wgExtensionFunctions, $wgParser, $wgSkinExtensionFunctions, Xml::closeElement(), Xml::element(), formatCredits(), listToText(), Xml::openElement(), openExtType(), wfMsg(), and wfRunHooks().

Referenced by execute().

SpecialVersion::formatCredits ( extension  ) 

Definition at line 248 of file SpecialVersion.php.

References $msg, $name, getSvnInfo(), listToText(), wfEmptyMsg(), and wfMsg().

Referenced by extensionCredits().

static SpecialVersion::getSvnInfo ( dir  )  [static]

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

Definition at line 429 of file SpecialVersion.php.

References SpecialPage::file(), wfRestoreWarnings(), and wfSuppressWarnings().

Referenced by formatCredits(), getSvnRevision(), getVersion(), and getVersionLinked().

static SpecialVersion::getSvnRevision ( dir  )  [static]

Retrieve the revision number of a Subversion working directory.

Parameters:
String $dir Directory of the svn checkout
Returns:
int revision number as int

Definition at line 498 of file SpecialVersion.php.

References getSvnInfo().

static SpecialVersion::getVersion ( flags = ''  )  [static]

Return a string of the MediaWiki version with SVN revision if available.

Returns:
mixed

Definition at line 130 of file SpecialVersion.php.

References $IP, $version, $wgVersion, getSvnInfo(), wfMsg(), wfProfileIn(), and wfProfileOut().

Referenced by Parser::getVariableValue(), wikiStatsOutput::heading(), ApiMain::makeHelpMsg(), and DbTestRecorder::start().

static SpecialVersion::getVersionLinked (  )  [static]

Return a wikitext-formatted string of the MediaWiki version with a link to the SVN revision if available.

Returns:
mixed

Definition at line 158 of file SpecialVersion.php.

References $IP, $version, $wgVersion, getSvnInfo(), wfMsg(), wfProfileIn(), and wfProfileOut().

Referenced by softwareInformation().

SpecialVersion::IPInfo (  ) 

Returns:
string

Definition at line 365 of file SpecialVersion.php.

References wfGetIP().

Referenced by execute().

SpecialVersion::listToText ( list,
sort = true 
)

Parameters:
array $list
bool $sort
Returns:
string

Definition at line 376 of file SpecialVersion.php.

References $wgLang, and arrayToString().

Referenced by extensionCredits(), formatCredits(), and wgHooks().

static SpecialVersion::MediaWikiCredits (  )  [static]

#@+

Access:
private
Returns:
wiki text showing the license information

Definition at line 58 of file SpecialVersion.php.

References $wgContLang, Xml::element(), and wfMsg().

Referenced by execute().

SpecialVersion::openExtType ( text,
name = null 
) [private]

Definition at line 345 of file SpecialVersion.php.

References $name, $out, and Xml::element().

Referenced by extensionCredits().

static SpecialVersion::softwareInformation (  )  [static]

Returns:
wiki text showing the third party software versions (apache, php, mysql).

Definition at line 96 of file SpecialVersion.php.

References $dbr, $name, $out, $version, Xml::closeElement(), Xml::element(), getVersionLinked(), Xml::openElement(), wfGetDB(), wfMsg(), and wfRunHooks().

Referenced by execute().

SpecialVersion::wgHooks (  ) 

Returns:
string

Definition at line 319 of file SpecialVersion.php.

References $wgHooks, Xml::closeElement(), Xml::element(), listToText(), Xml::openElement(), and wfMsg().

Referenced by execute().


Member Data Documentation

SpecialVersion::$firstExtOpened = true [private]

Definition at line 13 of file SpecialVersion.php.

SpecialVersion::$viewvcUrls [static]

Initial value:

 array(
                'svn+ssh://svn.wikimedia.org/svnroot/mediawiki' => 'http://svn.wikimedia.org/viewvc/mediawiki',
                'http://svn.wikimedia.org/svnroot/mediawiki' => 'http://svn.wikimedia.org/viewvc/mediawiki',
                # Doesn't work at the time of writing but maybe some day: 
                'https:
        )

Definition at line 15 of file SpecialVersion.php.


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

Generated on Sat Apr 30 22:57:50 2011 for MediaWiki by  doxygen 1.5.9