Index: trunk/extensions/Translate/tag/SpecialPageTranslation.php |
— | — | @@ -97,7 +97,8 @@ |
98 | 98 | 'rt_type=rtt_id', |
99 | 99 | 'rtt_name' => array( 'tp:mark', 'tp:tag' ), |
100 | 100 | ); |
101 | | - $res = $dbr->select( $tables, $vars, $conds, __METHOD__ ); |
| 101 | + $options = array( 'ORDER BY' => 'page_namespace, page_title' ); |
| 102 | + $res = $dbr->select( $tables, $vars, $conds, __METHOD__, $options ); |
102 | 103 | return $res; |
103 | 104 | } |
104 | 105 | |
Index: trunk/extensions/Translate/tag/PageTranslationHooks.php |
— | — | @@ -273,14 +273,13 @@ |
274 | 274 | if ( self::$allowTargetEdit || |
275 | 275 | $user->getName() === $wgTranslateFuzzyBotName ) return true; |
276 | 276 | |
277 | | - // Proceed to check whether we need to block |
278 | | - $page = TranslatablePage::newFromTitle( $newtitle ); |
279 | 277 | if ( $page->getMarkedTag() ) { |
| 278 | + list( , $code ) = TranslateUtils::figureMessage( $title->getText() ); |
280 | 279 | wfLoadExtensionMessages( 'PageTranslation' ); |
281 | 280 | $result = array( |
282 | 281 | 'tpt-target-page', |
283 | | - $newtitle->getPrefixedText(), |
284 | | - $page->getTranslationUrl( $title->getSubpageText() ) |
| 282 | + $page->getTitle()->getPrefixedText(), |
| 283 | + $page->getTranslationUrl( $code ) |
285 | 284 | ); |
286 | 285 | return false; |
287 | 286 | } |