Don't construct SpecialPages twice
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Sat, 2 Apr 2016 14:39:50 +0000 (16:39 +0200)
committerFlorian <florian.schmidt.stargatewissen@gmail.com>
Sat, 2 Apr 2016 15:45:20 +0000 (17:45 +0200)
commitba40a63c0ee23daec4886a3e7da62b061639f19c
tree5ffcb6b61a9126c9cbc148d8bd9b5c9e8118684a
parentb9875c05431ec050701aec3cdbfecae1f2cf49de
Don't construct SpecialPages twice

If the special page object was already created for the request, there's
no need to create the object again. Save the created result (object, null)
in a global static array and return the value if the realName was already
created.

Bug: T123995
Change-Id: I70bf0e93e45f4b0597deaef717f5eb87c66f0a71
includes/specialpage/SpecialPageFactory.php
tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php