User "Brion VIBBER" changed the status of MediaWiki.r89408.

Old Status: new
New Status: fixme

User "Brion VIBBER" also posted a comment on MediaWiki.r89408.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89408#c17574
Commit summary:

More unpicking of r85288.  I think this is all of the magic method calls, but 
they're very hard to grep for (part of the problem with them!), so let's leave 
the calls in with a wfDeprecated() for a while...

Comment:

This has changed a number of hook parameter calls from pass-by-reference to 
pass-by-object:

<pre>
-               if ( !wfRunHooks( 'ArticleDelete', array( &$page, 
&$context->user, &$data['Reason'][0], &$error ) ) ) {
+               if ( !wfRunHooks( 'ArticleDelete', array( &$page, 
$context->getUser(), &$data['Reason'][0], &$error ) ) ) {
</pre>

hooks.txt unfortunately doesn't list any of these parameters here as being 
references (grrrr!) but callees may need to be fixed etc. If fixing these, it's 
probably an appropriate time to also remove the other unnecessary references: 
there the $page and $user params should *not* be references (as they cannot be 
swapped out for another object); the $reason parameter.... probably? shouldn't 
be editable. Here, only the $error param actually needs to be passed by 
reference, so the hook can replace it.


_______________________________________________
MediaWiki-CodeReview mailing list
mediawiki-coderev...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to