title: Allow passing MessageLocalizer to newMainPage()
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 13 Apr 2019 03:27:31 +0000 (04:27 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Sun, 14 Apr 2019 02:26:17 +0000 (03:26 +0100)
commit821505367e41597e23d3547ca70c2485f1d9da26
tree1263ebcb7085eadcd348b4b38d8f26cd58c66417
parent80a60fce7d99791637730c7705fffe8c112ff5ea
title: Allow passing MessageLocalizer to newMainPage()

The method could not be used in session-less endpoints. This was
worked around once in the Startup module.

I plan to use this method in an extension module as well,
and would prefer not to duplicate core's logic for determining
the main page, outside this repository.

As general dependency-injection pattern, it seems desirable
to allow injecting a MessageLocalizer here.

Change-Id: I76cd02b2f489882e9404b93270f76aad9f0a4d9d
includes/Title.php
includes/resourceloader/ResourceLoaderStartUpModule.php
tests/phpunit/includes/TitleTest.php