From 7fad6ce6518469e7d99c496a39c03a36288efd11 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 16 Feb 2021 17:07:23 +0300 Subject: [PATCH] move rgb/hsl functions to their own namespace --- classes/feeds.php | 4 ++-- classes/rssutils.php | 2 +- include/colors.php | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/classes/feeds.php b/classes/feeds.php index 43c8bf584..8448d2670 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -322,9 +322,9 @@ class Feeds extends Handler_Protected { if (!isset($rgba_cache[$feed_id])) { if ($fav_color && $fav_color != 'fail') { - $rgba_cache[$feed_id] = _color_unpack($fav_color); + $rgba_cache[$feed_id] = \Colors\_color_unpack($fav_color); } else { - $rgba_cache[$feed_id] = _color_unpack($this->_color_of($line['feed_title'])); + $rgba_cache[$feed_id] = \Colors\_color_unpack($this->_color_of($line['feed_title'])); } } diff --git a/classes/rssutils.php b/classes/rssutils.php index 751cae58e..5fb2e7712 100755 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -610,7 +610,7 @@ class RSSUtils { id = ?"); $sth->execute([$feed]); - $favicon_color = calculate_avg_color($favicon_file); + $favicon_color = \Colors\calculate_avg_color($favicon_file); $favicon_colorstring = ",favicon_avg_color = " . $pdo->quote($favicon_color); diff --git a/include/colors.php b/include/colors.php index 408f5aa9d..a49c63076 100644 --- a/include/colors.php +++ b/include/colors.php @@ -1,4 +1,5 @@