r71150 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71149‎ | r71150 | r71151 >
Date:21:19, 15 August 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Work on Special:Update
Modified paths:
  • /trunk/extensions/Deployment/Deployment.i18n.php (modified) (history)
  • /trunk/extensions/Deployment/specials/SpecialUpdate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Deployment/specials/SpecialUpdate.php
@@ -90,7 +90,7 @@
9191 protected function showCoreStatus( $status ) {
9292 global $wgOut, $wgVersion;
9393
94 - if ( $status !== false ) {
 94+ if ( $status === false ) {
9595 $wgOut->addHTML( '<h3>' . wfMsg( 'mediawiki-up-to-date' ) . '</h3>' );
9696 $wgOut->addWikiMsg( 'mediawiki-up-to-date-long' );
9797 }
@@ -110,9 +110,36 @@
111111 * @param $extensions Array: the extensions that have updates and their version numbers.
112112 */
113113 protected function showExtensionStatuses( array $extensions ) {
 114+ global $wgOut;
 115+
 116+ $wgOut->addHTML( '<h3>' . wfMsg( 'special-update-extensions' ) . '</h3>' );
 117+
 118+ if ( count( $extensions ) > 0 ) {
 119+ $wgOut->addWikiMsg( 'extensions-updates-available' );
 120+
 121+ // TODO
 122+
 123+ foreach ( $extensions as $extension ) {
 124+ $this->displayExtensionStatus( $extension );
 125+ }
 126+
 127+ // TODO
 128+ }
 129+ else {
 130+ $wgOut->addWikiMsg( 'extensions-up-to-date' );
 131+ }
 132+ }
 133+
 134+ /**
 135+ * Displays a single row in the update list.
 136+ *
 137+ * @since 0.1
 138+ *
 139+ * @param $extension Array
 140+ */
 141+ protected function displayExtensionStatus( $extension ) {
114142 global $wgOut, $wgExtensionCredits;
115143
116 - //$wgOut->addHTML( var_dump($extensions) );
117144 // TODO
118145 }
119146
Index: trunk/extensions/Deployment/Deployment.i18n.php
@@ -65,12 +65,15 @@
6666
6767 // Special:Update
6868 'mediawiki-up-to-date' => 'You have the latest version of MediaWiki installed.',
69 - 'mediawiki-up-to-date-long' => 'You have the latest version of MediaWiki [[[Special:Version|installed]].
 69+ 'mediawiki-up-to-date-long' => 'You have the latest version of MediaWiki [[Special:Version|installed]].
7070 You do not need to update.',
7171 'mediawiki-update-available' => 'A new version of MediaWiki is available!',
7272 'mediawiki-update-available-long' => 'MediaWiki version $1 is available.
7373 [$2 Update now] to keep your wiki secure and get the new features in this release.',
74 - 'extensions-up-to-date' => 'Your extensions are all up to date.',
 74+ 'extensions-up-to-date' => '[[Special:Extensions|Your extensions]] are all up to date.',
 75+ 'extensions-updates-available' => 'The following extensions have new versions available.
 76+Check the ones you want to update and then click “Update Extensions”.',
 77+ 'special-update-extensions' => 'Extensions',
7578
7679 // Special:Install
7780 'extensions-description' => 'Extensions extend and expand the functionality of MediaWiki.

Status & tagging log