Closed (fixed)
Project:
Entity API
Version:
7.x-1.x-dev
Component:
Core integration
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 May 2011 at 07:47 UTC
Updated:
13 Jun 2011 at 18:11 UTC
Hi,
I was investigating how to add support for the statistics core module, when I figured out that files already exists that attempted this. These were however never used..
So first I tried just adding 'statistics' to _entity_metadata_core_modules. This got the fields, but data wasn't returned correctly, so I turned to look at entity_metadata_statistics_node_get_properties. This didn't provide default-values (statistics_get returns NULL if no statistics were found for the node), and also the properties were wrong (dayviews vs daycount).
I've attached a patch that fixes entity_metadata_statistics_node_get_properties, and enables statistics in _entity_metadata_core_modules.
-Morten
| Comment | File | Size | Author |
|---|---|---|---|
| fix_statistics_support.patch | 1.79 KB | fangel |
Comments
Comment #1
fagoOh, indeed that code does not seem to be used at all.
I've fixed the code style issues in your patch (missing spaces) + committed it. Thanks.
Comment #2
fangel commentedJust for the record, what was the code style issues (so I can improve my patch-foo :))
Comment #3
fagoarray('totalcount'=>0, 'daycount'=>0, 'timestamp'=>NULL);
should be
Comment #4
fangel commentedSweet. So I wasn't totally off in my style :)