1.15.2 (#2782)
* fix division by zero * cleanup required directories, check configured data directory, do not check for freetype support * bump version number
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# ---------------------------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------------------------
|
||||||
# DO NOT EDIT THIS FILE, INSTEAD CREATE THE FILE "local.yaml" AND ADD YOUR SETTINGS IN THERE.
|
# 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.
|
# Be aware that this file is YAML format and the indentation is important.
|
||||||
# Each config level needs to be indented with 4 additional spaces.
|
# Each config level needs to be indented with 4 additional spaces.
|
||||||
@@ -9,19 +9,15 @@ kimai:
|
|||||||
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
# AUTHENTICATION
|
# 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:
|
# user:
|
||||||
# registration: false
|
# registration: false
|
||||||
# password_reset: false
|
# password_reset: true
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
# TIME-TRACKING
|
# TIME-TRACKING
|
||||||
# All configs related to time-tracking, timesheets and record management
|
|
||||||
# Most settings can be configured in the System configuration screen
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
timesheet:
|
timesheet:
|
||||||
|
|
||||||
@@ -38,7 +34,6 @@ kimai:
|
|||||||
# time_increment: ~
|
# time_increment: ~
|
||||||
|
|
||||||
# The time-tracking mode that should be used.
|
# The time-tracking mode that should be used.
|
||||||
# See https://www.kimai.org/documentation/timesheet.html#tracking-modes
|
|
||||||
# mode: default
|
# mode: default
|
||||||
|
|
||||||
# The default time to pre-fill the "create timesheet" form (in some cases).
|
# 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.
|
# 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.
|
# 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:
|
# rounding:
|
||||||
# default:
|
# default:
|
||||||
# days: ['monday','tuesday','wednesday','thursday','friday','saturday','sunday']
|
# 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.
|
# 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".
|
# 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:
|
# rates:
|
||||||
# weekend:
|
# weekend:
|
||||||
# days: ['saturday','sunday']
|
# days: ['saturday','sunday']
|
||||||
@@ -75,18 +68,11 @@ kimai:
|
|||||||
# and the user has to stop an active entry first
|
# and the user has to stop an active entry first
|
||||||
# active_entries:
|
# active_entries:
|
||||||
# hard_limit: 3
|
# 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
|
# PERMISSIONS
|
||||||
# Find out more about the configurable permission system at:
|
|
||||||
# https://www.kimai.org/documentation/permissions.html
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
permissions:
|
permissions:
|
||||||
# mapping complex rule sets of single permissions to named "sets" ("set name" = [array of "permissions and sets"])
|
# mapping complex rule sets of single permissions to named "sets" ("set name" = [array of "permissions and sets"])
|
||||||
@@ -146,7 +132,6 @@ kimai:
|
|||||||
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
# CALENDAR Configuration
|
# CALENDAR Configuration
|
||||||
# See documentation at https://www.kimai.org/documentation/calendar.html
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
# calendar:
|
# calendar:
|
||||||
# week_numbers: true
|
# week_numbers: true
|
||||||
@@ -184,8 +169,6 @@ kimai:
|
|||||||
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
# DASHBOARD
|
# DASHBOARD
|
||||||
# Using the configurable widget sections.
|
|
||||||
# See documentation at https://www.kimai.org/documentation/dashboard.html
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
dashboard:
|
dashboard:
|
||||||
user_duration:
|
user_duration:
|
||||||
@@ -223,7 +206,6 @@ kimai:
|
|||||||
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
# LANGUAGES
|
# LANGUAGES
|
||||||
# Locale specific settings, like date formats
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
languages:
|
languages:
|
||||||
cs:
|
cs:
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ class Constants
|
|||||||
/**
|
/**
|
||||||
* The current release version
|
* The current release version
|
||||||
*/
|
*/
|
||||||
public const VERSION = '1.15.1';
|
public const VERSION = '1.15.2';
|
||||||
/**
|
/**
|
||||||
* The current release: major * 10000 + minor * 100 + patch
|
* 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"
|
* The current release status, either "stable" or "dev"
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use App\Utils\FileHelper;
|
||||||
use Composer\InstalledVersions;
|
use Composer\InstalledVersions;
|
||||||
use PackageVersions\Versions;
|
use PackageVersions\Versions;
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
||||||
@@ -40,24 +41,18 @@ class DoctorController extends AbstractController
|
|||||||
*/
|
*/
|
||||||
public const DIRECTORIES_WRITABLE = [
|
public const DIRECTORIES_WRITABLE = [
|
||||||
'var/cache/',
|
'var/cache/',
|
||||||
'var/data/',
|
|
||||||
'var/log/',
|
'var/log/',
|
||||||
'var/sessions/',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $projectDirectory;
|
private $projectDirectory;
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $environment;
|
private $environment;
|
||||||
|
private $fileHelper;
|
||||||
|
|
||||||
public function __construct(string $projectDirectory, string $kernelEnvironment)
|
public function __construct(string $projectDirectory, string $kernelEnvironment, FileHelper $fileHelper)
|
||||||
{
|
{
|
||||||
$this->projectDirectory = $projectDirectory;
|
$this->projectDirectory = $projectDirectory;
|
||||||
$this->environment = $kernelEnvironment;
|
$this->environment = $kernelEnvironment;
|
||||||
|
$this->fileHelper = $fileHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -119,6 +114,8 @@ class DoctorController extends AbstractController
|
|||||||
$versions[$package] = InstalledVersions::getPrettyVersion($package);
|
$versions[$package] = InstalledVersions::getPrettyVersion($package);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@trigger_error('Please upgrade your Composer to 2.x', E_USER_DEPRECATED);
|
||||||
|
|
||||||
// @deprecated since 1.14, will be removed with 2.0
|
// @deprecated since 1.14, will be removed with 2.0
|
||||||
$rootPackage = Versions::rootPackageName();
|
$rootPackage = Versions::rootPackageName();
|
||||||
foreach (Versions::VERSIONS as $name => $version) {
|
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;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,20 +209,31 @@ class DoctorController extends AbstractController
|
|||||||
|
|
||||||
private function getFilePermissions()
|
private function getFilePermissions()
|
||||||
{
|
{
|
||||||
$results = [];
|
$testPaths = [];
|
||||||
|
$baseDir = $this->projectDirectory . DIRECTORY_SEPARATOR;
|
||||||
|
|
||||||
foreach (self::DIRECTORIES_WRITABLE as $path) {
|
foreach (self::DIRECTORIES_WRITABLE as $path) {
|
||||||
$results[$path] = false;
|
$fullPath = $baseDir . $path;
|
||||||
$fullPath = $this->projectDirectory . '/' . $path;
|
|
||||||
$fullUri = realpath($fullPath);
|
$fullUri = realpath($fullPath);
|
||||||
|
|
||||||
if ($fullUri === false && !file_exists($fullPath)) {
|
if ($fullUri === false && !file_exists($fullPath)) {
|
||||||
@mkdir($fullPath);
|
@mkdir($fullPath);
|
||||||
|
clearstatcache(true);
|
||||||
$fullUri = realpath($fullPath);
|
$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)) {
|
if ($fullUri !== false && is_readable($fullUri) && is_writable($fullUri)) {
|
||||||
$results[$path] = true;
|
$results[$tmp] = true;
|
||||||
|
} else {
|
||||||
|
$results[$tmp] = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ final class Version20210717211144 extends AbstractMigration
|
|||||||
{
|
{
|
||||||
public function getDescription(): string
|
public function getDescription(): string
|
||||||
{
|
{
|
||||||
return '';
|
return 'Adds the account column to the user table';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema): void
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
<td class="text-nowrap text-right">{{ percentReached|number_format(2) }}%</td>
|
<td class="text-nowrap text-right">{{ percentReached|number_format(2) }}%</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% set percentReached = 0 %}
|
{% set percentReached = 0 %}
|
||||||
{% if stats.rate > 0 %}
|
{% if stats.rateBillable > 0 %}
|
||||||
{% set percentReached = (stats.internalRate / (stats.rateBillable / 100)) %}
|
{% set percentReached = (stats.internalRate / (stats.rateBillable / 100)) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user