r100111 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100110‎ | r100111 | r100112 >
Date:09:49, 18 October 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
New table anticipating further development :)
Card i18n#125
Modified paths:
  • /trunk/extensions/Translate/Translate.php (modified) (history)
  • /trunk/extensions/Translate/TranslateHooks.php (modified) (history)
  • /trunk/extensions/Translate/sql/translate_reviews.sql (added) (history)

Diff [purge]

Index: trunk/extensions/Translate/Translate.php
@@ -530,6 +530,8 @@
531531 */
532532 $wgTranslateYamlLibrary = 'spyc';
533533
 534+# ==== Features in development ====
 535+$wgTranslateMessageReview = false;
534536
535537 /** @cond cli_support */
536538 if ( !defined( 'TRANSLATE_CLI' ) ) {
Index: trunk/extensions/Translate/TranslateHooks.php
@@ -183,6 +183,10 @@
184184 $updater->addExtensionUpdate( array( 'addTable', 'translate_groupstats', "$dir/translate_groupstats.sql", true ) );
185185 $updater->addExtensionUpdate( array( 'addIndex', 'translate_sections', 'trs_page_order', "$dir/translate_sections-indexchange.sql", true ) );
186186 $updater->addExtensionUpdate( array( 'dropIndex', 'translate_sections', 'trs_page', "$dir/translate_sections-indexchange2.sql", true ) );
 187+ global $wgTranslateMessageReview;
 188+ if ( $wgTranslateMessageReview ) {
 189+ $updater->addExtensionUpdate( array( 'addTable', 'translate_reviews', "$dir/translate_reviews.sql", true ) );
 190+ }
187191
188192 return true;
189193 }
Index: trunk/extensions/Translate/sql/translate_reviews.sql
@@ -0,0 +1,12 @@
 2+CREATE TABLE /*$wgDBprefix*/translate_reviews (
 3+ trr_user int not null,
 4+
 5+ -- Link to page.page_id
 6+ trr_page int not null,
 7+
 8+ -- Link to revision.rev_id
 9+ trr_revision int not null
 10+) /*$wgDBTableOptions*/;
 11+
 12+CREATE UNIQUE INDEX /*i*/trr_user_page_revision ON /*$wgDBprefix*/translate_reviews
 13+(trr_user, trr_page, trr_revision);
Property changes on: trunk/extensions/Translate/sql/translate_reviews.sql
___________________________________________________________________
Added: svn:eol-style
114 + native

Status & tagging log