From 6a62c7fc45a4cb42ac3857cb008bd16edbc289c9 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Wed, 6 Feb 2008 08:49:03 +0000 Subject: [PATCH] * Prettify software section of [[Special:Version]] a bit --- includes/DefaultSettings.php | 2 +- includes/SpecialVersion.php | 48 ++++++++++++++++++++++--------- languages/messages/MessagesEn.php | 4 +++ maintenance/language/messages.inc | 4 +++ skins/modern/main.css | 8 +++--- skins/monobook/main.css | 8 +++--- 6 files changed, 51 insertions(+), 23 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index d9c7c26579..13fb3d664f 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1320,7 +1320,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches don't keep obsolete copies of global * styles. */ -$wgStyleVersion = '110'; +$wgStyleVersion = '111'; # Server-side caching: diff --git a/includes/SpecialVersion.php b/includes/SpecialVersion.php index f240fb8ef6..4c092220db 100644 --- a/includes/SpecialVersion.php +++ b/includes/SpecialVersion.php @@ -30,6 +30,7 @@ class SpecialVersion { $wgOut->addHTML( '
' ); $wgOut->addWikiText( $this->MediaWikiCredits() . + $this->softwareInformation() . $this->extensionCredits() . $this->wgHooks() ); @@ -42,15 +43,10 @@ class SpecialVersion { */ /** - * Return wiki text showing the licence information and third party - * software versions (apache, php, mysql). - * @static + * @return wiki text showing the licence information */ - function MediaWikiCredits() { - $version = self::getVersion(); - $dbr = wfGetDB( DB_SLAVE ); - - $ret = + static function MediaWikiCredits() { + $ret = Xml::element( 'h2', array( 'id' => 'mw-version-licence' ), wfMsg( 'version-licence' ) ) . "__NOTOC__ This wiki is powered by '''[http://www.mediawiki.org/ MediaWiki]''', copyright (C) 2001-2008 Magnus Manske, Brion Vibber, Lee Daniel Crocker, @@ -69,16 +65,40 @@ class SpecialVersion { You should have received [{{SERVER}}{{SCRIPTPATH}}/COPYING a copy of the GNU General Public License] along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - or [http://www.gnu.org/copyleft/gpl.html read it online] - - * [http://www.mediawiki.org/ MediaWiki]: $version - * [http://www.php.net/ PHP]: " . phpversion() . " (" . php_sapi_name() . ") - * " . $dbr->getSoftwareLink() . ": " . $dbr->getServerVersion(); + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + or [http://www.gnu.org/copyleft/gpl.html read it online]. + "; return str_replace( "\t\t", '', $ret ) . "\n"; } + /** + * @return wiki text showing the third party software versions (apache, php, mysql). + */ + static function softwareInformation() { + $dbr = wfGetDB( DB_SLAVE ); + + return Xml::element( 'h2', array( 'id' => 'mw-version-software' ), wfMsg( 'version-software' ) ) . + Xml::openElement( 'table', array( 'id' => 'sv-software' ) ) . + " + " . wfMsg( 'version-software-product' ) . " + " . wfMsg( 'version-software-version' ) . " + \n + + [http://www.mediawiki.org/ MediaWiki] + " . self::getVersion() . " + \n + + [http://www.php.net/ PHP] + " . phpversion() . " (" . php_sapi_name() . ") + \n + + " . $dbr->getSoftwareLink() . " + " . $dbr->getServerVersion() . " + \n" . + Xml::closeElement( 'table' ); + } + /** Return a string of the MediaWiki version with SVN revision if available */ public static function getVersion() { global $wgVersion, $IP; diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 06f3c86c9b..29df058b8f 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -3049,6 +3049,10 @@ You can also [[Special:Watchlist/edit|use the standard editor]].', 'version-hook-name' => 'Hook name', 'version-hook-subscribedby' => 'Subscribed by', 'version-version' => 'Version', +'version-licence' => 'Licence', +'version-software' => 'Installed software', +'version-software-product' => 'Product', +'version-software-version' => 'Version', # Special:Filepath 'filepath' => 'File path', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 2170a5bde4..04a5fd1406 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -2361,6 +2361,10 @@ $wgMessageStructure = array( 'version-hook-name', 'version-hook-subscribedby', 'version-version', + 'version-licence', + 'version-software', + 'version-software-product', + 'version-software-version', ), 'filepath' => array( 'filepath', diff --git a/skins/modern/main.css b/skins/modern/main.css index d1bb561a0f..de9eb04f19 100644 --- a/skins/modern/main.css +++ b/skins/modern/main.css @@ -939,17 +939,17 @@ table.multipageimage td { /** Special:Version */ -table#sv-ext, table#sv-hooks { +table#sv-ext, table#sv-hooks, table#sv-software { margin: 1em; padding:0em; } -#sv-ext td, #sv-hooks td, -#sv-ext th, #sv-hooks th { +#sv-ext td, #sv-hooks td, #sv-software td, +#sv-ext th, #sv-hooks th, #sv-software th { border: 1px solid #A0A0A0; padding: 0 0.15em 0 0.15em; } -#sv-ext th, #sv-hooks th { +#sv-ext th, #sv-hooks th, #sv-software th { background-color: #F0F0F0; color: black; padding: 0 0.15em 0 0.15em; diff --git a/skins/monobook/main.css b/skins/monobook/main.css index fcdd1503fc..556f1d74a1 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -1463,17 +1463,17 @@ table.multipageimage td { /** Special:Version */ -table#sv-ext, table#sv-hooks { +table#sv-ext, table#sv-hooks, table#sv-software { margin: 1em; padding:0em; } -#sv-ext td, #sv-hooks td, -#sv-ext th, #sv-hooks th { +#sv-ext td, #sv-hooks td, #sv-software td, +#sv-ext th, #sv-hooks th, #sv-software th { border: 1px solid #A0A0A0; padding: 0 0.15em 0 0.15em; } -#sv-ext th, #sv-hooks th { +#sv-ext th, #sv-hooks th, #sv-software th { background-color: #F0F0F0; color: black; padding: 0 0.15em 0 0.15em; -- 2.20.1