X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=plugins%2Fpubsubhubbub%2Fpubsubhubbub.php;h=8fe6799ce6d00933445a9b7b7f1652dc13387af8;hb=46d3f8162bb7950d3c7fec78ffcc2bdaf349dced;hp=9f0342a37fa376b20cdab8dac2a655c0c178ea5b;hpb=1004742f09b55ff781c13745781b9a7e90986faa;p=github%2Fshaarli%2FShaarli.git diff --git a/plugins/pubsubhubbub/pubsubhubbub.php b/plugins/pubsubhubbub/pubsubhubbub.php index 9f0342a3..8fe6799c 100644 --- a/plugins/pubsubhubbub/pubsubhubbub.php +++ b/plugins/pubsubhubbub/pubsubhubbub.php @@ -11,6 +11,9 @@ use pubsubhubbub\publisher\Publisher; use Shaarli\Config\ConfigManager; +use Shaarli\Feed\FeedBuilder; +use Shaarli\Plugin\PluginManager; +use Shaarli\Render\TemplatePage; /** * Plugin init function - set the hub to the default appspot one. @@ -38,7 +41,7 @@ function pubsubhubbub_init($conf) */ function hook_pubsubhubbub_render_feed($data, $conf) { - $feedType = $data['_PAGE_'] == Router::$PAGE_FEED_RSS ? FeedBuilder::$FEED_RSS : FeedBuilder::$FEED_ATOM; + $feedType = $data['_PAGE_'] == TemplatePage::FEED_RSS ? FeedBuilder::$FEED_RSS : FeedBuilder::$FEED_ATOM; $template = file_get_contents(PluginManager::$PLUGINS_PATH . '/pubsubhubbub/hub.'. $feedType .'.xml'); $data['feed_plugins_header'][] = sprintf($template, $conf->get('plugins.PUBSUBHUB_URL')); @@ -57,8 +60,8 @@ function hook_pubsubhubbub_render_feed($data, $conf) function hook_pubsubhubbub_save_link($data, $conf) { $feeds = array( - index_url($_SERVER) .'?do=atom', - index_url($_SERVER) .'?do=rss', + index_url($_SERVER) .'feed/atom', + index_url($_SERVER) .'feed/rss', ); $httpPost = function_exists('curl_version') ? false : 'nocurl_http_post';