/program/lib/statisticslib.php - statistics
main entry point for statistics (called from admin.php)
Produce a simple ordered table of pages with # of page views for one area or for all areas the user is allowed to access.
Note: Even though expired pages are no longer visible for visitors, the # of views is still displayed. Pages under embargo are completely suppressed.
check ancestors for embargo
ascend the tree via $parent_id to see if there is an embargo. the quest ends when we reach a top level section (indicated by $id == $parent_id) or a section that was examined before (indicated through the existence of the flag element in the $section). before we start recursing we set that flag just to be sure we don't end up in an endless loop if somehow the tree structure is not sane (contains circular references).
construct an ordered list of pages to show in a statistics report
strategy:
It would be nice if we could simply select $limit records from the database at $offset. Unfortunately we cannot be sure if a page is elegible for display until we have examined the ancestors so we have to retrieve them and perhaps later discard them. oh well, there's room for improvement.
show a menu of available areas
output a menu, starting with an entry to show _all_ available areas, followed by links to individual areas. If there is only a single area, the 'all areas' link is suppressed
Documentation generated on Tue, 28 Jun 2016 19:12:09 +0200 by phpDocumentor 1.4.0