From 7b2ba6ef820335df682fbe3dcfaceef3a62cf4a5 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Mon, 18 May 2020 17:17:36 +0200 Subject: RSS/ATOM feeds: process through Slim controller --- plugins/pubsubhubbub/pubsubhubbub.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/pubsubhubbub/pubsubhubbub.php') diff --git a/plugins/pubsubhubbub/pubsubhubbub.php b/plugins/pubsubhubbub/pubsubhubbub.php index 2878c050..41634dda 100644 --- a/plugins/pubsubhubbub/pubsubhubbub.php +++ b/plugins/pubsubhubbub/pubsubhubbub.php @@ -60,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'; -- cgit v1.2.3 From 9c75f877935fa6adec951a4d8d32b328aaab314f Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 13 Jun 2020 13:08:01 +0200 Subject: Use multi-level routes for existing controllers instead of 1 level everywhere Also prefix most admin routes with /admin/ --- plugins/pubsubhubbub/pubsubhubbub.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/pubsubhubbub/pubsubhubbub.php') diff --git a/plugins/pubsubhubbub/pubsubhubbub.php b/plugins/pubsubhubbub/pubsubhubbub.php index 41634dda..170f3494 100644 --- a/plugins/pubsubhubbub/pubsubhubbub.php +++ b/plugins/pubsubhubbub/pubsubhubbub.php @@ -60,8 +60,8 @@ function hook_pubsubhubbub_render_feed($data, $conf) function hook_pubsubhubbub_save_link($data, $conf) { $feeds = array( - index_url($_SERVER) .'feed-atom', - index_url($_SERVER) .'feed-rss', + index_url($_SERVER) .'feed/atom', + index_url($_SERVER) .'feed/rss', ); $httpPost = function_exists('curl_version') ? false : 'nocurl_http_post'; -- cgit v1.2.3 From 1a8ac737e52cb25a5c346232ee398f5908cee7d7 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Mon, 6 Jul 2020 08:04:35 +0200 Subject: Process main page (linklist) through Slim controller Including a bunch of improvements on the container, and helper used across new controllers. --- plugins/pubsubhubbub/pubsubhubbub.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/pubsubhubbub/pubsubhubbub.php') diff --git a/plugins/pubsubhubbub/pubsubhubbub.php b/plugins/pubsubhubbub/pubsubhubbub.php index 170f3494..8fe6799c 100644 --- a/plugins/pubsubhubbub/pubsubhubbub.php +++ b/plugins/pubsubhubbub/pubsubhubbub.php @@ -13,7 +13,7 @@ use pubsubhubbub\publisher\Publisher; use Shaarli\Config\ConfigManager; use Shaarli\Feed\FeedBuilder; use Shaarli\Plugin\PluginManager; -use Shaarli\Router; +use Shaarli\Render\TemplatePage; /** * Plugin init function - set the hub to the default appspot one. @@ -41,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')); -- cgit v1.2.3