Because the hook is called from within an if statement that checks whether or not a canonical redirect should be performned. A "test" is also another name for an "if" statement.
On Tue, Dec 15, 2020 at 7:57 PM Jeffrey Walton <noloader@gmail.com> wrote:
>
> On Tue, Dec 15, 2020 at 7:27 PM John <phoenixoverride@gmail.com> wrote:
> >
> > there should be a file located at /includes/Hook/TestCanonicalRedirectHook.php
> >
> > https://github.com/wikimedia/mediawiki/blob/master/ includes/Hook/ TestCanonicalRedirectHook.php
>
> Perfect, thank you very much.
John, I have to ask...
Why was it not called RegisterCanonicalRedirect? Where did Test come from?
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "TestCanonicalRedirect" to register handlers
implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
Based on the comment, it seems like a better name and it avoids
masquerading as a Test component.
Jeff
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l