aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
authorGravatar berumuron <dev@marienfressinaud.fr> 2023-01-18 10:12:21 +0100
committerGravatar GitHub <noreply@github.com> 2023-01-18 10:12:21 +0100
commitdaaa391e33c5d92e3dd91bb0b81ac420abed7097 (patch)
treea3263c26ac90fb3115627e156eba580826acfd4f /lib/lib_rss.php
parent216e39c3cc43061686981b96328796765d264d29 (diff)
tec: Update the lib_opml (#4403)
* fix: Fix undefined GLOB_BRACE on Alpine The manual states that: > Note: The GLOB_BRACE flag is not available on some non GNU systems, > like Solaris or Alpine Linux. This generated an error on Alpine. Reference: https://www.php.net/manual/function.glob.php * fix: List details of feeds for OPML exportation The details are necessary to export the XPath information, the CSS full content path and read actions filters. * Update LibOpml to 0.4.0 * Refactor OPML importation to be more robust First, it fixes two regressions introduced by the update of lib_opml: - title attribute is used when text attribute is missing; - the OPML category attribute is used as a fallback for feeds categories. In a related way, if also fixes a problem when a feed had both a parent category outline and a category attribute. Before, it only considered the attribute as its category, but now it considers the parent outline. Then, it counts category limit correctly by not increasing `$nb_categories` if the category already exists. * Exclude lib_opml from the CodeSniffer * Fix variable names when logging some errors * Fix catch of LibOpml Exception * Make sure to declare the category * Exclude lib_opml from PHPStan analyze * Disable markdownlint for lib_opml * Fix typos * Use auto-loading and allow updates via Composer * Fix broken links to lib_opml * Bring back the ability to import the OPML frss:opmlUrl attribute * Refactor the logs of OPML errors * Update lib_opml to the version 0.5.0 Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'lib/lib_rss.php')
-rw-r--r--lib/lib_rss.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index cbdfff773..e5362bc5c 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -57,6 +57,11 @@ function classAutoloader($class) {
$base_dir = LIB_PATH . '/phpgt/cssxpath/src/';
$relative_class_name = substr($class, strlen($prefix));
require $base_dir . str_replace('\\', '/', $relative_class_name) . '.php';
+ } elseif (str_starts_with($class, 'marienfressinaud\\LibOpml\\')) {
+ $prefix = 'marienfressinaud\\LibOpml\\';
+ $base_dir = LIB_PATH . '/marienfressinaud/lib_opml/src/LibOpml/';
+ $relative_class_name = substr($class, strlen($prefix));
+ require $base_dir . str_replace('\\', '/', $relative_class_name) . '.php';
} elseif (str_starts_with($class, 'PHPMailer\\PHPMailer\\')) {
$prefix = 'PHPMailer\\PHPMailer\\';
$base_dir = LIB_PATH . '/phpmailer/phpmailer/src/';