Skip to content

Commit

Permalink
Accept component names containing numbers
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vmdef authored Jan 23, 2024
1 parent e040c82 commit f9dac53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion verify_commit_messages/amoslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f9dac53

Please sign in to comment.