Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Becker <halfdan@xnorfz.de>2015-12-27 01:53:46 +0300
committerFabian Becker <halfdan@xnorfz.de>2015-12-27 01:53:46 +0300
commit4aa69b1dfec13b0794b3b45d72cf0e48541ba248 (patch)
treec5770c418d5fda29c2f97abd6b51359afa1449db /plugins/CoreConsole
parente6027273700f271199918d67d670403c17dbec30 (diff)
Limit plugin name to 40 characters
closes #9275
Diffstat (limited to 'plugins/CoreConsole')
-rw-r--r--plugins/CoreConsole/Commands/GeneratePlugin.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/CoreConsole/Commands/GeneratePlugin.php b/plugins/CoreConsole/Commands/GeneratePlugin.php
index bf83889305..45fa111d87 100644
--- a/plugins/CoreConsole/Commands/GeneratePlugin.php
+++ b/plugins/CoreConsole/Commands/GeneratePlugin.php
@@ -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));
}