diff options
author | msquare <msquare@notrademark.de> | 2017-11-28 15:43:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 15:43:51 +0100 |
commit | 599f2fd264bfc7b1b6826fe206442806e317340f (patch) | |
tree | 50cf84d7d07d11bd65b45c2c17f37632f6cd8eff /config | |
parent | a5fc5bd0979e8de1fce8a8addd351a6e7bd6aeb8 (diff) | |
parent | eda7f7788ea8012bd8be46405c56a666c11f3fa5 (diff) |
Merge pull request #365 from engelsystem/feature-igel-rewrite
Feature igel rewrite
Diffstat (limited to 'config')
-rw-r--r-- | config/app.php | 17 | ||||
-rw-r--r-- | config/config.default.php | 189 |
2 files changed, 139 insertions, 67 deletions
diff --git a/config/app.php b/config/app.php new file mode 100644 index 00000000..74eb2991 --- /dev/null +++ b/config/app.php @@ -0,0 +1,17 @@ +<?php + +// Application config + +return [ + // Service providers + 'providers' => [ + \Engelsystem\Logger\LoggerServiceProvider::class, + \Engelsystem\Exceptions\ExceptionsServiceProvider::class, + \Engelsystem\Config\ConfigServiceProvider::class, + \Engelsystem\Routing\RoutingServiceProvider::class, + \Engelsystem\Renderer\RendererServiceProvider::class, + \Engelsystem\Database\DatabaseServiceProvider::class, + \Engelsystem\Http\RequestServiceProvider::class, + \Engelsystem\Http\SessionServiceProvider::class, + ], +]; diff --git a/config/config.default.php b/config/config.default.php index 59f7bbc6..7594346a 100644 --- a/config/config.default.php +++ b/config/config.default.php @@ -1,70 +1,125 @@ <?php -// Enable maintenance mode (showin a static page) -$maintenance_mode = false; - -// URL to the angel faq and job description -$faq_url = "https://events.ccc.de/congress/2013/wiki/Static:Volunteers"; - -// contact email address, linked on every page -$contact_email = "mailto:ticket@c3heaven.de"; -$no_reply_email = "noreply@engelsystem.de"; - -// Default-Theme auf der Startseite, 1=style1.css usw. -$default_theme = 1; - -// Anzahl der News, die auf einer Seite ausgeben werden koennen... -$DISPLAY_NEWS = 6; - -// Anzahl Stunden bis zum Austragen eigener Schichten -$LETZTES_AUSTRAGEN = 3; - -// Setzt den zu verwendenden Crypto-Algorismus (entsprechend der Dokumentation von crypt()). -// Falls ein Benutzerpasswort in einem anderen Format gespeichert ist, -// wird es bei der ersten Benutzung des Klartext-Passworts in das neue Format -// konvertiert. -// $crypt_alg = '$1'; // MD5 -// $crypt_alg = '$2y$13'; // Blowfish -// $crypt_alg = '$5$rounds=5000'; // SHA-256 -$crypt_alg = '$6$rounds=5000'; // SHA-512 - -$min_password_length = 8; - -// Wenn Engel beim Registrieren oder in ihrem Profil eine T-Shirt Größe angeben sollen, auf true setzen: -$enable_tshirt_size = true; - -// Number of shifts to freeload until angel is locked for shift signup. -$max_freeloadable_shifts = 2; - -// local timezone -date_default_timezone_set("Europe/Berlin"); - -// multiply "night shifts" and freeloaded shifts (start or end between 2 and 6 exclusive) by 2 -$shift_sum_formula = "SUM( - (1+( - (HOUR(FROM_UNIXTIME(`Shifts`.`end`)) > 2 AND HOUR(FROM_UNIXTIME(`Shifts`.`end`)) < 6) - OR (HOUR(FROM_UNIXTIME(`Shifts`.`start`)) > 2 AND HOUR(FROM_UNIXTIME(`Shifts`.`start`)) < 6) - OR (HOUR(FROM_UNIXTIME(`Shifts`.`start`)) <= 2 AND HOUR(FROM_UNIXTIME(`Shifts`.`end`)) >= 6) - ))*(`Shifts`.`end` - `Shifts`.`start`)*(1 - 3 * `ShiftEntry`.`freeloaded`) -)"; - -// voucher calculation -$voucher_settings = [ - "initial_vouchers" => 2, - "shifts_per_voucher" => 1 +// To change settings create a config.php + +return [ + // MySQL-Connection Settings + 'database' => [ + 'host' => env('MYSQL_HOST', (env('CI', false) ? 'mariadb' : 'localhost')), + 'user' => env('MYSQL_USER', 'root'), + 'pw' => env('MYSQL_PASSWORD', ''), + 'db' => env('MYSQL_DATABASE', 'engelsystem'), + ], + + // For accessing stats + 'api_key' => '', + + // Enable maintenance mode (show a static page) + 'maintenance' => false, + + // Set to development to enable debugging messages + 'environment' => 'production', + + // URL to the angel faq and job description + 'faq_url' => 'https://events.ccc.de/congress/2013/wiki/Static:Volunteers', + + // Contact email address, linked on every page + 'contact_email' => 'mailto:ticket@c3heaven.de', + + // From address of all emails + 'no_reply_email' => 'noreply@engelsystem.de', + + // Default theme, 1=style1.css + 'theme' => 1, + + // Available themes + 'available_themes' => [ + '4' => 'Engelsystem 33c3 (2016)', + '3' => 'Engelsystem 32c3 (2015)', + '2' => 'Engelsystem cccamp15', + '0' => 'Engelsystem light', + '1' => 'Engelsystem dark' + ], + + // Number of News shown on one site + 'display_news' => 6, + + // Users are able to sign up + 'registration_enabled' => true, + + // Only arrived angels can sign up for shifts + 'signup_requires_arrival' => false, + + // Anzahl Stunden bis zum Austragen eigener Schichten + 'last_unsubscribe' => 3, + + // Setzt den zu verwendenden Crypto-Algorithmus (entsprechend der Dokumentation von crypt()). + // Falls ein Benutzerpasswort in einem anderen Format gespeichert ist, + // wird es bei der ersten Benutzung des Klartext-Passworts in das neue Format + // konvertiert. + // MD5 '$1' + // Blowfish '$2y$13' + // SHA-256 '$5$rounds=5000' + // SHA-512 '$6$rounds=5000' + 'crypt_alg' => '$6$rounds=5000', + + 'min_password_length' => 8, + + // Wenn Engel beim Registrieren oder in ihrem Profil eine T-Shirt Größe angeben sollen, auf true setzen: + 'enable_tshirt_size' => true, + + // Number of shifts to freeload until angel is locked for shift signup. + 'max_freeloadable_shifts' => 2, + + // local timezone + 'timezone' => 'Europe/Berlin', + + // weigh every shift the same + //'shift_sum_formula' => 'SUM(`end` - `start`)', + + // Multiply 'night shifts' and freeloaded shifts (start or end between 2 and 6 exclusive) by 2 + 'shift_sum_formula' => ' + SUM( + (1 + + ( + (HOUR(FROM_UNIXTIME(`Shifts`.`end`)) > 2 AND HOUR(FROM_UNIXTIME(`Shifts`.`end`)) < 6) + OR (HOUR(FROM_UNIXTIME(`Shifts`.`start`)) > 2 AND HOUR(FROM_UNIXTIME(`Shifts`.`start`)) < 6) + OR (HOUR(FROM_UNIXTIME(`Shifts`.`start`)) <= 2 AND HOUR(FROM_UNIXTIME(`Shifts`.`end`)) >= 6) + ) + ) + * (`Shifts`.`end` - `Shifts`.`start`) + * (1 - 3 * `ShiftEntry`.`freeloaded`) + ) + ', + + // Voucher calculation + 'voucher_settings' => [ + 'initial_vouchers' => 2, + 'shifts_per_voucher' => 1, + ], + + // Available locales in /locale/ + 'locales' => [ + 'de_DE.UTF-8' => 'Deutsch', + 'en_US.UTF-8' => 'English', + ], + + 'default_locale' => 'en_US.UTF-8', + + // Available T-Shirt sizes, set value to null if not available + 'tshirt_sizes' => [ + '' => _('Please select...'), + 'S' => 'S', + 'M' => 'M', + 'L' => 'L', + 'XL' => 'XL', + '2XL' => '2XL', + '3XL' => '3XL', + '4XL' => '4XL', + '5XL' => '5XL', + 'S-G' => 'S Girl', + 'M-G' => 'M Girl', + 'L-G' => 'L Girl', + 'XL-G' => 'XL Girl', + ], ]; - -// weigh every shift the same -// $shift_sum_formula = "SUM(`end` - `start`)"; - -// For accessing stats -$api_key = ""; - -// MySQL-Connection Settings -$config = [ - 'host' => "localhost", - 'user' => "root", - 'pw' => "", - 'db' => "engelsystem" -]; -?> |