Permalink
Browse files

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.
  • Loading branch information...
1 parent 152ff5d commit a265fde15b6474975f854a8701fb53bdda7f0728 @rmccue rmccue committed Oct 29, 2012
Showing with 30 additions and 0 deletions.
  1. +30 −0 library/SimplePie.php
View
@@ -2912,6 +2912,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
*
* @access private

0 comments on commit a265fde

Please sign in to comment.