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:
authorPeter Zhang <peter@innocraft.com>2022-10-28 15:57:17 +0300
committerGitHub <noreply@github.com>2022-10-28 15:57:17 +0300
commit57b7d1e5d7218e57b87eb9746caa3cc26482d69a (patch)
tree0d0c2a9dcb5bb7f8df88b549916ae2f33aae6b79 /plugins
parent0d260fd24242a49e507ee8b5681913bf0582c318 (diff)
Adding plugin name checks with 60 characters limit (#19795)
* adding plugin name checks with 60 characters limit adding plugin name checks with 60 characters limit * extend change log for plugin name extend change log for plugin name * remove strlen check on plugin put onto regex remove strlen check on plugin put onto regex * Update CHANGELOG.md Co-authored-by: Stefan Giehl <stefan@matomo.org> * update function name update function name Co-authored-by: Stefan Giehl <stefan@matomo.org>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreConsole/Commands/GeneratePlugin.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/plugins/CoreConsole/Commands/GeneratePlugin.php b/plugins/CoreConsole/Commands/GeneratePlugin.php
index c8b940b560..1dceb8c45a 100644
--- a/plugins/CoreConsole/Commands/GeneratePlugin.php
+++ b/plugins/CoreConsole/Commands/GeneratePlugin.php
@@ -134,12 +134,8 @@ 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));
+ throw new \RuntimeException(sprintf('The plugin name %s is not valid. The name must be no longer than 60 characters and start with a letter and is only allowed to contain numbers and letters.', $pluginName));
}
$pluginPath = $self->getPluginPath($pluginName);