From f5669177de1e6b363a3b30aea0aeb58edda21241 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Thu, 12 Mar 2015 10:44:24 +0100 Subject: [PATCH] Unify gravatar --- .../serendipity_event_gravatar.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/serendipity_event_gravatar/serendipity_event_gravatar.php b/plugins/serendipity_event_gravatar/serendipity_event_gravatar.php index 5fae463d..6a00aaa9 100755 --- a/plugins/serendipity_event_gravatar/serendipity_event_gravatar.php +++ b/plugins/serendipity_event_gravatar/serendipity_event_gravatar.php @@ -14,7 +14,7 @@ if (file_exists($probelang)) { include dirname(__FILE__) . '/lang_en.inc.php'; // Actual version of this plugin -@define('PLUGIN_EVENT_GRAVATAR_VERSION', '1.58'); +@define('PLUGIN_EVENT_GRAVATAR_VERSION', '1.59'); // NOTE: This plugin is also in the central repository. Commit changes to the core, too :) // Defines the maximum available method slots in the configuration. @define('PLUGIN_EVENT_GRAVATAR_METHOD_MAX', 6); @@ -438,7 +438,7 @@ class serendipity_event_gravatar extends serendipity_event $title = ''; $author = 'unknown'; if (isset($eventData['author'])) { - $author = serendipity_specialchars($eventData['author']); + $author = (function_exists('serendipity_specialchars') ? serendipity_specialchars($eventData['author']) : htmlspecialchars($eventData['author'], ENT_COMPAT, LANG_CHARSET)); $title = $author; } @@ -778,7 +778,7 @@ class serendipity_event_gravatar extends serendipity_event { // Attempt to grab an avatar link from their webpage url - $linkUrl = serendipity_entity_decode($matches[1]); + $linkUrl = (function_exists('serendipity_entity_decode') ? serendipity_entity_decode($matches[1]) : html_entity_decode($matches[1], ENT_COMPAT, LANG_CHARSET)); if (substr($linkUrl, 0, 1) == '/') { if ($urlParts = parse_url($url)) { $faviconURL = $urlParts['scheme'] . '://' . $urlParts['host'] . $linkUrl;