fix label row backgrounds only used when cached data is available
This commit is contained in:
parent
8a06b1dbc2
commit
02195b9d48
|
@ -283,24 +283,28 @@ class Feeds extends Handler_Protected {
|
|||
if ($label_cache) {
|
||||
if ($label_cache["no-labels"] == 1)
|
||||
$labels = array();
|
||||
else {
|
||||
else
|
||||
$labels = $label_cache;
|
||||
if (count($labels) > 0) {
|
||||
$bg = rgb2hsl(_color_unpack($labels[0][3]));
|
||||
if ($bg && $bg[1] > 0) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_array($labels)) $labels = get_article_labels($this->link, $id);
|
||||
|
||||
if (count($labels) > 0) {
|
||||
for ($i = 0; $i < min(4, count($labels)); $i++) {
|
||||
$bg = rgb2hsl(_color_unpack($labels[$i][3]));
|
||||
|
||||
if ($bg && $bg[1] > 0) {
|
||||
$bg[1] = 0.1;
|
||||
$bg[2] = 1;
|
||||
|
||||
$bg = _color_pack(hsl2rgb($bg));
|
||||
$label_row_style = $this->make_gradient($bg, $class);;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_array($labels)) $labels = get_article_labels($this->link, $id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$labels_str = "<span id=\"HLLCTR-$id\">";
|
||||
$labels_str .= format_article_labels($labels, $id);
|
||||
|
|
Loading…
Reference in New Issue