Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -263,6 +263,16 @@ |
264 | 264 | $user: the User object that was created. (Parameter added in 1.7) |
265 | 265 | $byEmail: true when account was created "by email" (added in 1.12) |
266 | 266 | |
| 267 | +‘AfterUserMessage': After a user message has been left, this hook is |
| 268 | +called to take care of any cleanup. |
| 269 | +$user: The user who we left the message for. |
| 270 | +$article: The article the message was left on. |
| 271 | +$subject: The subject of the message |
| 272 | +$text: The text of the message. |
| 273 | +$signature: The signature we used. |
| 274 | +$summary: The edit summary. |
| 275 | +$editor: The editor that performed the edit. |
| 276 | + |
267 | 277 | 'AjaxAddScript': Called in output page just before the initialisation |
268 | 278 | of the javascript ajax engine. The hook is only called when ajax |
269 | 279 | is enabled ( $wgUseAjax = true; ). |
— | — | @@ -1327,6 +1337,16 @@ |
1328 | 1338 | |
1329 | 1339 | 'SetupAfterCache': Called in Setup.php, after cache objects are set |
1330 | 1340 | |
| 1341 | +‘SetupUserMessageArticle': Called in User::leaveUserMessage() after |
| 1342 | +before anything has been posted to the article. |
| 1343 | +$user: The user who we left the message for. |
| 1344 | +&$article: The article that will be posted to. |
| 1345 | +$subject: The subject of the message |
| 1346 | +$text: The text of the message. |
| 1347 | +$signature: The signature we used. |
| 1348 | +$summary: The edit summary. |
| 1349 | +$editor: The editor that performed the edit. |
| 1350 | + |
1331 | 1351 | 'ShowMissingArticle': Called when generating the output for a non-existent page |
1332 | 1352 | $article: The article object corresponding to the page |
1333 | 1353 | |
Index: trunk/phase3/includes/User.php |
— | — | @@ -3777,7 +3777,7 @@ |
3778 | 3778 | |
3779 | 3779 | $article = new Article( $this->getTalkPage() ); |
3780 | 3780 | wfRunHooks( 'SetupUserMessageArticle', |
3781 | | - array( &$article, $subject, $this, $editor ) ); |
| 3781 | + array( $this, &$article, $subject, $text, $signature, $summary, $editor ) ); |
3782 | 3782 | |
3783 | 3783 | $flags = $article->checkFlags( $flags ); |
3784 | 3784 | |
— | — | @@ -3798,7 +3798,7 @@ |
3799 | 3799 | // Set newtalk with the right user ID |
3800 | 3800 | $this->setNewtalk( true ); |
3801 | 3801 | wfRunHooks( 'AfterUserMessage', |
3802 | | - array( $this, $article, $summary, $signature, $editor, $text ) ); |
| 3802 | + array( $this, $article, $summary, $text, $signature, $summary, $editor ) ); |
3803 | 3803 | $dbw->commit(); |
3804 | 3804 | } else { |
3805 | 3805 | // The article was concurrently created |