From 5e89c545b52cd3369e713388c3871ec7fe0c86c0 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sat, 6 Jan 2007 23:47:44 +0000 Subject: [PATCH] Fix for r18893 --- includes/SpecialListinterwikis.php | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 includes/SpecialListinterwikis.php 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 ); +} +?> + -- 2.20.1