r78890 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78889‎ | r78890 | r78891 >
Date:15:25, 23 December 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Fixed bc issue and small bug
Modified paths:
  • /trunk/extensions/LiveTranslate/LiveTranslate.hooks.php (modified) (history)
  • /trunk/extensions/LiveTranslate/LiveTranslate.php (modified) (history)
  • /trunk/extensions/LiveTranslate/RELEASE-NOTES (modified) (history)

Diff [purge]

Index: trunk/extensions/LiveTranslate/LiveTranslate.php
@@ -25,7 +25,7 @@
2626 die( 'Not an entry point.' );
2727 }
2828
29 -define( 'LiveTranslate_VERSION', '0.1' );
 29+define( 'LiveTranslate_VERSION', '0.2 alpha' );
3030
3131 $wgExtensionCredits['other'][] = array(
3232 'path' => __FILE__,
Index: trunk/extensions/LiveTranslate/LiveTranslate.hooks.php
@@ -74,7 +74,7 @@
7575 $outputDone = true;
7676 }
7777 else if ( $article->exists()
78 - && ( count( $egLiveTranslateLanguages ) > 1 ) || count( $egLiveTranslateLanguages ) == 1 && $egLiveTranslateLanguages[0] != $currentLang ) {
 78+ && ( count( $egLiveTranslateLanguages ) > 1 || ( count( $egLiveTranslateLanguages ) == 1 && $egLiveTranslateLanguages[0] != $currentLang ) ) ) {
7979 $wgOut->addHTML(
8080 '<span class="notranslate" id="livetranslatespan">' .
8181 Html::rawElement(
@@ -127,17 +127,26 @@
128128 *
129129 * @return true
130130 */
131 - public static function onSchemaUpdate( DatabaseUpdater $updater ) {
 131+ public static function onSchemaUpdate( /* DatabaseUpdater */ $updater = null ) {
132132 global $wgDBtype, $egLiveTranslateIP;
133133
134134 if ( $wgDBtype == 'mysql' ) {
135135 // Set up the current schema.
136 - $updater->addExtensionUpdate( array(
137 - 'addTable',
138 - 'livetranslate',
139 - $egLiveTranslateIP . '/LiveTranslate.sql',
140 - true
141 - ) );
 136+ if ( $updater === null ) {
 137+ global $wgExtNewTables;
 138+ $wgExtNewTables[] = array(
 139+ 'livetranslate',
 140+ $egLiveTranslateIP . '/LiveTranslate.sql'
 141+ );
 142+ }
 143+ else {
 144+ $updater->addExtensionUpdate( array(
 145+ 'addTable',
 146+ 'livetranslate',
 147+ $egLiveTranslateIP . '/LiveTranslate.sql',
 148+ true
 149+ ) );
 150+ }
142151 }
143152
144153 return true;
Index: trunk/extensions/LiveTranslate/RELEASE-NOTES
@@ -4,6 +4,12 @@
55 Latest version of the release notes: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/LiveTranslate/RELEASE-NOTES?view=co
66
77
 8+=== Version 0.2 ===
 9+201x-xx-xx
 10+
 11+* Fixed installation compatibility issue with MW 1.16.
 12+* Fixed display of translation control to only happen on existing pages.
 13+
814 === Version 0.1 ===
915 2010-12-22
1016

Status & tagging log