forked from GNUsocial/gnu-social
First steps on converting FeedSub into the pub/sub basis for OStatus communications:
* renamed FeedSub plugin to OStatus * now setting avatar on subscriptions * general fixes for subscription * integrated PuSH hub to handle only user timelines on canonical ID url; sends updates directly * set $config['feedsub']['nohub'] = true to test w/ foreign feeds that don't have hubs (won't actually receive updates though) * a few bits of code documentation * HMAC support for verified distributions (safest if sub setup is on HTTPS) And a couple core changes: * minimizing HTML output for exceptions in API requests to aid in debugging * fix for rel=self link in apitimelineuser when id given This does not not yet include any of the individual subscription management (Salmon notifications for sub/unsub, etc) nor a nice UI for user subscriptions. Needs some further cleanup to treat posts as status updates instead of link references.
This commit is contained in:
@@ -30,6 +30,7 @@ global $config, $_server, $_path;
|
||||
class StatusNet
|
||||
{
|
||||
protected static $have_config;
|
||||
protected static $is_api;
|
||||
|
||||
/**
|
||||
* Configure and instantiate a plugin into the current configuration.
|
||||
@@ -63,7 +64,7 @@ class StatusNet
|
||||
}
|
||||
}
|
||||
if (!class_exists($pluginclass)) {
|
||||
throw new ServerException(500, "Plugin $name not found.");
|
||||
throw new ServerException("Plugin $name not found.", 500);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,6 +148,16 @@ class StatusNet
|
||||
return self::$have_config;
|
||||
}
|
||||
|
||||
public function isApi()
|
||||
{
|
||||
return self::$is_api;
|
||||
}
|
||||
|
||||
public function setApi($mode)
|
||||
{
|
||||
self::$is_api = $mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build default configuration array
|
||||
* @return array
|
||||
|
Reference in New Issue
Block a user