// Based on https://github.com/indieweb/mention-client-php
// which is licensed Apache 2.0
- function getWebmention($result) {
+ function getWebmention(Auth_Yadis_HTTPFetcher $result) {
// XXX: the fetcher only gives back one of each header, so this may fail on multiple Link headers
if(preg_match('~<((?:https?://)?[^>]+)>; rel="webmention"~', $result->headers['Link'], $match)) {
return $match[1];
}
}
- function getPingback($result) {
+ function getPingback(Auth_Yadis_HTTPFetcher $result) {
if (array_key_exists('X-Pingback', $result->headers)) {
return $result->headers['X-Pingback'];
} else if(preg_match('/<(?:link|a)[ ]+href="([^"]+)"[ ]+rel="[^" ]* ?pingback ?[^" ]*"[ ]*\/?>/i', $result->body, $match)
// Largely cadged from trackback_cls.php by
// Ran Aroussi <ran@blogish.org>, GPL2 or any later version
// http://phptrackback.sourceforge.net/
- function getTrackback($result)
+ function getTrackback(Auth_Yadis_HTTPFetcher $result)
{
$text = $result->body;
$url = $result->final_url;
return true;
}
- function onEndAccountSettingsNav($action)
+ function onEndAccountSettingsNav(Action $action)
{
$action_name = $action->trimmed('action');