Index: trunk/phase3/includes/api/ApiEmailUser.php |
— | — | @@ -63,6 +63,17 @@ |
64 | 64 | 'CCMe' => $params['ccme'], |
65 | 65 | ); |
66 | 66 | $retval = SpecialEmailUser::submit( $data ); |
| 67 | + |
| 68 | + if ( $retval instanceof Status ) { |
| 69 | + // SpecialEmailUser sometimes returns a status |
| 70 | + // sometimes it doesn't. |
| 71 | + if ( $retval->isGood() ) { |
| 72 | + $retval = true; |
| 73 | + } else { |
| 74 | + $retval = $retval->getErrorsArray(); |
| 75 | + } |
| 76 | + } |
| 77 | + |
67 | 78 | if ( $retval === true ) { |
68 | 79 | $result = array( 'result' => 'Success' ); |
69 | 80 | } else { |
Index: trunk/phase3/includes/specials/SpecialEmailuser.php |
— | — | @@ -221,7 +221,8 @@ |
222 | 222 | * getPermissionsError(). It is probably also a good |
223 | 223 | * idea to check the edit token and ping limiter in advance. |
224 | 224 | * |
225 | | - * @return Mixed: True on success, String on error |
| 225 | + * @return Mixed: Status object, or potentially a String on error |
| 226 | + * or maybe even true on success if anything uses the EmailUser hook. |
226 | 227 | */ |
227 | 228 | public static function submit( $data ) { |
228 | 229 | global $wgUser, $wgUserEmailUseReplyTo; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -203,6 +203,7 @@ |
204 | 204 | * (bug 27688) Simplify queries to list user block information |
205 | 205 | * (bug 27708) list=users does not have a property to return user id |
206 | 206 | * (bug 27715) imageinfo didn't respect revdelete |
| 207 | +* (bug 27862) Useremail module didn't properly return success on success. |
207 | 208 | |
208 | 209 | === Languages updated in 1.18 === |
209 | 210 | |