From cc1584cf123e39b3838aa9c827531e4af1b70639 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 15 Jul 2010 22:52:20 +0000 Subject: [PATCH] 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 --- core/model/SiteTree.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 87e5fb1ec..dc26da5bc 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -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", + "

" . _t("SiteTree.REMOVE_INSTALL_WARNING", + "Warning: You should remove install.php from this SilverStripe install for security reasons.") + . "

"), "Title"); + } + if(self::$runCMSFieldsExtensions) { $this->extend('updateCMSFields', $fields);