Index: trunk/extensions/LandingCheck/LandingCheck.php |
— | — | @@ -0,0 +1,29 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +# Alert the user that this is not a valid entry point to MediaWiki if they try to access the special pages file directly. |
| 5 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 6 | + echo <<<EOT |
| 7 | +To install this extension, put the following line in LocalSettings.php: |
| 8 | +require_once( "\$IP/extensions/LandingCheck/LandingCheck.php" ); |
| 9 | +EOT; |
| 10 | + exit( 1 ); |
| 11 | +} |
| 12 | + |
| 13 | +$wgLandingPageBase = 'http://wikimediafoundation.org/wiki/'; |
| 14 | + |
| 15 | +// Extension credits that will show up on Special:Version |
| 16 | +$wgExtensionCredits['specialpage'][] = array( |
| 17 | + 'path' => __FILE__, |
| 18 | + 'name' => 'LandingCheck', |
| 19 | + 'version' => '0.1', |
| 20 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:LandingCheck', |
| 21 | + 'author' => 'Ryan Kaldari', |
| 22 | + 'descriptionmsg' => 'landingcheck-desc', |
| 23 | +); |
| 24 | + |
| 25 | +$dir = dirname( __FILE__ ) . '/'; |
| 26 | + |
| 27 | +$wgAutoloadClasses['SpecialLandingCheck'] = $dir . 'SpecialLandingCheck.php'; |
| 28 | +$wgExtensionMessagesFiles['LandingCheck'] = $dir . 'LandingCheck.i18n.php'; |
| 29 | +$wgSpecialPages['LandingCheck'] = 'SpecialLandingCheck'; |
| 30 | +$wgSpecialPageGroups['LandingCheck'] = 'contribution'; |
Index: trunk/extensions/LandingCheck/SpecialLandingCheck.php |
— | — | @@ -0,0 +1,18 @@ |
| 2 | +<?php |
| 3 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 4 | + echo "LandingCheck extension\n"; |
| 5 | + exit( 1 ); |
| 6 | +} |
| 7 | + |
| 8 | +class LandingCheck extends SpecialPage { |
| 9 | + |
| 10 | + function __construct() { |
| 11 | + // Register special page |
| 12 | + parent::__construct( 'LandingCheck' ); |
| 13 | + } |
| 14 | +} |
| 15 | + |
| 16 | + |
| 17 | +//$wgOut->redirect( $this->getTitle( 'view' )->getLocalUrl( "template=$template" ) ); |
| 18 | + |
| 19 | +?> |
\ No newline at end of file |