piwik/piwik — pull request #104 by clearcode (2013-08-29 11:06:31+00:00)
Title: Desktop vs mobile fix

Original issue is: on User settings report, after clicking evolution row for desktop vs mobile report user gets notice "No data for this graph" (checked at demo.piwik.org a minute ago). After debuging I found out that in case of Piwik_DataTable_Array after inserting empty rows, object is populated with separate index for fields. When evolution graph tries to filter out unnecesary columns, it passes original label, which is i.e. Desktop. In normal case (when there is no index) filtering is performed using actual labels (translated). On the other side, when this additional index is present ,it is used to filter out not needed rows. This leads to situation when datatable is being filtered to leave only translated label, but search is performed on untranslated index and this leads to returning of empty datatable. I figured out that the best way to avoid this situation is to block adding empty rows, and therefore additional index is not created. Maybe this isn't the best solution possible, but I'm not quite sure what is this additional index used for in other cases and this fixes Mobile vs Desktop evolution row report.