Index: trunk/extensions/Deployment/specials/SpecialUpdate.php |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | $this->showCoreStatus( false ); |
73 | 73 | } |
74 | 74 | |
75 | | - $this->showExtensionStatuses( count( $updates ) > 0 ? $updates : false ); |
| 75 | + $this->showExtensionStatuses($updates ); |
76 | 76 | } |
77 | 77 | |
78 | 78 | } else { |
— | — | @@ -85,12 +85,20 @@ |
86 | 86 | * |
87 | 87 | * @since 0.1 |
88 | 88 | * |
89 | | - * @param $status |
| 89 | + * @param $status Mixed: false when there are no updates or a version number (string) when there is. |
90 | 90 | */ |
91 | 91 | protected function showCoreStatus( $status ) { |
92 | | - global $wgVersion; |
| 92 | + global $wgOut, $wgVersion; |
93 | 93 | |
94 | | - |
| 94 | + if ( $status !== false ) { |
| 95 | + $wgOut->addHTML( '<h3>' . wfMsg( 'mediawiki-up-to-date' ) . '</h3>' ); |
| 96 | + $wgOut->addWikiMsg( 'mediawiki-up-to-date-long' ); |
| 97 | + } |
| 98 | + else { |
| 99 | + $wgOut->addHTML( '<h3>' . wfMsg( 'mediawiki-update-available' ) . '</h3>' ); |
| 100 | + // TODO: link |
| 101 | + $wgOut->addWikiMsgArray( 'mediawiki-update-available-long', array( $status, '' ) ); |
| 102 | + } |
95 | 103 | } |
96 | 104 | |
97 | 105 | /** |
— | — | @@ -99,12 +107,12 @@ |
100 | 108 | * |
101 | 109 | * @since 0.1 |
102 | 110 | * |
103 | | - * @param $status |
| 111 | + * @param $extensions Array: the extensions that have updates and their version numbers. |
104 | 112 | */ |
105 | | - protected function showExtensionStatuses() { |
106 | | - global $wgExtensionCredits; |
| 113 | + protected function showExtensionStatuses( array $extensions ) { |
| 114 | + global $wgOut, $wgExtensionCredits; |
107 | 115 | |
108 | | - |
| 116 | + //$wgOut->addHTML( var_dump($extensions) ); |
109 | 117 | // TODO |
110 | 118 | } |
111 | 119 | |
Index: trunk/extensions/Deployment/Deployment.i18n.php |
— | — | @@ -62,7 +62,9 @@ |
63 | 63 | |
64 | 64 | // Special:Update |
65 | 65 | 'mediawiki-up-to-date' => 'You have the latest version of MediaWiki.', |
66 | | - 'mediawiki-up-to-date-long' => 'You have the latest version of MediaWiki. You do not need to upgrade.', |
| 66 | + 'mediawiki-up-to-date-long' => 'You have the latest version of MediaWiki ([[Special:Version|view version]]). You do not need to upgrade.', |
| 67 | + 'mediawiki-update-available' => 'A new version of MediaWiki is available!', |
| 68 | + 'mediawiki-update-available-long' => 'MediaWiki version $1 is available. [$2 Upgrade now] to keep your wiki secure and get the new awesome features in this release.', |
67 | 69 | 'extensions-up-to-date' => 'Your extensions are all up to date.', |
68 | 70 | |
69 | 71 | // Special:Install |