Skip to content

Commit

Permalink
Re-add the deprecated get_/set_favicon()
Browse files Browse the repository at this point in the history
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
rmccue committed Oct 29, 2012
1 parent 152ff5d commit a265fde
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions library/SimplePie.php
Expand Up @@ -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
*
Expand Down

0 comments on commit a265fde

Please sign in to comment.