Index: trunk/phase3/includes/api/ApiEmailUser.php |
— | — | @@ -50,28 +50,15 @@ |
51 | 51 | // Check required parameters |
52 | 52 | if ( !isset( $params['target'] ) ) |
53 | 53 | $this->dieUsageMsg( array( 'missingparam', 'target' ) ); |
54 | | - // Validate target |
55 | | - $targetUser = EmailUserForm::validateEmailTarget( $params['target'] ); |
56 | | - if ( isset( $params['check'] ) ) { |
57 | | - // Only a check was requested; don't actually send a mail |
58 | | - if ( $targetUser instanceof User ) |
59 | | - $result = array( 'result' => 'Enabled' ); |
60 | | - else |
61 | | - $result = array( 'result' => 'Disabled', 'error' => $targetUser ); |
62 | | - |
63 | | - $this->getResult()->addValue( null, $this->getModuleName(), $result ); |
64 | | - return; |
65 | | - } |
66 | | - // If $targetUser is not a User it represents an error message |
67 | | - if ( !( $targetUser instanceof User ) ) |
68 | | - $this->dieUsageMsg( array( $targetUser ) ); |
69 | | - |
70 | | - // Check more parameters |
71 | 54 | if ( !isset( $params['text'] ) ) |
72 | 55 | $this->dieUsageMsg( array( 'missingparam', 'text' ) ); |
73 | 56 | if ( !isset( $params['token'] ) ) |
74 | 57 | $this->dieUsageMsg( array( 'missingparam', 'token' ) ); |
75 | 58 | |
| 59 | + // Validate target |
| 60 | + $targetUser = EmailUserForm::validateEmailTarget( $params['target'] ); |
| 61 | + if ( !( $targetUser instanceof User ) ) |
| 62 | + $this->dieUsageMsg( array( $targetUser ) ); |
76 | 63 | |
77 | 64 | // Check permissions |
78 | 65 | $error = EmailUserForm::getPermissionsError( $wgUser, $params['token'] ); |
— | — | @@ -99,7 +86,6 @@ |
100 | 87 | 'text' => null, |
101 | 88 | 'token' => null, |
102 | 89 | 'ccme' => false, |
103 | | - 'check' => null, |
104 | 90 | ); |
105 | 91 | } |
106 | 92 | |
— | — | @@ -110,7 +96,6 @@ |
111 | 97 | 'text' => 'Mail body', |
112 | 98 | 'token' => 'A token previously acquired via prop=info', |
113 | 99 | 'ccme' => 'Send a copy of this mail to me', |
114 | | - 'check' => 'Only check whether email can be sent to the target user', |
115 | 100 | ); |
116 | 101 | } |
117 | 102 | |
— | — | @@ -122,8 +107,7 @@ |
123 | 108 | |
124 | 109 | protected function getExamples() { |
125 | 110 | return array ( |
126 | | - 'api.php?action=emailuser&target=WikiSysop&text=Content', |
127 | | - 'api.php?action=emailuser&target=WikiSysop&check=yes', |
| 111 | + 'api.php?action=emailuser&target=WikiSysop&text=Content' |
128 | 112 | ); |
129 | 113 | } |
130 | 114 | |
Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -694,7 +694,6 @@ |
695 | 695 | 'ipb_cant_unblock' => array('code' => 'cantunblock', 'info' => "The block you specified was not found. It may have been unblocked already"), |
696 | 696 | 'mailnologin' => array('code' => 'cantsend', 'info' => "You're not logged in or you don't have a confirmed e-mail address, so you can't send e-mail"), |
697 | 697 | 'usermaildisabled' => array('code' => 'usermaildisabled', 'info' => "User email has been disabled"), |
698 | | - 'usermailenabled' => array('code' => 'usermailenabled', 'info' => "User email is enabled"), |
699 | 698 | 'blockedemailuser' => array('code' => 'blockedfrommail', 'info' => "You have been blocked from sending e-mail"), |
700 | 699 | 'notarget' => array('code' => 'notarget', 'info' => "You have not specified a valid target for this action"), |
701 | 700 | 'noemail' => array('code' => 'noemail', 'info' => "The user has not specified a valid e-mail address, or has chosen not to receive e-mail from other users"), |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -136,7 +136,6 @@ |
137 | 137 | * (bug 15949) Add undo functionality to action=edit |
138 | 138 | * (bug 16483) Kill filesort in ApiQueryBacklinks caused by missing parentheses. |
139 | 139 | Building query properly now using makeList() |
140 | | -* Add "check" parameter to action=email |
141 | 140 | * (bug 17182) Fix pretty printer so URLs with parentheses in them are |
142 | 141 | autolinked correctly |
143 | 142 | |