From f9dac53fe694104e50c371d80f78c4388215e948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20D=C3=A9niz?= Date: Tue, 23 Jan 2024 13:57:47 +0000 Subject: [PATCH] Accept component names containing numbers Since MDL-67063, the format for the plugin type part of the component names in Moodle LMS consists of a letter followed by a combination of letters and numeric characters. The changes have not been implemented in the legacy_component_name method. --- verify_commit_messages/amoslib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/verify_commit_messages/amoslib.php b/verify_commit_messages/amoslib.php index 74791780..75e5971b 100644 --- a/verify_commit_messages/amoslib.php +++ b/verify_commit_messages/amoslib.php @@ -325,7 +325,7 @@ protected static function legacy_component_name($newstyle) { $newstyle = trim($newstyle); // See {@link PARAM_COMPONENT}. - if (!preg_match('/^[a-z]+(_[a-z][a-z0-9_]*)?[a-z0-9]+$/', $newstyle)) { + if (!preg_match('/^[a-z][a-z0-9]*(_[a-z][a-z0-9_]*)?[a-z0-9]+$/', $newstyle)) { return false; }