Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit b5fbe97

Browse files
committed
Fix date sorting in analytics dashboard as empty values were returning no Date_sortable key.
1 parent 2cdf18c commit b5fbe97

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/plugins/log.sql/class.sqlLogDriver.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,10 @@ public function processQuery($actionName, &$httpVars, &$fileVars){
124124
if(isSet($query["AXIS"]) && $query["AXIS"]["x"] == "Date"){
125125
for($i = 0;$i<$count;$i++){
126126
$dateCurs = $start + $i;
127-
$dateK = date($dKeyFormat, strtotime("-$dateCurs day", $ref));
127+
$timeDate = strtotime("-$dateCurs day", $ref);
128+
$dateK = date($dKeyFormat, $timeDate);
128129
if(!isSet($dKeyFormat[$dateK])){
129-
array_push($all, array("Date" => $dateK));
130+
array_push($all, array("Date" => $dateK, "Date_sortable" => $timeDate));
130131
}
131132
}
132133
}

0 commit comments

Comments
 (0)