r96036 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96035‎ | r96036 | r96037 >
Date:20:31, 1 September 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Look harder for tp:transver tag. When page was marked fuzzy, new tp:transver tag is not added. Take the last one there is, if any.
Found out while debugging loading of diff styles.
Modified paths:
  • /trunk/extensions/Translate/utils/TranslationHelpers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/TranslationHelpers.php
@@ -881,12 +881,14 @@
882882 $conds = array(
883883 'rt_page' => $this->title->getArticleId(),
884884 'rt_type' => RevTag::getType( 'tp:transver' ),
885 - 'rt_revision' => $this->title->getLatestRevID(),
886885 );
 886+ $options = array(
 887+ 'ORDER BY' => 'rt_revision DESC',
 888+ );
887889
888890 $latestRevision = $definitionTitle->getLatestRevID();
889891
890 - $translationRevision = $db->selectField( 'revtag', 'rt_value', $conds, __METHOD__ );
 892+ $translationRevision = $db->selectField( 'revtag', 'rt_value', $conds, __METHOD__, $options );
891893 if ( $translationRevision === false ) {
892894 return null;
893895 }

Status & tagging log