Localisation updates from http://translatewiki.net.
[T119942Repr.git] / SpecialIncludable.php
blob3bee3129cfb6cc63fa0f9463c125cbd9bbffb8a4
1 <?php
2 /**
3 * A Special Page sample that can be included on a wikipage like
4 * {{Special:Includable}} as well as being accessed on [[Special:Includable]]
6 * @file
7 * @ingroup Extensions
9 * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
10 * @author Niklas Laxström
11 * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
12 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
15 $wgExtensionCredits['specialpage'][] = array(
16 'path' => __FILE__,
17 'name' => 'Includable',
18 'description' => 'a sample includable Special Page',
19 'author' => 'Ævar Arnfjörð Bjarmason'
22 $wgSpecialPages['Includable'] = 'SpecialIncludable';
24 class SpecialIncludable extends IncludableSpecialPage {
26 public function __construct() {
27 parent::__construct( 'Includable' );
30 /**
31 * Show the page
33 public function execute( $par = null ) {
34 global $wgOut;
36 if ( $this->including() )
37 $out = "I'm being included";
38 else {
39 $out = "I'm being viewed as a Special Page";
40 $this->setHeaders();
43 $wgOut->addWikiText( $out );