mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-03 00:07:58 +02:00
ENHANCEMENT: Show a warning inside the the CMS if you've neglected to delete install.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108024 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
080458d064
commit
cc1584cf12
@ -1880,6 +1880,14 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
$tabBehaviour->setTitle(_t('SiteTree.TABBEHAVIOUR', "Behaviour"));
|
$tabBehaviour->setTitle(_t('SiteTree.TABBEHAVIOUR', "Behaviour"));
|
||||||
$tabAccess->setTitle(_t('SiteTree.TABACCESS', "Access"));
|
$tabAccess->setTitle(_t('SiteTree.TABACCESS', "Access"));
|
||||||
|
|
||||||
|
if(file_exists(BASE_PATH . '/install.php')) {
|
||||||
|
$fields->addFieldToTab("Root.Content.Main", new LiteralField("InstallWarningHeader",
|
||||||
|
"<p class=\"message warning\">" . _t("SiteTree.REMOVE_INSTALL_WARNING",
|
||||||
|
"Warning: You should remove install.php from this SilverStripe install for security reasons.")
|
||||||
|
. "</p>"), "Title");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(self::$runCMSFieldsExtensions) {
|
if(self::$runCMSFieldsExtensions) {
|
||||||
$this->extend('updateCMSFields', $fields);
|
$this->extend('updateCMSFields', $fields);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user