First pass of features
This commit is contained in:
+15
-1
@@ -1,6 +1,17 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/env.php';
|
||||
|
||||
$envFile = dirname(__DIR__) . '/.env';
|
||||
if (!file_exists($envFile)) {
|
||||
if (PHP_SAPI === 'cli') {
|
||||
fwrite(STDERR, "Family Hub: .env file not found.\n");
|
||||
fwrite(STDERR, "Open install.php in your browser or copy env.example to .env and edit.\n");
|
||||
exit(1);
|
||||
}
|
||||
header('Location: install.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
// Load environment variables
|
||||
Env::load();
|
||||
|
||||
@@ -31,7 +42,10 @@ define('EXPORT_RETENTION_DAYS', (int)Env::get('EXPORT_RETENTION_DAYS', 30));
|
||||
$TABS = [
|
||||
'chores' => ['title' => 'Chores', 'icon' => 'tasks'],
|
||||
'groceries' => ['title' => 'Grocery List', 'icon' => 'shopping-cart'],
|
||||
'meals' => ['title' => 'Meal Plan', 'icon' => 'utensils']
|
||||
'meals' => ['title' => 'Meal Plan', 'icon' => 'utensils'],
|
||||
'calendar' => ['title' => 'Calendar', 'icon' => 'calendar-days'],
|
||||
'currency' => ['title' => 'Currency', 'icon' => 'coins'],
|
||||
'settings' => ['title' => 'Family settings', 'icon' => 'cog'],
|
||||
];
|
||||
|
||||
// Load local configuration if exists
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ class Env {
|
||||
$envFile = dirname(__DIR__) . '/.env';
|
||||
|
||||
if (!file_exists($envFile)) {
|
||||
throw new Exception('.env file not found. Please create one based on .env.example');
|
||||
throw new Exception('.env file not found. Please create one based on env.example or run install.php');
|
||||
}
|
||||
|
||||
$lines = file($envFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
|
||||
Reference in New Issue
Block a user