diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-08-19 11:03:57 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-08-19 11:03:57 +0200 |
commit | fdb203ff1eedbad298984ca0670985cea52f619a (patch) | |
tree | bbed013c715aff16a8325aff15a874438988facc /lib/base.php | |
parent | 43266526e8f8169ee4c20a6d6519fd36696ec6f5 (diff) | |
parent | c33d1cacd48809e62b442febe9743424093e0ae8 (diff) | |
download | nextcloud-server-fdb203ff1eedbad298984ca0670985cea52f619a.tar.gz nextcloud-server-fdb203ff1eedbad298984ca0670985cea52f619a.zip |
Merge pull request #10409 from owncloud/iShallNotCopyStuffWithoutThinking
Add a copied_sample_config switch
Diffstat (limited to 'lib/base.php')
-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 1f3c616fb18..f2c66222ef3 100644 --- a/lib/base.php +++ b/lib/base.php @@ -567,6 +567,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() { |