diff --git a/config/packages/kimai.yaml b/config/packages/kimai.yaml index 79958f7a4..ce56039b5 100644 --- a/config/packages/kimai.yaml +++ b/config/packages/kimai.yaml @@ -1,6 +1,6 @@ # --------------------------------------------------------------------------------------------- # DO NOT EDIT THIS FILE, INSTEAD CREATE THE FILE "local.yaml" AND ADD YOUR SETTINGS IN THERE. -# See https://www.kimai.org/documentation/configurations.html +# See https://www.kimai.org/documentation/local-yaml.html # # Be aware that this file is YAML format and the indentation is important. # Each config level needs to be indented with 4 additional spaces. @@ -9,19 +9,15 @@ kimai: # -------------------------------------------------------------------------------- # AUTHENTICATION -# You can disable some user management functions in the authentication screens. -# Both settings default to "true", see https://www.kimai.org/documentation/users.html # -------------------------------------------------------------------------------- # user: # registration: false -# password_reset: false +# password_reset: true # -------------------------------------------------------------------------------- # -------------------------------------------------------------------------------- # TIME-TRACKING -# All configs related to time-tracking, timesheets and record management -# Most settings can be configured in the System configuration screen # -------------------------------------------------------------------------------- timesheet: @@ -38,7 +34,6 @@ kimai: # time_increment: ~ # The time-tracking mode that should be used. - # See https://www.kimai.org/documentation/timesheet.html#tracking-modes # mode: default # The default time to pre-fill the "create timesheet" form (in some cases). @@ -51,7 +46,6 @@ kimai: # Rounding rules are used to round the begin & end dates and the duration for timesheet records. # The "default" rule will round "begin" down and "end" up to the full minute, the "duration" will not be rounded. - # Find out more about rounding rules at https://www.kimai.org/documentation/timesheet.html # rounding: # default: # days: ['monday','tuesday','wednesday','thursday','friday','saturday','sunday'] @@ -62,7 +56,6 @@ kimai: # If you want to apply different hourly rates for specific weekdays, you can uncomment the "rates" configuration. # The "weekend" rule will add 50% to each timesheet entry that will be recorded on "saturdays" or "sundays". - # See documentation at: https://www.kimai.org/documentation/timesheet.html#rate-calculation # rates: # weekend: # days: ['saturday','sunday'] @@ -75,18 +68,11 @@ kimai: # and the user has to stop an active entry first # active_entries: # hard_limit: 3 - - # Rules that define timesheet validation and behaviour - # allow_future_times: whether records in the future can be created - # rules: - # allow_future_times: true # -------------------------------------------------------------------------------- # -------------------------------------------------------------------------------- # PERMISSIONS -# Find out more about the configurable permission system at: -# https://www.kimai.org/documentation/permissions.html # -------------------------------------------------------------------------------- permissions: # mapping complex rule sets of single permissions to named "sets" ("set name" = [array of "permissions and sets"]) @@ -146,7 +132,6 @@ kimai: # -------------------------------------------------------------------------------- # CALENDAR Configuration -# See documentation at https://www.kimai.org/documentation/calendar.html # -------------------------------------------------------------------------------- # calendar: # week_numbers: true @@ -184,8 +169,6 @@ kimai: # -------------------------------------------------------------------------------- # DASHBOARD -# Using the configurable widget sections. -# See documentation at https://www.kimai.org/documentation/dashboard.html # -------------------------------------------------------------------------------- dashboard: user_duration: @@ -223,7 +206,6 @@ kimai: # -------------------------------------------------------------------------------- # LANGUAGES -# Locale specific settings, like date formats # -------------------------------------------------------------------------------- languages: cs: diff --git a/src/Constants.php b/src/Constants.php index 27831826a..a22feb533 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -17,11 +17,11 @@ class Constants /** * The current release version */ - public const VERSION = '1.15.1'; + public const VERSION = '1.15.2'; /** * The current release: major * 10000 + minor * 100 + patch */ - public const VERSION_ID = 11501; + public const VERSION_ID = 11502; /** * The current release status, either "stable" or "dev" */ diff --git a/src/Controller/DoctorController.php b/src/Controller/DoctorController.php index c3352b15e..fca4d3e51 100644 --- a/src/Controller/DoctorController.php +++ b/src/Controller/DoctorController.php @@ -9,6 +9,7 @@ namespace App\Controller; +use App\Utils\FileHelper; use Composer\InstalledVersions; use PackageVersions\Versions; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; @@ -40,24 +41,18 @@ class DoctorController extends AbstractController */ public const DIRECTORIES_WRITABLE = [ 'var/cache/', - 'var/data/', 'var/log/', - 'var/sessions/', ]; - /** - * @var string - */ private $projectDirectory; - /** - * @var string - */ private $environment; + private $fileHelper; - public function __construct(string $projectDirectory, string $kernelEnvironment) + public function __construct(string $projectDirectory, string $kernelEnvironment, FileHelper $fileHelper) { $this->projectDirectory = $projectDirectory; $this->environment = $kernelEnvironment; + $this->fileHelper = $fileHelper; } /** @@ -119,6 +114,8 @@ class DoctorController extends AbstractController $versions[$package] = InstalledVersions::getPrettyVersion($package); } } else { + @trigger_error('Please upgrade your Composer to 2.x', E_USER_DEPRECATED); + // @deprecated since 1.14, will be removed with 2.0 $rootPackage = Versions::rootPackageName(); foreach (Versions::VERSIONS as $name => $version) { @@ -155,12 +152,6 @@ class DoctorController extends AbstractController } } - $results['Freetype Support'] = true; - // @see AvatarService::hasDependencies() - if (!\function_exists('imagettfbbox')) { - $results['Freetype Support'] = false; - } - return $results; } @@ -218,20 +209,31 @@ class DoctorController extends AbstractController private function getFilePermissions() { - $results = []; + $testPaths = []; + $baseDir = $this->projectDirectory . DIRECTORY_SEPARATOR; foreach (self::DIRECTORIES_WRITABLE as $path) { - $results[$path] = false; - $fullPath = $this->projectDirectory . '/' . $path; + $fullPath = $baseDir . $path; $fullUri = realpath($fullPath); if ($fullUri === false && !file_exists($fullPath)) { @mkdir($fullPath); + clearstatcache(true); $fullUri = realpath($fullPath); } + $testPaths[] = $fullUri; + } + + $results = []; + $testPaths[] = $this->fileHelper->getDataDirectory(); + foreach ($testPaths as $fullUri) { + $fullUri = rtrim($fullUri, DIRECTORY_SEPARATOR); + $tmp = str_replace($baseDir, '', $fullUri) . DIRECTORY_SEPARATOR; if ($fullUri !== false && is_readable($fullUri) && is_writable($fullUri)) { - $results[$path] = true; + $results[$tmp] = true; + } else { + $results[$tmp] = false; } } diff --git a/src/Migrations/Version20210717211144.php b/src/Migrations/Version20210717211144.php index ab566cd46..9f3f2f039 100644 --- a/src/Migrations/Version20210717211144.php +++ b/src/Migrations/Version20210717211144.php @@ -21,7 +21,7 @@ final class Version20210717211144 extends AbstractMigration { public function getDescription(): string { - return ''; + return 'Adds the account column to the user table'; } public function up(Schema $schema): void diff --git a/templates/embeds/budgets.html.twig b/templates/embeds/budgets.html.twig index 7f2599484..3d4580c78 100644 --- a/templates/embeds/budgets.html.twig +++ b/templates/embeds/budgets.html.twig @@ -119,7 +119,7 @@ <td class="text-nowrap text-right">{{ percentReached|number_format(2) }}%</td> </tr> {% set percentReached = 0 %} - {% if stats.rate > 0 %} + {% if stats.rateBillable > 0 %} {% set percentReached = (stats.internalRate / (stats.rateBillable / 100)) %} {% endif %} <tr>