From 0574675ed67db127c24feb4efd5a25ef52e629e4 Mon Sep 17 00:00:00 2001 From: linkai Date: Mon, 26 Apr 2021 12:17:29 +0800 Subject: [PATCH 1/4] Fix:Plugins-share:init.php - site_url is NULL when share atircle by URL form archived --- plugins/share/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/share/init.php b/plugins/share/init.php index 195f9df2a..e4eb1ad3e 100644 --- a/plugins/share/init.php +++ b/plugins/share/init.php @@ -142,7 +142,7 @@ class Share extends Plugin { $line); $enclosures = Article::_get_enclosures($line["id"]); - list ($og_image, $og_stream) = Article::_get_image($enclosures, $line['content'], $line["site_url"], $line); + list ($og_image, $og_stream) = Article::_get_image($enclosures, $line['content'], $line["site_url"] ? $line["site_url"] : "", $line); $content_decoded = html_entity_decode($line["title"], ENT_NOQUOTES | ENT_HTML401); $parsed_updated = TimeHelper::make_local_datetime($line["updated"], true, $owner_uid, true); From acf0e0d266add0566e41b28946ee73fa01022255 Mon Sep 17 00:00:00 2001 From: linkai Date: Tue, 11 May 2021 16:03:18 +0800 Subject: [PATCH 2/4] Fix:Plugins-share:init.php - site_url is NULL when share article by URL from archived --- plugins/share/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/share/init.php b/plugins/share/init.php index e4eb1ad3e..76c539f53 100644 --- a/plugins/share/init.php +++ b/plugins/share/init.php @@ -142,7 +142,7 @@ class Share extends Plugin { $line); $enclosures = Article::_get_enclosures($line["id"]); - list ($og_image, $og_stream) = Article::_get_image($enclosures, $line['content'], $line["site_url"] ? $line["site_url"] : "", $line); + list ($og_image, $og_stream) = Article::_get_image($enclosures, $line['content'], $line["site_url"] ?: "", $line); $content_decoded = html_entity_decode($line["title"], ENT_NOQUOTES | ENT_HTML401); $parsed_updated = TimeHelper::make_local_datetime($line["updated"], true, $owner_uid, true); From f423874e0585699dfc239c8e4187b53a9a3c02da Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 11 May 2021 19:37:31 +0300 Subject: [PATCH 3/4] checking for PDO there is rather useless --- classes/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/config.php b/classes/config.php index 1386b553a..4ae4a2407 100644 --- a/classes/config.php +++ b/classes/config.php @@ -485,7 +485,7 @@ class Config { } // ttrss_users won't be there on initial startup (before migrations are done) - if (!Config::is_migration_needed() && self::get(Config::SINGLE_USER_MODE) && class_exists("PDO")) { + if (!Config::is_migration_needed() && self::get(Config::SINGLE_USER_MODE)) { if (UserHelper::get_login_by_id(1) != "admin") { array_push($errors, "SINGLE_USER_MODE is enabled but default admin account (ID: 1) is not found."); } From 983655165e1e95b38a9ca895dfe9d819d460fcb0 Mon Sep 17 00:00:00 2001 From: linkai Date: Wed, 12 May 2021 09:46:52 +0800 Subject: [PATCH 4/4] Fix:Plugins-share:init.php - site_url is NULL when share article by URL from archived --- plugins/share/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/share/init.php b/plugins/share/init.php index 76c539f53..359d86802 100644 --- a/plugins/share/init.php +++ b/plugins/share/init.php @@ -142,7 +142,7 @@ class Share extends Plugin { $line); $enclosures = Article::_get_enclosures($line["id"]); - list ($og_image, $og_stream) = Article::_get_image($enclosures, $line['content'], $line["site_url"] ?: "", $line); + list ($og_image, $og_stream) = Article::_get_image($enclosures, $line['content'], $line["site_url"] ?? "", $line); $content_decoded = html_entity_decode($line["title"], ENT_NOQUOTES | ENT_HTML401); $parsed_updated = TimeHelper::make_local_datetime($line["updated"], true, $owner_uid, true);