User agents and generators changed to GNU social

This commit is contained in:
Mikael Nordfeldth
2013-11-01 13:28:52 +01:00
parent ca66860a4f
commit 255943d78f
8 changed files with 23 additions and 19 deletions

View File

@@ -158,12 +158,22 @@ class Plugin
$this->log(LOG_DEBUG, $msg);
}
function name()
public function name()
{
$cls = get_class($this);
return mb_substr($cls, 0, -6);
}
public function version()
{
return GNUSOCIAL_VERSION;
}
protected function userAgent() {
return HTTPClient::userAgent()
. ' (' . get_class($this) . ' v' . $this->version() . ')';
}
function onPluginVersion(&$versions)
{
$name = $this->name();