From a265fde15b6474975f854a8701fb53bdda7f0728 Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Sun, 28 Oct 2012 23:29:15 -0400 Subject: [PATCH] Re-add the deprecated get_/set_favicon() These shouldn't have been removed without deprecating them. Instead, use an external service to handle all of that for us, and throw deprecated errors when people try to use them. --- library/SimplePie.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/library/SimplePie.php b/library/SimplePie.php index aa956931d..ba1719b28 100644 --- a/library/SimplePie.php +++ b/library/SimplePie.php @@ -2911,6 +2911,36 @@ public function get_items($start = 0, $end = 0) } } + /** + * Set the favicon handler + * + * @deprecated Use your own favicon handling instead + */ + public function set_favicon_handler($page = false, $qs = 'i') + { + $level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING; + trigger_error('Favicon handling has been removed, please use your own handling', $level); + return false; + } + + /** + * Get the favicon for the current feed + * + * @deprecated Use your own favicon handling instead + */ + public function get_favicon() + { + $level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING; + trigger_error('Favicon handling has been removed, please use your own handling', $level); + + if (($url = $this->get_link()) !== null) + { + return 'http://g.etfv.co/' . urlencode($url); + } + + return false; + } + /** * Sorting callback for items *