* Prettify software section of [[Special:Version]] a bit
authorRaimond Spekking <raymond@users.mediawiki.org>
Wed, 6 Feb 2008 08:49:03 +0000 (08:49 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Wed, 6 Feb 2008 08:49:03 +0000 (08:49 +0000)
includes/DefaultSettings.php
includes/SpecialVersion.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc
skins/modern/main.css
skins/monobook/main.css

index d9c7c26..13fb3d6 100644 (file)
@@ -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:
index f240fb8..4c09222 100644 (file)
@@ -30,6 +30,7 @@ class SpecialVersion {
                $wgOut->addHTML( '<div dir="ltr">' );
                $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' ) ) .
+                               "<tr>
+                                       <th>" . wfMsg( 'version-software-product' ) . "</th>
+                                       <th>" . wfMsg( 'version-software-version' ) . "</th>
+                               </tr>\n
+                               <tr>
+                                       <td>[http://www.mediawiki.org/ MediaWiki]</td>
+                                       <td>" . self::getVersion() . "</td>
+                               </tr>\n
+                               <tr>
+                                       <td>[http://www.php.net/ PHP]</td>
+                                       <td>" . phpversion() . " (" . php_sapi_name() . ")</td>
+                               </tr>\n
+                               <tr>
+                                       <td>" . $dbr->getSoftwareLink() . "</td>
+                                       <td>" . $dbr->getServerVersion() . "</td>
+                               </tr>\n" .
+                       Xml::closeElement( 'table' );
+       }
+
        /** Return a string of the MediaWiki version with SVN revision if available */
        public static function getVersion() {
                global $wgVersion, $IP;
index 06f3c86..29df058 100644 (file)
@@ -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',
index 2170a5b..04a5fd1 100644 (file)
@@ -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',
index d1bb561..de9eb04 100644 (file)
@@ -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;
index fcdd150..556f1d7 100644 (file)
@@ -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;