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:
Sam Minnee 2010-07-15 22:52:20 +00:00
parent 080458d064
commit cc1584cf12

View File

@ -1879,6 +1879,14 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$tabMeta->setTitle(_t('SiteTree.TABMETA', "Metadata"));
$tabBehaviour->setTitle(_t('SiteTree.TABBEHAVIOUR', "Behaviour"));
$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) {
$this->extend('updateCMSFields', $fields);