Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mattab opened this issue Jan 21, 2014 · 5 comments
Assignees
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Jan 21, 2014

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
Copy link
Member

tsteur commented Feb 3, 2014

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

@tsteur
Copy link
Member

tsteur commented Feb 3, 2014

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

@tsteur
Copy link
Member

tsteur commented Feb 4, 2014

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

@tsteur
Copy link
Member

tsteur commented Feb 4, 2014

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

@mattab
Copy link
Member Author

mattab commented Feb 7, 2014

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

@mattab mattab added this to the 2.1 - Piwik 2.1 milestone Jul 8, 2014
@tsteur tsteur modified the milestones: 2.4.0 - Piwik 2.4.0, 2.1 - Piwik 2.1 Jul 11, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
…Option table, also removed some completely from config as described in ticket
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
… writing to the config file is disabled anyway.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

2 participants