diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-08-14 00:06:19 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-08-19 09:57:03 +0200 |
commit | c33d1cacd48809e62b442febe9743424093e0ae8 (patch) | |
tree | 0df85832b1193565d23c829ae66d811c12ba40c5 /lib | |
parent | fc462c5edb9c7fcb58be336d18a95b02bea4e273 (diff) | |
download | nextcloud-server-c33d1cacd48809e62b442febe9743424093e0ae8.tar.gz nextcloud-server-c33d1cacd48809e62b442febe9743424093e0ae8.zip |
Add a copied_sample_config switch
Hopefully this will stop people from copying the sample config. I'm so annoyed by all those wrong bug reports...
Add some explanation about this switch
Move check to init
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index 99c2764d22c..9dd50d7b4cf 100644 --- a/lib/base.php +++ b/lib/base.php @@ -574,6 +574,18 @@ class OC { OC_Util::addScript('backgroundjobs'); } } + + // Check whether the sample configuration has been copied + if(OC_Config::getValue('copied_sample_config', false)) { + $l = \OC_L10N::get('lib'); + header('HTTP/1.1 503 Service Temporarily Unavailable'); + header('Status: 503 Service Temporarily Unavailable'); + OC_Template::printErrorPage( + $l->t('Sample configuration detected'), + $l->t('It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php') + ); + return; + } } private static function registerLocalAddressBook() { |