We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 365b0b1e authored by Evan Prodromou's avatar Evan Prodromou

use standard plugin configuration for PubSubHubBub

parent 7679f058
...@@ -37,20 +37,13 @@ require_once(INSTALLDIR.'/plugins/PubSubHubBub/publisher.php'); ...@@ -37,20 +37,13 @@ require_once(INSTALLDIR.'/plugins/PubSubHubBub/publisher.php');
class PubSubHubBubPlugin extends Plugin class PubSubHubBubPlugin extends Plugin
{ {
private $hub; public $hub = DEFAULT_HUB;
function __construct() function __construct()
{ {
parent::__construct(); parent::__construct();
} }
function onInitializePlugin(){
$this->hub = common_config('PubSubHubBub', 'hub');
if(empty($this->hub)){
$this->hub = DEFAULT_HUB;
}
}
function onStartApiAtom($action){ function onStartApiAtom($action){
$action->element('link',array('rel'=>'hub','href'=>$this->hub),null); $action->element('link',array('rel'=>'hub','href'=>$this->hub),null);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment