Merge pull request #6492 from open-sausages/pulls/4.0/security-page-class

API Shift Security page class config to separate option
This commit is contained in:
Loz Calver 2017-01-13 09:18:14 +00:00 committed by GitHub
commit b64b4497ca

View File

@ -124,6 +124,14 @@ class Security extends Controller implements TemplateGlobalProvider
*/
private static $template_main = 'Page';
/**
* Class to use for page rendering
*
* @var string
* @config
*/
private static $page_class = 'Page';
/**
* Default message set used in permission failures.
*
@ -515,7 +523,7 @@ class Security extends Controller implements TemplateGlobalProvider
}
// Use the default setting for which Page to use to render the security page
$pageClass = (string) $this->stat('template_main');
$pageClass = $this->stat('page_class');
$tmpPage = new $pageClass;
$tmpPage->Title = $title;
/** @skipUpgrade */