Index: trunk/phase3/includes/api/ApiQueryLangLinks.php |
— | — | @@ -87,6 +87,12 @@ |
88 | 88 | break; |
89 | 89 | } |
90 | 90 | $entry = array( 'lang' => $row->ll_lang ); |
| 91 | + if ( !is_null( $params['url'] ) ) { |
| 92 | + $title = Title::newFromText( "{$row->ll_lang}:{$row->ll_title}" ); |
| 93 | + if ( $title ) { |
| 94 | + $entry = array_merge( $entry, array( 'url' => $title->getFullURL() ) ); |
| 95 | + } |
| 96 | + } |
91 | 97 | ApiResult::setContent( $entry, $row->ll_title ); |
92 | 98 | $fit = $this->addPageSubItem( $row->ll_from, $entry ); |
93 | 99 | if ( !$fit ) { |
— | — | @@ -110,6 +116,7 @@ |
111 | 117 | ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2 |
112 | 118 | ), |
113 | 119 | 'continue' => null, |
| 120 | + 'url' => null, |
114 | 121 | ); |
115 | 122 | } |
116 | 123 | |
— | — | @@ -117,6 +124,7 @@ |
118 | 125 | return array( |
119 | 126 | 'limit' => 'How many langlinks to return', |
120 | 127 | 'continue' => 'When more results are available, use this to continue', |
| 128 | + 'url' => 'Whether to get the full URL', |
121 | 129 | ); |
122 | 130 | } |
123 | 131 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -527,6 +527,7 @@ |
528 | 528 | * (bug 25760) counter property still reported by the API when |
529 | 529 | $wgDisableCounters enabled |
530 | 530 | * (bug 25987) prop=info&inprop=watched now also works for missing pages |
| 531 | +* (bug 26006) prop=langlinks now allows obtaining full URL |
531 | 532 | |
532 | 533 | === Languages updated in 1.17 === |
533 | 534 | |