From cbc8affd3ff4a03efb03c3554be3fd2bb6a45b0d Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Mon, 18 Nov 2024 13:45:16 -0500 Subject: [PATCH 1/4] Ensure current project is selected for new sprints --- .idea/php.xml | 63 +++++++++++++++++++ .../Sprints/Templates/sprintdialog.tpl.php | 20 +++--- 2 files changed, 73 insertions(+), 10 deletions(-) diff --git a/.idea/php.xml b/.idea/php.xml index 2a1af823d..4dfa85b9d 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -240,6 +240,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Domain/Sprints/Templates/sprintdialog.tpl.php b/app/Domain/Sprints/Templates/sprintdialog.tpl.php index fd9a96dff..3aaf76c67 100644 --- a/app/Domain/Sprints/Templates/sprintdialog.tpl.php +++ b/app/Domain/Sprints/Templates/sprintdialog.tpl.php @@ -20,19 +20,19 @@
+ projectId == $projectId || $currentProject == $projectId)) || + (!isset($currentSprint) && $currentProject == $projectId); + } + + $currentProject = session('currentProject'); + ?>
From 99357d001372721773a3614d3a122c2ce9717299 Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Mon, 18 Nov 2024 14:30:24 -0500 Subject: [PATCH 2/4] Deprecate configuration.php file and create backward support --- .gitignore | 2 +- app/Core/Configuration/Environment.php | 7 +++++++ config/configuration.sample.php | 6 ++++-- config/sample.env | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index efa33709b..05a27ade0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ .vscode *.swp -config/configuration.php +config/configuration.php_ resources/logs/* node_modules/* vendor/* diff --git a/app/Core/Configuration/Environment.php b/app/Core/Configuration/Environment.php index 4f7c753ed..06bbe515f 100644 --- a/app/Core/Configuration/Environment.php +++ b/app/Core/Configuration/Environment.php @@ -83,6 +83,13 @@ public function __construct(array $items = []) } $this->phpConfig = new Config; + + $configVars = get_class_vars(Config::class); + foreach (array_keys($configVars) as $propertyName) { + $envVarName = self::LEGACY_MAPPINGS[$propertyName] ?? 'LEAN_'.Str::of($propertyName)->snake()->upper()->toString(); + putenv($envVarName.'='.$configVars[$propertyName]); + } + } /* YAML */ diff --git a/config/configuration.sample.php b/config/configuration.sample.php index 51fa69520..7bce4376a 100644 --- a/config/configuration.sample.php +++ b/config/configuration.sample.php @@ -7,6 +7,8 @@ * Config class * This class is included for backwards compatibility and to be used with subfolder installations * + * @deprecated Please do not use this file to set you configuration. Use the environment file .env instead + * * @see config/sample.env */ class Config @@ -27,9 +29,9 @@ class Config public $defaultTheme = 'default'; //Default theme - public $primarycolor = '#1b75bb'; //Primary Theme color + public $primarycolor = '#006d9f'; //Primary Theme color - public $secondarycolor = '#81B1A8'; //Secondary Theme Color + public $secondarycolor = '#00a886'; //Secondary Theme Color public $defaultTimezone = 'America/Los_Angeles'; //Set default timezone diff --git a/config/sample.env b/config/sample.env index 92fd9493a..ae562c547 100644 --- a/config/sample.env +++ b/config/sample.env @@ -28,7 +28,7 @@ LEAN_DISABLE_LOGIN_FORM = false # If true then don't show the ## Session Management LEAN_SESSION_PASSWORD = '3evBlq9zdUEuzKvVJHWWx3QzsQhturBApxwcws2m' # Salting sessions, replace with a strong password LEAN_SESSION_EXPIRATION = 28800 # How many seconds after inactivity should we logout? 28800seconds = 8hours -LEAN_SESSION_SECURE = true # Cookies only served via https +LEAN_SESSION_SECURE = false # Cookies only served via https ## Look & Feel, these settings are available in the UI and can be overwritten there. LEAN_LOGO_PATH = '/dist/images/logo.svg' # Default logo path, can be changed later From 8ad64a64c0b65b12d41c1091ff420ec4a284a717 Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Mon, 18 Nov 2024 14:32:43 -0500 Subject: [PATCH 3/4] Update .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 05a27ade0..b200fa916 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,8 @@ .vscode *.swp -config/configuration.php_ +config/_configuration.php +config/configuration.php resources/logs/* node_modules/* vendor/* From 1875f07c912e4e1d5f36499ad709c6b8beebb756 Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Mon, 18 Nov 2024 16:03:45 -0500 Subject: [PATCH 4/4] code style fixes --- app/Domain/Sprints/Templates/sprintdialog.tpl.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Domain/Sprints/Templates/sprintdialog.tpl.php b/app/Domain/Sprints/Templates/sprintdialog.tpl.php index 3aaf76c67..de544b92b 100644 --- a/app/Domain/Sprints/Templates/sprintdialog.tpl.php +++ b/app/Domain/Sprints/Templates/sprintdialog.tpl.php @@ -22,13 +22,14 @@ projectId == $projectId || $currentProject == $projectId)) || - (!isset($currentSprint) && $currentProject == $projectId); + (! isset($currentSprint) && $currentProject == $projectId); } - $currentProject = session('currentProject'); - ?> +$currentProject = session('currentProject'); +?>