diff --git a/filter.php b/filter.php index c9bd347..7d8adf1 100644 --- a/filter.php +++ b/filter.php @@ -251,7 +251,7 @@ function generateURL(array $link_params, string $mm_id, string $url1): string 'hash' => filter_create_ticket($mm_id, $email ?: '', parse_url($url1, PHP_URL_HOST)), ]; - $finalURL = $url1.'?'.http_build_query(array_merge($extra_arguments, $link_params)); + $finalURL = $url1.'?'.http_build_query(array_unique(array_merge($extra_arguments, $link_params))); return checkAndValidateURL($finalURL); } @@ -284,8 +284,7 @@ function checkAndValidateURL(string $url): string return $url; } - $finalURL = preg_replace('/\?hash=/', '&hash=', $url); - return preg_replace('/&id=[^&]+/', '', $finalURL); + return preg_replace('/\?hash=/', '&hash=', $url); } function getIframeWidth(string $isMultiStream): string @@ -308,4 +307,4 @@ function getIframeHeight(string $isMultiStream): string } return $CFG->iframe_singlevideo_height ?: '333px'; -} +} \ No newline at end of file diff --git a/version.php b/version.php index 4c36c42..f58d232 100644 --- a/version.php +++ b/version.php @@ -23,7 +23,7 @@ defined('MOODLE_INTERNAL') || exit(); -$plugin->version = 2024101701; +$plugin->version = 2024101704; $plugin->requires = 2016112900; $plugin->maturity = MATURITY_STABLE; $plugin->component = 'filter_pumukitmedia';