}
/**
- * Shortcut to get the skin being used for this instance
+ * Shortcut to get the User executing this instance
*
* @return User
* @since 1.18
* Shortcut to get user's language
*
* @return Language
- * @since 1.19
+ * @since 1.18
*/
public function getLang() {
return $this->getContext()->getLang();
}
/**
- * Wrapper around wfMessage that sets the current context. Currently this
- * is only the title.
+ * Wrapper around wfMessage that sets the current context.
*
* @return Message
* @see wfMessage
*/
public function msg( /* $args */ ) {
- return call_user_func_array( 'wfMessage',
- func_get_args() )->title( $this->getFullTitle() );
+ return call_user_func_array( array( $this->getContext(), 'msg' ), func_get_args() );
}
/**
protected function getForm() {
$this->fields = $this->getFormFields();
- // Give hooks a chance to alter the form, adding extra fields or text etc
- wfRunHooks( "Special{$this->getName()}ModifyFormFields", array( &$this->fields ) );
-
$form = new HTMLForm( $this->fields, $this->getContext() );
$form->setSubmitCallback( array( $this, 'onSubmit' ) );
$form->setWrapperLegend( wfMessage( strtolower( $this->getName() ) . '-legend' ) );
* Shortcut to construct a special page which is unlisted by default
* @ingroup SpecialPage
*/
-class UnlistedSpecialPage extends SpecialPage
-{
+class UnlistedSpecialPage extends SpecialPage {
function __construct( $name, $restriction = '', $function = false, $file = 'default' ) {
parent::__construct( $name, $restriction, false, $function, $file );
}
* Shortcut to construct an includable special page
* @ingroup SpecialPage
*/
-class IncludableSpecialPage extends SpecialPage
-{
+class IncludableSpecialPage extends SpecialPage {
function __construct(
$name, $restriction = '', $listed = true, $function = false, $file = 'default'
) {