Localisation updates from http://translatewiki.net.
[T119942Repr.git] / SpecialIncludable.php
blob9bb5edb7dc69204740d57ab36adc9ab109e9a71b
1 <?php
2 if ( !defined( 'MEDIAWIKI' ) ) die();
3 /**
4 * A Special Page sample that can be included on a wikipage like
5 * {{Special:Includable}} as well as being accessed on [[Special:Includable]]
7 * @file
8 * @ingroup Extensions
10 * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
11 * @author Niklas Laxström
12 * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
13 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
16 $wgExtensionCredits['specialpage'][] = array(
17 'path' => __FILE__,
18 'name' => 'Includable',
19 'description' => 'a sample includable Special Page',
20 'author' => 'Ævar Arnfjörð Bjarmason'
23 $wgSpecialPages['Includable'] = 'SpecialIncludable';
25 // See FourFileTemplate how to do i18n
26 //$wgExtensionMessagesFiles['Includable'] = dirname( __FILE__ ) . '/Includable.i18n.php';
28 class SpecialIncludable extends IncludableSpecialPage {
29 /**
30 * Constructor
32 function __construct() {
33 parent::__construct( 'Includable' );
36 /**
37 * main()
39 function execute( $par = null ) {
40 global $wgOut;
42 if ( $this->including() )
43 $out = "I'm being included";
44 else {
45 $out = "I'm being viewed as a Special Page";
46 $this->setHeaders();
49 $wgOut->addWikiText( $out );