Skip to content

PrivacyManager settings + Custom logo should be stored using Option:: rather than in config file #4563

@mattab

Description

@mattab

For consistency, it would be nice if the PrivacyManager plugin + Custom logo ([Branding] section) stored its data in the DB rather than in the config file.

The ultimate goal is to make Piwik not need to write to the config file during normal operations.

  1. Create global config entries for the following settings:
  2. delete_logs_max_rows_per_query
  3. delete_reports_enable
  4. delete_reports_older_than
  5. delete_reports_keep_basic_metrics
  6. delete_reports_keep_day_reports
  7. delete_reports_keep_week_reports
  8. delete_reports_keep_month_reports
  9. delete_reports_keep_year_reports
  10. delete_reports_keep_range_reports
  11. delete_reports_keep_segment_reports
  12. Read the following settings from config instead of option if delete old data admin UI is disabled
  13. delete_logs_enable
  14. delete_logs_schedule_lowest_interval
  15. delete_logs_older_than
  16. delete_logs_max_rows_per_query
  17. delete_reports_enable
  18. delete_reports_older_than
  19. delete_reports_keep_basic_metrics
  20. delete_reports_keep_day_reports
  21. delete_reports_keep_week_reports
  22. delete_reports_keep_month_reports
  23. delete_reports_keep_year_reports
  24. delete_reports_keep_range_reports
  25. delete_reports_keep_segment_reports

The values from the option table should overwrite the values from the config in case the delete old data admin UI is enabled. It should not be possible to set a value in the option table while the delete old data admin UI is disabled.

  1. Migrate entries from config to option database table:
  2. Following config settings to be stored in the DB using Option::set and Option::get
  3. Upgrade: convert config file values to the new format in db. Then explicitely remove the settings from config file.
  4. Values are cached in the file tmp/cache/tracker/ file for fast access during tracker mode using the existing hook to add to cache/tracker/x.php in case they are used during the tracker process

Here are the config settings that, should be removed in favor of Option::

  • use_anonymized_ip_for_visit_enrichment
  • ip_address_mask_length
  • [Branding] use_custom_logo

Note:

  • The "enabled" setting is already using Option:: mechanism.

Metadata

Metadata

Assignees

Labels

TaskIndicates an issue is neither a feature nor a bug and it's purely a "technical" change.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions