Skip to content
Extraits de code Groupes Projets
Valider c9bb9c27 rédigé par Stefan Giehl's avatar Stefan Giehl
Parcourir les fichiers

Merge pull request #9449 from piwik/9275-plugin-name

Limit plugin name to 40 characters
parents 3d1fec79 4aa69b1d
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -126,6 +126,10 @@ class GeneratePlugin extends GeneratePluginBase
throw new \RuntimeException('You have to enter a plugin name');
}
if(strlen($pluginName) > 40) {
throw new \RuntimeException('Your plugin name cannot be longer than 40 characters');
}
if (!Plugin\Manager::getInstance()->isValidPluginName($pluginName)) {
throw new \RuntimeException(sprintf('The plugin name %s is not valid. The name must start with a letter and is only allowed to contain numbers and letters.', $pluginName));
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter