r50980 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50979‎ | r50980 | r50981 >
Date:15:05, 25 May 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
Bugfixes
Modified paths:
  • /trunk/extensions/Translate/Translate.php (modified) (history)
  • /trunk/extensions/Translate/scripts/populateFuzzy.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/scripts/populateFuzzy.php
@@ -34,11 +34,10 @@
3535 'page_namespace' => $wgTranslateMessageNamespaces,
3636 );
3737
38 -$insert = array();
39 -
4038 $limit = max(1000,intval($count/100));
4139 $offset = 0;
4240 while (true) {
 41+ $insert = array();
4342 echo "$offset/$count\n";
4443 $options = array( 'LIMIT' => $limit, 'OFFSET' => $offset );
4544 $res = $db->select( $tables, $fields, $conds, __METHOD__, $options );
@@ -58,6 +57,3 @@
5958 $db->replace( 'revtag', 'rt_type_page_revision', $inserts, __METHOD__ );
6059 }
6160
62 -
63 -
64 -echo $db->affectedRows() . "\n";
\ No newline at end of file
Index: trunk/extensions/Translate/Translate.php
@@ -320,7 +320,9 @@
321321 $ns = $article->getTitle()->getNamespace();
322322 if ( !in_array( $ns, $wgTranslateMessageNamespaces) ) return true;
323323
324 - // We are not interested in null revisions
 324+ // No fuzzy - no tag
 325+ if ( strpos( $text, TRANSLATE_FUZZY ) === false ) return true;
 326+
325327 if ( $revision === null ) {
326328 $rev = $article->getTitle()->getLatestRevId();
327329 } else {

Status & tagging log