Refactor Multi Sites plugin to follow Piwik plugin conventions #2810

diosmosis opened this Issue Dec 2, 2011 · 3 comments

2 participants

Piwik Open Source Analytics member

The Multi Sites plugin currently works fine, but does not follow Piwik plugin conventions. It does not expose an API class and uses other APIs when it could access data directly from Archive types. Refactoring the plugin will speed it up, clarify the code and allow it to be tested.

Piwik Open Source Analytics member

(In [5626]) Fixes #2810. Refactored MultiSites plugin:

  • Created MultiSites API w/ getAll method that gets visit/action/revenue & related evolution data for all sites.
  • Modified MultiSites Controller to use aforementioned API.
  • Fixed bug I introduced in integration tests, method doTest_TwoVisitors_twoWebsites_differentDays shouldn't allow tests to skip the API.getProcessedReport test.
  • Added mergeChildren & related unit test to Piwik_DataTable_Array.
  • Added static methods to Piwik_Site to get site data using an ID. Using it avoids having to create a new Piwik_Site instance.
  • Modified ColumnCallbackAddColumnQuotient so it can be better extended and so it's possible to avoid processing rows if desired.
Piwik Open Source Analytics member

(In [5627]) Refs #2810, bug in last commit.

Piwik Open Source Analytics member

(In [5740]) Fixes #2600

  • Note: it was already working before, kuddos cappedfuzz for your work!! Refs #2810
  • possible to add All websites dashboard to the PDF/HTML report
  • Only websites with data are displayed. This might raise support questions "Why is website not displayed in All websites in PDF report..." -> should we display all websites including those with 0 visits?
  • Adds sort by visit DESC to ensure data is displayed by visits sorted in the pdf report
@diosmosis diosmosis added this to the 1.x - Piwik 1.x milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment