Created
October 2, 2011 15:29
-
-
Save dantman/1257541 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SpecialTitleTargeted extends SpecialPage implements SpecialTitleTarget { | |
function executeWithTarget() { | |
$this->getOutput()->addHTML( htmlspecialchars( | |
$this->target()->getPrefixedText() ) ); | |
} | |
} | |
class SpecialUserTargeted extends SpecialPage implements SpecialUserTarget { | |
function executeWithTarget() { | |
$this->getOutput()->addHTML( htmlspecialchars( | |
$this->target()->getName() ) ); | |
} | |
} | |
// Special:TitleTargeted/Foo | |
# Foo | |
// Special:UserTargeted/Dantman | |
# Dantman | |
// Special:TitleTargeted | |
# [form asking for a title] | |
// Special:UserTargeted | |
# [form asking for a username] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment