Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#2810 closed Task (fixed)

Refactor Multi Sites plugin to follow Piwik plugin conventions

Reported by: capedfuzz Owned by:
Priority: normal Milestone: 1.x - Piwik 1.x
Component: Core Keywords:
Cc: Sensitive: no


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.

Change History (4)

comment:1 Changed 2 years ago by matt (mattab)

  • Milestone set to 1.x - Piwik 1.x

comment:2 Changed 2 years ago by capedfuzz (diosmosis)

  • Resolution set to fixed
  • Status changed from new to closed

(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.

comment:3 Changed 2 years ago by capedfuzz (diosmosis)

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

comment:4 Changed 2 years ago by matt (mattab)

(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
Note: See TracTickets for help on using tickets.