From 498573712b673124cb1b9b83bd27c71125af007a Mon Sep 17 00:00:00 2001 From: Alexis Mousset Date: Mon, 7 Dec 2015 23:57:57 +0100 Subject: [PATCH] Add a database parameter to the bookmark feed url (closes #419) --- controllers/bookmark.php | 6 ++++++ controllers/config.php | 1 + templates/about.php | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/controllers/bookmark.php b/controllers/bookmark.php index d529fa5..622cf28 100644 --- a/controllers/bookmark.php +++ b/controllers/bookmark.php @@ -60,6 +60,12 @@ Router\get_action('bookmarks', function() { // Display bookmark feeds Router\get_action('bookmark-feed', function() { + // Select database if the parameter is set + $database = Request\param('database'); + if (!empty($database)) { + Model\Database\select($database); + } + // Check token $feed_token = Model\Config\get('feed_token'); $request_token = Request\param('token'); diff --git a/controllers/config.php b/controllers/config.php index afaa687..cf3ccd2 100644 --- a/controllers/config.php +++ b/controllers/config.php @@ -201,6 +201,7 @@ Router\get_action('about', function() { Response\html(Template\layout('about', array( 'csrf' => Model\Config\generate_csrf(), 'config' => Model\Config\get_all(), + 'db_name' => Model\Database\select(), 'nb_unread_items' => Model\Item\count_by_status('unread'), 'menu' => 'config', 'title' => t('Preferences') diff --git a/templates/about.php b/templates/about.php index 1ac66f8..4b0b8aa 100644 --- a/templates/about.php +++ b/templates/about.php @@ -16,7 +16,7 @@

@@ -33,4 +33,4 @@
  • - \ No newline at end of file +