Index: trunk/extensions/InterwikiList/InterwikiList_body.php |
— | — | @@ -2,6 +2,11 @@ |
3 | 3 | |
4 | 4 | // Class definition for Extension:InterwikiList |
5 | 5 | |
| 6 | +// Suppress fatal error about SpecialPage class not found if called as entry point |
| 7 | +if ( !defined('MEDIAWIKI') ) { |
| 8 | + die( '' ); |
| 9 | +} |
| 10 | + |
6 | 11 | class InterwikiList extends SpecialPage { |
7 | 12 | |
8 | 13 | /** |
— | — | @@ -37,12 +42,12 @@ |
38 | 43 | |
39 | 44 | while ( $row = $dbr->fetchObject( $results ) ) { |
40 | 45 | $text .= " <tr> |
41 | | - <td>" . $row->iw_prefix . "</td> |
42 | | - <td>" . $row->iw_url . "</td> |
| 46 | + <td>" . htmlspecialchars( $row->iw_prefix ) . "</td> |
| 47 | + <td>" . htmlspecialchars( $row->iw_url ) . "</td> |
43 | 48 | </tr>\n"; |
44 | 49 | } |
45 | | - $text .= Xml::closeElement( 'table' ); |
46 | | - $dbr->freeResult ( $results ); |
| 50 | + $text .= "</table>\n"; |
| 51 | + $dbr->freeResult( $results ); |
47 | 52 | |
48 | 53 | return $text; |
49 | 54 | } |
Index: trunk/extensions/InterwikiList/InterwikiList.php |
— | — | @@ -12,11 +12,6 @@ |
13 | 13 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
14 | 14 | */ |
15 | 15 | |
16 | | -// Not a valid entry point, skip unless MEDIAWIKI is defined |
17 | | -if ( !defined('MEDIAWIKI') ) { |
18 | | - die( "NOT A VALID ENTRY" ); |
19 | | -} |
20 | | - |
21 | 16 | $wgExtensionCredits['specialpage'][] = array( |
22 | 17 | 'name' => 'Interwiki List', |
23 | 18 | 'version' => '0.2', |