Index: trunk/extensions/LiveTranslate/LiveTranslate.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | die( 'Not an entry point.' ); |
27 | 27 | } |
28 | 28 | |
29 | | -define( 'LiveTranslate_VERSION', '0.1' ); |
| 29 | +define( 'LiveTranslate_VERSION', '0.2 alpha' ); |
30 | 30 | |
31 | 31 | $wgExtensionCredits['other'][] = array( |
32 | 32 | 'path' => __FILE__, |
Index: trunk/extensions/LiveTranslate/LiveTranslate.hooks.php |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | $outputDone = true; |
76 | 76 | } |
77 | 77 | else if ( $article->exists() |
78 | | - && ( count( $egLiveTranslateLanguages ) > 1 ) || count( $egLiveTranslateLanguages ) == 1 && $egLiveTranslateLanguages[0] != $currentLang ) { |
| 78 | + && ( count( $egLiveTranslateLanguages ) > 1 || ( count( $egLiveTranslateLanguages ) == 1 && $egLiveTranslateLanguages[0] != $currentLang ) ) ) { |
79 | 79 | $wgOut->addHTML( |
80 | 80 | '<span class="notranslate" id="livetranslatespan">' . |
81 | 81 | Html::rawElement( |
— | — | @@ -127,17 +127,26 @@ |
128 | 128 | * |
129 | 129 | * @return true |
130 | 130 | */ |
131 | | - public static function onSchemaUpdate( DatabaseUpdater $updater ) { |
| 131 | + public static function onSchemaUpdate( /* DatabaseUpdater */ $updater = null ) { |
132 | 132 | global $wgDBtype, $egLiveTranslateIP; |
133 | 133 | |
134 | 134 | if ( $wgDBtype == 'mysql' ) { |
135 | 135 | // 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 | + } |
142 | 151 | } |
143 | 152 | |
144 | 153 | return true; |
Index: trunk/extensions/LiveTranslate/RELEASE-NOTES |
— | — | @@ -4,6 +4,12 @@ |
5 | 5 | Latest version of the release notes: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/LiveTranslate/RELEASE-NOTES?view=co |
6 | 6 | |
7 | 7 | |
| 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 | + |
8 | 14 | === Version 0.1 === |
9 | 15 | 2010-12-22 |
10 | 16 | |