Browse Source

conditionally WIN and default app configs

euromark 11 years ago
parent
commit
d1bce47c36
2 changed files with 49 additions and 5 deletions
  1. 42 0
      config/app.default.php
  2. 7 5
      config/bootstrap.php

+ 42 - 0
config/app.default.php

@@ -0,0 +1,42 @@
+<?php
+$config = [
+	// Controller pagination
+	'Paginator' => [
+	],
+
+	// Controller pagination
+	'DataPreparation' => [
+		'noTrim' => false
+	],
+
+	// Behaviors
+	'Passwordable' => [
+	],
+	'Reset' => [
+	],
+	'Slugged' => [
+	],
+
+	// Email
+	'Config' => [
+		'systemEmail' => '',
+		'systemName' => '',
+		'adminEmail' => '',
+		'adminName' => '',
+		'xMailer' => '',
+		'live' => false,
+	],
+
+	// Helpers
+	'Format' => [
+		'fontIcons' => array(),
+		'templates' => array()
+	],
+	'Google' => [
+	],
+
+	// Experimental - careful
+	'Entity' => [
+		'autoMarkNew' => false
+	]
+];

+ 7 - 5
config/bootstrap.php

@@ -49,11 +49,13 @@ if (!defined('FORMAT_NICE_YMDHMS')) {
 	define('FORMAT_LOCAL_HMS', '%H:%M:%S');
 }
 
-# Make the app and l10n play nice with Windows.
-if (substr(PHP_OS, 0, 3) === 'WIN') { // || strpos(@php_uname(), 'ARCH')
-	define('WINDOWS', true);
-} else {
-	define('WINDOWS', false);
+// Make the app and L10n play nice with Windows.
+if (!defined('WINDOWS')) {
+	if (DS == '\\' || substr(PHP_OS, 0, 3) === 'WIN') {
+		define('WINDOWS', true);
+	} else {
+		define('WINDOWS', false);
+	}
 }
 
 /**