Moved the `tmp/` path into the config (was hardcoded everywhere)
The `tmp/` path was hardcoded everywhere, which resulted in using `SettingsPiwik::rewriteTmpPathWithInstanceId()` to rewrite it for specific use cases. I've moved that path into the config, and replaced all hardcoded usage (and calls to `rewriteTmpPathWithInstanceId()`) by a `get()` from the container. Getting entries from the container is a bad practice and dependency injection should be preferred, but we do baby steps. When refactoring those classes to DI, we'll replace calls to the container with proper dependency injection. Another thing we'll need to do too is move the hardcoded *sub-path* of `tmp/` (e.g. `tmp/sessions/`) into the config also (but again: baby steps). Another future step would be to remove completely instance ID and let it be handled by a plugin (or by end-user config). Having the `tmp/` path in the config means that plugins or users can override it and know it will be taken into account everywhere in Piwik.
parent
c831518f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Affichage de
- CHANGELOG.md 8 ajouts, 0 suppressionCHANGELOG.md
- config/global.php 19 ajouts, 0 suppressionconfig/global.php
- core/AssetManager.php 2 ajouts, 2 suppressionscore/AssetManager.php
- core/CacheFile.php 2 ajouts, 2 suppressionscore/CacheFile.php
- core/CliMulti.php 2 ajouts, 2 suppressionscore/CliMulti.php
- core/Db/BatchInsert.php 2 ajouts, 3 suppressionscore/Db/BatchInsert.php
- core/Filechecks.php 0 ajout, 4 suppressionscore/Filechecks.php
- core/Filesystem.php 2 ajouts, 1 suppressioncore/Filesystem.php
- core/FrontController.php 8 ajouts, 6 suppressionscore/FrontController.php
- core/Log.php 8 ajouts, 7 suppressionscore/Log.php
- core/Profiler.php 2 ajouts, 1 suppressioncore/Profiler.php
- core/ReportRenderer.php 2 ajouts, 2 suppressionscore/ReportRenderer.php
- core/Session.php 4 ajouts, 4 suppressionscore/Session.php
- core/SettingsPiwik.php 3 ajouts, 8 suppressionscore/SettingsPiwik.php
- core/Translate/Writer.php 2 ajouts, 1 suppressioncore/Translate/Writer.php
- core/Twig.php 2 ajouts, 2 suppressionscore/Twig.php
- misc/cron/updatetoken.php 3 ajouts, 3 suppressionsmisc/cron/updatetoken.php
- plugins/CoreConsole/Commands/WatchLog.php 2 ajouts, 3 suppressionsplugins/CoreConsole/Commands/WatchLog.php
- plugins/CorePluginsAdmin/PluginInstaller.php 10 ajouts, 9 suppressionsplugins/CorePluginsAdmin/PluginInstaller.php
- plugins/CoreUpdater/Controller.php 6 ajouts, 7 suppressionsplugins/CoreUpdater/Controller.php
Chargement en cours
Veuillez vous inscrire ou vous se connecter pour commenter