r18894 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18893‎ | r18894 | r18895 >
Date:23:47, 6 January 2007
Author:hashar
Status:reverted
Tags:
Comment:
Fix for r18893
Modified paths:
  • /trunk/phase3/includes/SpecialListinterwikis.php (added) (history)

Diff [purge]

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

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r18893Special:Listinterwikishashar23:42, 6 January 2007

Status & tagging log