Fix a bug in clickedStatsColor()
The method clickedStatsColor() should return different color codes depending on the percentage of clicks (> 30%, < 30% and > 10%, < 10%). It receives the percentage value as an absolute number. There was a bug in this method where it was checking for values greater than 3, between 3 and 1, and smaller than 1 instead of greater than 30, between 30 and 10, and smaller than 10. [MAILPOET-3324]
This commit is contained in:
@ -271,9 +271,9 @@ class Functions extends AbstractExtension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function clickedStatsColor($clicked) {
|
public function clickedStatsColor($clicked) {
|
||||||
if ($clicked > 3) {
|
if ($clicked > 30) {
|
||||||
return '#7ed321';
|
return '#7ed321';
|
||||||
} elseif ($clicked > 1) {
|
} elseif ($clicked > 10) {
|
||||||
return '#ff9f00';
|
return '#ff9f00';
|
||||||
} else {
|
} else {
|
||||||
return '#f559c3';
|
return '#f559c3';
|
||||||
|
Reference in New Issue
Block a user