Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-03-19 11:07:29 +0300
committerJoas Schilling <nickvergessen@owncloud.com>2015-03-19 11:07:29 +0300
commit4a13a84cab8d775386fbc26534b009aa42ee79f9 (patch)
treeb0bdc9ff2fa8d1c43cc5ccebfbce884752809aed /tests/preseed-config.php
parent0bed187613915820de1862f8a30e887bfe81f2de (diff)
Do not add apps2/ directory if it does not exist
Diffstat (limited to 'tests/preseed-config.php')
-rw-r--r--tests/preseed-config.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/preseed-config.php b/tests/preseed-config.php
index 3f41573bf29..e2c5a55fa58 100644
--- a/tests/preseed-config.php
+++ b/tests/preseed-config.php
@@ -1,23 +1,23 @@
<?php
-$CONFIG = array (
- "appstoreenabled" => false,
- 'apps_paths' =>
- array (
- 0 =>
- array (
- 'path' => OC::$SERVERROOT.'/apps',
- 'url' => '/apps',
- 'writable' => true,
- ),
- 1 =>
- array (
- 'path' => OC::$SERVERROOT.'/apps2',
- 'url' => '/apps2',
- 'writable' => false,
- )
- ),
-);
+$CONFIG = [
+ 'appstoreenabled' => false,
+ 'apps_paths' => [
+ [
+ 'path' => OC::$SERVERROOT . '/apps',
+ 'url' => '/apps',
+ 'writable' => true,
+ ],
+ ],
+];
-if(substr(strtolower(PHP_OS), 0, 3) == "win") {
- $CONFIG['openssl'] = array( 'config' => OC::$SERVERROOT.'/tests/data/openssl.cnf');
+if (is_dir(OC::$SERVERROOT.'/apps2')) {
+ $CONFIG['apps_paths'][] = [
+ 'path' => OC::$SERVERROOT . '/apps2',
+ 'url' => '/apps2',
+ 'writable' => false,
+ ];
+}
+
+if (substr(strtolower(PHP_OS), 0, 3) === 'win') {
+ $CONFIG['openssl'] = ['config' => OC::$SERVERROOT . '/tests/data/openssl.cnf'];
}