mirror of
https://github.com/cosmocode/dokuwiki-plugin-statdisplay.git
synced 2025-07-23 00:51:10 +00:00
properly sort the data by date/time
This commit is contained in:
@ -111,7 +111,9 @@ class helper_plugin_statdisplay_graph extends DokuWiki_Plugin {
|
||||
$media = array();
|
||||
$visitors = array();
|
||||
|
||||
foreach(array_keys((array) $data['hits'][$by]) as $idx) {
|
||||
$keys = array_keys((array) $data['hits'][$by]);
|
||||
sort($keys);
|
||||
foreach($keys as $idx) {
|
||||
$times[] = $idx;
|
||||
$pages[] = $data['page'][$by][$idx]['count'];
|
||||
$media[] = $data['media'][$by][$idx]['count'];
|
||||
|
@ -30,6 +30,7 @@ class helper_plugin_statdisplay_log extends DokuWiki_Plugin {
|
||||
$this->logcache = getCacheName($this->getConf('accesslog'), '.statdisplay');
|
||||
if(file_exists($this->logcache)) {
|
||||
$this->logdata = unserialize(io_readFile($this->logcache, false));
|
||||
ksort($this->logdata);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,9 @@ class helper_plugin_statdisplay_table extends DokuWiki_Plugin {
|
||||
$this->head($this->getLang('traffic'), 2);
|
||||
$this->R->tablerow_close();
|
||||
|
||||
foreach(array_keys((array) $data['hits'][$by]) as $idx) {
|
||||
$keys = array_keys((array) $data['hits'][$by]);
|
||||
sort($keys);
|
||||
foreach($keys as $idx) {
|
||||
$this->R->tablerow_open();
|
||||
$this->hcell($idx);
|
||||
|
||||
|
Reference in New Issue
Block a user