X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryLangLinks.php;h=a20b8553d7de1bdaf4e8066ec3241fa86cd59ebe;hb=580d6f42d9835e5e64477c7f69fcd06787e9297f;hp=e6b02d79d99bdae3992f941cdfb02d7f031c1fde;hpb=3a26db55ab4ba908b76cd9982794d1eeafb4afa0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryLangLinks.php b/includes/api/ApiQueryLangLinks.php index e6b02d79d9..a20b8553d7 100644 --- a/includes/api/ApiQueryLangLinks.php +++ b/includes/api/ApiQueryLangLinks.php @@ -67,6 +67,10 @@ class ApiQueryLangLinks extends ApiQueryBase { ); } + //FIXME: (follow-up) To allow extensions to add to the language links, we need + // to load them all, add the extra links, then apply paging. + // Should not be terrible, it's not going to be more than a few hundred links. + // Note that, since (ll_from, ll_lang) is a unique key, we don't need // to sort by ll_title to ensure deterministic ordering. $sort = ( $params['dir'] == 'descending' ? ' DESC' : '' ); @@ -82,9 +86,9 @@ class ApiQueryLangLinks extends ApiQueryBase { $this->addOption( 'ORDER BY', 'll_lang' . $sort ); } else { $this->addOption( 'ORDER BY', array( - 'll_from' . $sort, - 'll_lang' . $sort - )); + 'll_from' . $sort, + 'll_lang' . $sort + ) ); } } @@ -178,7 +182,8 @@ class ApiQueryLangLinks extends ApiQueryBase { public function getExamples() { return array( - 'api.php?action=query&prop=langlinks&titles=Main%20Page&redirects=' => 'Get interlanguage links from the [[Main Page]]', + 'api.php?action=query&prop=langlinks&titles=Main%20Page&redirects=' + => 'Get interlanguage links from the [[Main Page]]', ); }