From: Antoine Musso Date: Sat, 6 Jan 2007 23:47:44 +0000 (+0000) Subject: Fix for r18893 X-Git-Tag: 1.31.0-rc.0~54630 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=5e89c545b52cd3369e713388c3871ec7fe0c86c0;p=lhc%2Fweb%2Fwiklou.git Fix for r18893 --- diff --git a/includes/SpecialListinterwikis.php b/includes/SpecialListinterwikis.php new file mode 100644 index 0000000000..1c5458fb3d --- /dev/null +++ b/includes/SpecialListinterwikis.php @@ -0,0 +1,42 @@ + + * @licence GNU General Public Licence 2.0 or later + * + */ + +class ListinterwikisPage extends QueryPage { + + function getName() { return( 'Listinterwikis' ); } + function isExpensive() { return false; } + function isSyndicated() { return false; } + function sortDescending() { return false; } + + /** + * We have a little fun with title, namespace but its required by QueryPage. + */ + function getSQL() { + $dbr =& wfGetDB( DB_SLAVE ); + $iw = $dbr->tableName( 'interwiki' ); + $sql = "SELECT 'Listinterwikis' AS type, iw_url AS title, 0 AS namespace, iw_prefix AS value, iw_local, iw_trans FROM $iw"; + return $sql; + } + + function formatResult( $skin, $result ) { + return + $result->value + . ' ... ' + . $skin->makeExternalLink($result->title, $result->title); + } +} + +function wfSpecialListinterwikis() { + list( $limit, $offset ) = wfCheckLimits(); + $lip = new ListinterwikisPage(); + $lip->doQuery( $offset, $limit ); +} +?> +