http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96036
Revision: 96036
Author: nikerabbit
Date: 2011-09-01 20:31:36 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
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: trunk/extensions/Translate/utils/TranslationHelpers.php
===================================================================
--- trunk/extensions/Translate/utils/TranslationHelpers.php 2011-09-01
20:25:16 UTC (rev 96035)
+++ trunk/extensions/Translate/utils/TranslationHelpers.php 2011-09-01
20:31:36 UTC (rev 96036)
@@ -881,12 +881,14 @@
$conds = array(
'rt_page' => $this->title->getArticleId(),
'rt_type' => RevTag::getType( 'tp:transver' ),
- 'rt_revision' => $this->title->getLatestRevID(),
);
+ $options = array(
+ 'ORDER BY' => 'rt_revision DESC',
+ );
$latestRevision = $definitionTitle->getLatestRevID();
- $translationRevision = $db->selectField( 'revtag', 'rt_value',
$conds, __METHOD__ );
+ $translationRevision = $db->selectField( 'revtag', 'rt_value',
$conds, __METHOD__, $options );
if ( $translationRevision === false ) {
return null;
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs