MediaWiki
REL1_24
|
A special page that allows users to send e-mails to other users. More...
Public Member Functions | |
__construct () | |
execute ($par) | |
Default execute method Checks user permissions. | |
getDescription () | |
Returns the name that goes in the <h1> in the special page itself, and also the name that will be listed in Special:Specialpages. | |
Static Public Member Functions | |
static | getPermissionsError ($user, $editToken, Config $config=null) |
Check whether a user is allowed to send email. | |
static | getTarget ($target) |
Validate target User. | |
static | submit (array $data, IContextSource $context) |
Really send a mail. | |
static | uiSubmit (array $data, HTMLForm $form) |
Submit callback for an HTMLForm object, will simply call submit(). | |
Protected Member Functions | |
getFormFields () | |
getGroupName () | |
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'. | |
userForm ($name) | |
Form to ask for target user name. | |
Protected Attributes | |
$mTarget | |
User string | $mTargetObj |
$mTargetObj |
A special page that allows users to send e-mails to other users.
Definition at line 29 of file SpecialEmailuser.php.
Definition at line 36 of file SpecialEmailuser.php.
SpecialEmailUser::execute | ( | $ | subPage | ) |
Default execute method Checks user permissions.
This must be overridden by subclasses; it will be made abstract in a future version
string | null | $subPage |
Reimplemented from SpecialPage.
Definition at line 99 of file SpecialEmailuser.php.
References $error, $form, $out, $params, $result, $ret, $title, array(), SpecialPage\getConfig(), SpecialPage\getContext(), getFormFields(), SpecialPage\getOutput(), SpecialPage\getPageTitle(), getPermissionsError(), SpecialPage\getRequest(), getTarget(), SpecialPage\getUser(), list, SpecialPage\msg(), SpecialPage\outputHeader(), SpecialPage\setHeaders(), userForm(), and wfRunHooks().
Returns the name that goes in the <h1> in the special page itself, and also the name that will be listed in Special:Specialpages.
Derived classes can override this, but usually it is easier to keep the default behavior.
Reimplemented from SpecialPage.
Definition at line 40 of file SpecialEmailuser.php.
References getTarget(), SpecialPage\msg(), and text.
SpecialEmailUser::getFormFields | ( | ) | [protected] |
Definition at line 49 of file SpecialEmailuser.php.
References array(), SpecialPage\getName(), SpecialPage\getUser(), Linker\link(), and SpecialPage\msg().
Referenced by execute().
SpecialEmailUser::getGroupName | ( | ) | [protected] |
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.
Reimplemented from SpecialPage.
Definition at line 380 of file SpecialEmailuser.php.
static SpecialEmailUser::getPermissionsError | ( | $ | user, |
$ | editToken, | ||
Config $ | config = null |
||
) | [static] |
Check whether a user is allowed to send email.
Definition at line 214 of file SpecialEmailuser.php.
Referenced by ApiEmailUser\execute(), and execute().
static SpecialEmailUser::getTarget | ( | $ | target | ) | [static] |
Validate target User.
string | $target | Target user name |
Definition at line 181 of file SpecialEmailuser.php.
Referenced by ApiEmailUser\execute(), execute(), and getDescription().
static SpecialEmailUser::submit | ( | array $ | data, |
IContextSource $ | context | ||
) | [static] |
Really send a mail.
Permissions should have been checked using getPermissionsError(). It is probably also a good idea to check the edit token and ping limiter in advance.
array | $data | |
IContextSource | $context |
Definition at line 306 of file SpecialEmailuser.php.
Referenced by ApiEmailUser\execute().
static SpecialEmailUser::uiSubmit | ( | array $ | data, |
HTMLForm $ | form | ||
) | [static] |
Submit callback for an HTMLForm object, will simply call submit().
array | $data | |
HTMLForm | $form |
Definition at line 292 of file SpecialEmailuser.php.
SpecialEmailUser::userForm | ( | $ | name | ) | [protected] |
Form to ask for target user name.
string | $name | User name submitted. |
Definition at line 261 of file SpecialEmailuser.php.
Referenced by execute().
SpecialEmailUser::$mTarget [protected] |
Definition at line 30 of file SpecialEmailuser.php.
User string SpecialEmailUser::$mTargetObj [protected] |
$mTargetObj
Definition at line 34 of file SpecialEmailuser.php.