summaryrefslogtreecommitdiff
path: root/include/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions.php')
-rwxr-xr-xinclude/functions.php31
1 files changed, 21 insertions, 10 deletions
diff --git a/include/functions.php b/include/functions.php
index 1ff18c8bb..5c1ad1c37 100755
--- a/include/functions.php
+++ b/include/functions.php
@@ -1107,9 +1107,6 @@
$params['simple_update'] = defined('SIMPLE_UPDATE_MODE') && SIMPLE_UPDATE_MODE;
- $params["icon_alert"] = base64_img("images/alert.png");
- $params["icon_information"] = base64_img("images/information.png");
- $params["icon_cross"] = base64_img("images/cross.png");
$params["icon_indicator_white"] = base64_img("images/indicator_white.gif");
$params["labels"] = Labels::get_all_labels($_SESSION["uid"]);
@@ -1963,17 +1960,31 @@
}
function get_score_pic($score) {
- if ($score > 100) {
- return "score_high.png";
+ if ($score > 500) {
+ return "trending_up";
} else if ($score > 0) {
- return "score_half_high.png";
+ return "trending_up";
+ } else if ($score < 0) {
+ return "trending_down";
+ } else {
+ return "trending_neutral";
+ }
+ }
+
+ function get_score_class($score) {
+ if ($score > 500) {
+ $score_class = "score-high";
+ } else if ($score > 0) {
+ $score_class = "score-half-high";
} else if ($score < -100) {
- return "score_low.png";
+ $score_class = "score-low";
} else if ($score < 0) {
- return "score_half_low.png";
+ $score_class = "score-half-low";
} else {
- return "score_neutral.png";
+ $score_class = "score-neutral";
}
+
+ return $score_class;
}
function init_plugins() {
@@ -2431,7 +2442,7 @@
}
function theme_valid($theme) {
- $bundled_themes = [ "default.php", "night.css", "compact.css" ];
+ $bundled_themes = [ "night.css", "compact.css" ];
if (in_array($theme, $bundled_themes)) return true;