fix Always-off (on/off/default safe values) + bump emphasis to 1.375em (v1.4.2)

This commit is contained in:
2026-07-08 13:03:35 -03:00
parent d1178bc463
commit 8a97c5cb94
5 changed files with 13 additions and 9 deletions

View File

@@ -9,7 +9,11 @@ use Kanboard\Core\Base;
*
* Resolves the 3-state "emphasize due date" setting for the CURRENT board (read from the route
* project_id, which the router populates for pretty URLs before the layout renders):
* per-board '1' -> on, '0' -> off, 'default'/absent -> follow the LIVE global default.
* per-board 'on' -> on, 'off' -> off, 'default'/absent -> follow the LIVE global default.
*
* The stored values are the non-falsy strings 'on'/'off' (not '1'/'0'): Kanboard's
* MetadataModel::get() uses `?:`, and PHP treats the string "0" as falsy, so a stored "0" would
* come back as the 'default' fallback and "Always off" would never be honored.
*/
class OrganonProjectHelper extends Base
{
@@ -31,11 +35,11 @@ class OrganonProjectHelper extends Base
$value = $this->projectMetadataModel->get($project_id, self::EMPHASIZE_KEY, 'default');
if ($value === '1') {
if ($value === 'on') {
return true;
}
if ($value === '0') {
if ($value === 'off') {
return false;
}