Index: trunk/extensions/Translate/MessageCollection.php |
— | — | @@ -643,7 +643,7 @@ |
644 | 644 | 'page_latest = rev_id', |
645 | 645 | 'old_id = rev_text_id', |
646 | 646 | ); |
647 | | - $conds = array_merge( $conds, $this->getTitleConds( $dbr ) ); |
| 647 | + $conds[] = $this->getTitleConds( $dbr ); |
648 | 648 | |
649 | 649 | $res = $dbr->select( $tables, $fields, $conds, __METHOD__ ); |
650 | 650 | |
— | — | @@ -672,7 +672,7 @@ |
673 | 673 | |
674 | 674 | $conds[] = $db->makeList( $cond, LIST_AND ); |
675 | 675 | } |
676 | | - return $conds; |
| 676 | + return $db->makeList( $conds, LIST_OR ); |
677 | 677 | } |
678 | 678 | |
679 | 679 | /** |
— | — | @@ -884,7 +884,7 @@ |
885 | 885 | foreach ( array_keys( $this->messages ) as $key ) { |
886 | 886 | if ( $namespace === false ) { |
887 | 887 | // pages are in format ex. "8:jan" |
888 | | - $pages[$key] = explode( $key, ':', 2 ); |
| 888 | + $pages[$key] = explode( ':', $key, 2 ); |
889 | 889 | } else { |
890 | 890 | $pages[$key] = array( $namespace, $key ); |
891 | 891 | } |
Index: trunk/extensions/Translate/utils/MessageTable.php |
— | — | @@ -104,13 +104,14 @@ |
105 | 105 | |
106 | 106 | $sourceLang = Language::factory( $this->group->getSourceLanguage() ); |
107 | 107 | $targetLang = Language::factory( $this->collection->getLanguage() ); |
| 108 | + $titleMap = $this->collection->keys(); |
108 | 109 | |
109 | 110 | $output = ''; |
110 | 111 | |
111 | 112 | $this->collection->initMessages(); // Just to be sure |
112 | 113 | foreach ( $this->collection as $key => $m ) { |
113 | 114 | $tools = array(); |
114 | | - $title = $this->keyToTitle( $key ); |
| 115 | + $title = $titleMap[$key]; |
115 | 116 | |
116 | 117 | $original = $m->definition(); |
117 | 118 | |
— | — | @@ -189,13 +190,6 @@ |
190 | 191 | } |
191 | 192 | } |
192 | 193 | |
193 | | - protected function keyToTitle( $key ) { |
194 | | - $titleText = TranslateUtils::title( $key, $this->collection->code ); |
195 | | - $namespace = $this->group->getNamespace(); |
196 | | - |
197 | | - return Title::makeTitle( $namespace, $titleText ); |
198 | | - } |
199 | | - |
200 | 194 | protected static function getLanguageAttributes( Language $language ) { |
201 | 195 | global $wgTranslateDocumentationLanguageCode; |
202 | 196 | $code = $language->getCode(); |