From f1d1d46651140961d6dc9436b3b9c66a2723f896 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 8 Nov 2019 23:11:35 +0100 Subject: Fix CLI bug regarding an empty user (#2646) Fix https://github.com/FreshRSS/FreshRSS/issues/2644 --- cli/_cli.php | 2 +- cli/user-info.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cli') diff --git a/cli/_cli.php b/cli/_cli.php index dec244bc3..4e1188428 100644 --- a/cli/_cli.php +++ b/cli/_cli.php @@ -37,7 +37,7 @@ function cliInitUser($username) { if (FreshRSS_Context::$user_conf == null) { fail('FreshRSS error: invalid configuration for user: ' . $username . "\n"); } - new Minz_ModelPdo($username); + Minz_Session::_param('currentUser', $username); return $username; } diff --git a/cli/user-info.php b/cli/user-info.php index aa4db7c2f..f56bd9aa5 100755 --- a/cli/user-info.php +++ b/cli/user-info.php @@ -43,7 +43,7 @@ if (array_key_exists('header', $options)) { foreach ($users as $username) { $username = cliInitUser($username); - $catDAO = FreshRSS_Factory::createCategoryDao(); + $catDAO = FreshRSS_Factory::createCategoryDao($username); $feedDAO = FreshRSS_Factory::createFeedDao($username); $entryDAO = FreshRSS_Factory::createEntryDao($username); $tagDAO = FreshRSS_Factory::createTagDao($username); -- cgit v1.2.3 From 6a643d180ec7e05deb4d86a4a8d128dda0360345 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 9 Nov 2019 01:47:58 +0100 Subject: Fix CLI install for SQLite (#2648) One forgotten condition. Related to https://github.com/FreshRSS/FreshRSS/pull/2646 and https://github.com/FreshRSS/FreshRSS/pull/2635 --- cli/do-install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/do-install.php b/cli/do-install.php index fa6bac8c8..16ac833ea 100755 --- a/cli/do-install.php +++ b/cli/do-install.php @@ -89,7 +89,7 @@ if (function_exists('opcache_reset')) { Minz_Configuration::register('system', DATA_PATH . '/config.php', FRESHRSS_PATH . '/config.default.php'); FreshRSS_Context::$system_conf = Minz_Configuration::get('system'); -Minz_Session::_param('currentUser', $config['default_user']); +Minz_Session::_param('currentUser', '_'); //Default user $ok = false; try { -- cgit v1.2.3