r30608 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r30607‎ | r30608 | r30609 >
Date:08:49, 6 February 2008
Author:raymond
Status:old
Tags:
Comment:
* Prettify software section of [[Special:Version]] a bit
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/SpecialVersion.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)
  • /trunk/phase3/skins/modern/main.css (modified) (history)
  • /trunk/phase3/skins/monobook/main.css (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -2361,6 +2361,10 @@
23622362 'version-hook-name',
23632363 'version-hook-subscribedby',
23642364 'version-version',
 2365+ 'version-licence',
 2366+ 'version-software',
 2367+ 'version-software-product',
 2368+ 'version-software-version',
23652369 ),
23662370 'filepath' => array(
23672371 'filepath',
Index: trunk/phase3/skins/monobook/main.css
@@ -1463,17 +1463,17 @@
14641464
14651465 /** Special:Version */
14661466
1467 -table#sv-ext, table#sv-hooks {
 1467+table#sv-ext, table#sv-hooks, table#sv-software {
14681468 margin: 1em;
14691469 padding:0em;
14701470 }
14711471
1472 -#sv-ext td, #sv-hooks td,
1473 -#sv-ext th, #sv-hooks th {
 1472+#sv-ext td, #sv-hooks td, #sv-software td,
 1473+#sv-ext th, #sv-hooks th, #sv-software th {
14741474 border: 1px solid #A0A0A0;
14751475 padding: 0 0.15em 0 0.15em;
14761476 }
1477 -#sv-ext th, #sv-hooks th {
 1477+#sv-ext th, #sv-hooks th, #sv-software th {
14781478 background-color: #F0F0F0;
14791479 color: black;
14801480 padding: 0 0.15em 0 0.15em;
Index: trunk/phase3/skins/modern/main.css
@@ -939,17 +939,17 @@
940940
941941 /** Special:Version */
942942
943 -table#sv-ext, table#sv-hooks {
 943+table#sv-ext, table#sv-hooks, table#sv-software {
944944 margin: 1em;
945945 padding:0em;
946946 }
947947
948 -#sv-ext td, #sv-hooks td,
949 -#sv-ext th, #sv-hooks th {
 948+#sv-ext td, #sv-hooks td, #sv-software td,
 949+#sv-ext th, #sv-hooks th, #sv-software th {
950950 border: 1px solid #A0A0A0;
951951 padding: 0 0.15em 0 0.15em;
952952 }
953 -#sv-ext th, #sv-hooks th {
 953+#sv-ext th, #sv-hooks th, #sv-software th {
954954 background-color: #F0F0F0;
955955 color: black;
956956 padding: 0 0.15em 0 0.15em;
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1320,7 +1320,7 @@
13211321 * to ensure that client-side caches don't keep obsolete copies of global
13221322 * styles.
13231323 */
1324 -$wgStyleVersion = '110';
 1324+$wgStyleVersion = '111';
13251325
13261326
13271327 # Server-side caching:
Index: trunk/phase3/includes/SpecialVersion.php
@@ -30,6 +30,7 @@
3131 $wgOut->addHTML( '<div dir="ltr">' );
3232 $wgOut->addWikiText(
3333 $this->MediaWikiCredits() .
 34+ $this->softwareInformation() .
3435 $this->extensionCredits() .
3536 $this->wgHooks()
3637 );
@@ -42,15 +43,10 @@
4344 */
4445
4546 /**
46 - * Return wiki text showing the licence information and third party
47 - * software versions (apache, php, mysql).
48 - * @static
 47+ * @return wiki text showing the licence information
4948 */
50 - function MediaWikiCredits() {
51 - $version = self::getVersion();
52 - $dbr = wfGetDB( DB_SLAVE );
53 -
54 - $ret =
 49+ static function MediaWikiCredits() {
 50+ $ret = Xml::element( 'h2', array( 'id' => 'mw-version-licence' ), wfMsg( 'version-licence' ) ) .
5551 "__NOTOC__
5652 This wiki is powered by '''[http://www.mediawiki.org/ MediaWiki]''',
5753 copyright (C) 2001-2008 Magnus Manske, Brion Vibber, Lee Daniel Crocker,
@@ -69,16 +65,40 @@
7066
7167 You should have received [{{SERVER}}{{SCRIPTPATH}}/COPYING a copy of the GNU General Public License]
7268 along with this program; if not, write to the Free Software
73 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
74 - or [http://www.gnu.org/copyleft/gpl.html read it online]
 69+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 70+ or [http://www.gnu.org/copyleft/gpl.html read it online].
 71+ ";
7572
76 - * [http://www.mediawiki.org/ MediaWiki]: $version
77 - * [http://www.php.net/ PHP]: " . phpversion() . " (" . php_sapi_name() . ")
78 - * " . $dbr->getSoftwareLink() . ": " . $dbr->getServerVersion();
79 -
8073 return str_replace( "\t\t", '', $ret ) . "\n";
8174 }
8275
 76+ /**
 77+ * @return wiki text showing the third party software versions (apache, php, mysql).
 78+ */
 79+ static function softwareInformation() {
 80+ $dbr = wfGetDB( DB_SLAVE );
 81+
 82+ return Xml::element( 'h2', array( 'id' => 'mw-version-software' ), wfMsg( 'version-software' ) ) .
 83+ Xml::openElement( 'table', array( 'id' => 'sv-software' ) ) .
 84+ "<tr>
 85+ <th>" . wfMsg( 'version-software-product' ) . "</th>
 86+ <th>" . wfMsg( 'version-software-version' ) . "</th>
 87+ </tr>\n
 88+ <tr>
 89+ <td>[http://www.mediawiki.org/ MediaWiki]</td>
 90+ <td>" . self::getVersion() . "</td>
 91+ </tr>\n
 92+ <tr>
 93+ <td>[http://www.php.net/ PHP]</td>
 94+ <td>" . phpversion() . " (" . php_sapi_name() . ")</td>
 95+ </tr>\n
 96+ <tr>
 97+ <td>" . $dbr->getSoftwareLink() . "</td>
 98+ <td>" . $dbr->getServerVersion() . "</td>
 99+ </tr>\n" .
 100+ Xml::closeElement( 'table' );
 101+ }
 102+
83103 /** Return a string of the MediaWiki version with SVN revision if available */
84104 public static function getVersion() {
85105 global $wgVersion, $IP;
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -3049,6 +3049,10 @@
30503050 'version-hook-name' => 'Hook name',
30513051 'version-hook-subscribedby' => 'Subscribed by',
30523052 'version-version' => 'Version',
 3053+'version-licence' => 'Licence',
 3054+'version-software' => 'Installed software',
 3055+'version-software-product' => 'Product',
 3056+'version-software-version' => 'Version',
30533057
30543058 # Special:Filepath
30553059 'filepath' => 'File path',

Follow-up revisions

RevisionCommit summaryAuthorDate
r30610Fix my british english slang from r30608: Licence -> License :) Thanks to Ialex.raymond10:35, 6 February 2008

Status & tagging log