@mattab opened this Issue on January 21st 2014 Owner

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.
@tsteur commented on February 3rd 2014 Owner

In 883ecc81b96336d3a61fb193af51ecd3fb9b6d91: refs #4563 moved custom logo from config to database

@tsteur commented on February 3rd 2014 Owner

In 0e3592fcb8ab5ae3b9fa6b2a2d31304bf851211d: refs #4563 fix cached version was not used because there are more than 3 entries

@tsteur commented on February 4th 2014 Owner

In e36c5964faa34157f3b01398c997c63918d71897: refs #4563 PrivacyManager Settings should be in Config and Option table, also removed some completely from config as described in ticket

@tsteur commented on February 4th 2014 Owner

In 1d6488271e0db0d926f52e5605e641ed86e67453: refs #4563 make sure getting purge data settings works if UI is disabled

@mattab commented on February 7th 2014 Owner

In e6af5917d7c872ccdbf7479070a2dec486df5558: Refs #4563 Hiding message that config is not writable, when writing to the config file is disabled anyway.

This Issue was closed on February 9th 2014
Powered by GitHub Issue Mirror