Fix when nothing is passed to listToText (eg: no author)
[lhc/web/wiklou.git] / includes / SpecialListinterwikis.php
1 <?php
2 /**
3 * @package MediaWiki
4 * @subpackage SpecialPage
5 *
6 * @author Ashar Voultoiz <hashar@altern.org>
7 * @licence GNU General Public Licence 2.0 or later
8 *
9 */
10
11 class ListinterwikisPage extends QueryPage {
12
13 function getName() { return( 'Listinterwikis' ); }
14 function isExpensive() { return false; }
15 function isSyndicated() { return false; }
16 function sortDescending() { return false; }
17
18 /**
19 * We have a little fun with title, namespace but its required by QueryPage.
20 */
21 function getSQL() {
22 $dbr =& wfGetDB( DB_SLAVE );
23 $iw = $dbr->tableName( 'interwiki' );
24 $sql = "SELECT 'Listinterwikis' AS type, iw_url AS title, 0 AS namespace, iw_prefix AS value, iw_local, iw_trans FROM $iw";
25 return $sql;
26 }
27
28 function formatResult( $skin, $result ) {
29 return
30 $result->value
31 . ' ... '
32 . $skin->makeExternalLink($result->title, $result->title);
33 }
34 }
35
36 function wfSpecialListinterwikis() {
37 list( $limit, $offset ) = wfCheckLimits();
38 $lip = new ListinterwikisPage();
39 $lip->doQuery( $offset, $limit );
40 }
41 ?>
42