From 372a4f1b2e8a3b4adbc946f4a3d20705661dc9ed Mon Sep 17 00:00:00 2001 From: justinhunt Date: Fri, 13 Oct 2023 07:24:27 +0000 Subject: [PATCH] changed callback declaration because php8.2 doesnt like self: --- CHANGES.txt | 6 +++++- filter.php | 8 ++++---- version.php | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index bbad4e30..23aec634 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,8 +1,12 @@ Change List ========= +Version 3.1.71(2023101300) + - removed debugger statement + - removed deprecated calback call which php8.2 complained about + Version 3.1.70(Build 2023100400) -- added more langs to passage reader and select to read --- fixed bug wih player widgets which garbled non ascii text on the page!! +-- fixed bug with player widgets which garbled non ascii text on the page!! Version 3.1.69(Build 2023062800) - Made license manager tolerant of curl failures, and will reuse old license info until new info shows up diff --git a/filter.php b/filter.php index 8677e42d..16326912 100644 --- a/filter.php +++ b/filter.php @@ -60,7 +60,7 @@ public function filter($text, array $options = array()) { // non string data can not be filtered anyway return $text; } - $newtext = preg_replace_callback($search, 'self::filter_poodll_process', $newtext); + $newtext = preg_replace_callback($search, '\filter_poodll::filter_poodll_process', $newtext); } //if the text has a poodll player widget we want to prevent other filters from messing with it @@ -85,18 +85,18 @@ public function filter($text, array $options = array()) { $handleextstring = implode('|', $handleexts); //$oldsearch = '/]*href="([^"#\?]+\.(' . $handleextstring. '))(\?d=([\d]{1,4})x([\d]{1,4}))?"[^>]*>([^>]*)<\/a>/is'; $search = '/]*href="([^"#\?]+\.(' . $handleextstring . '))(.*?)"[^>]*>([^>]*)<\/a>/is'; - $newtext = preg_replace_callback($search, 'self::filter_poodll_allexts_callback', $newtext); + $newtext = preg_replace_callback($search, '\filter_poodll::filter_poodll_allexts_callback', $newtext); } //check for legacy pdl links $search = '/]*href="([^"#\?]+\.(pdl))(.*?)"[^>]*>([^>]*)<\/a>/is'; - $newtext = preg_replace_callback($search, 'self::filter_poodll_pdl_callback', $newtext); + $newtext = preg_replace_callback($search, '\filter_poodll::filter_poodll_pdl_callback', $newtext); //check for youtube if ($this->fetchconf('handleyoutube')) { $search = '/]*href="(?:https?:\/\/)?(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|v\/)?([\w-]{10,})(?:.*?)<\/a>/is'; - $newtext = preg_replace_callback($search, 'self::filter_poodll_youtube_callback', $newtext); + $newtext = preg_replace_callback($search, '\filter_poodll::filter_poodll_youtube_callback', $newtext); } }// end of if $havelinks diff --git a/version.php b/version.php index 480005f7..04498d95 100644 --- a/version.php +++ b/version.php @@ -25,9 +25,9 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2023100400; +$plugin->version = 2023101300; $plugin->requires = 2016052300;//moodle 3.1.0 $plugin->component = 'filter_poodll'; $plugin->maturity = MATURITY_STABLE; -$plugin->release = '3.1.70(Build 2023100400)'; +$plugin->release = '3.1.71(Build 2023101300)';