diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-10-19 14:50:49 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-10-19 14:50:49 +0300 |
commit | fda46f16327d2af89b7450c729dbbcf7d0c322f0 (patch) | |
tree | 7f4cf920e914a548a6198fbce120fc8769c7d878 /plugins/CoreConsole | |
parent | c602784904f6e9e86459817cf6fffc6ab0b52210 (diff) |
fix namespace is wrong when generating an update for a plugin
Diffstat (limited to 'plugins/CoreConsole')
-rw-r--r-- | plugins/CoreConsole/Commands/GenerateUpdate.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/CoreConsole/Commands/GenerateUpdate.php b/plugins/CoreConsole/Commands/GenerateUpdate.php index a9d843d04d..8fc91fd50c 100644 --- a/plugins/CoreConsole/Commands/GenerateUpdate.php +++ b/plugins/CoreConsole/Commands/GenerateUpdate.php @@ -34,7 +34,7 @@ class GenerateUpdate extends GeneratePluginBase $className = $this->getUpdateClassName($component, $version); $exampleFolder = PIWIK_INCLUDE_PATH . '/plugins/ExamplePlugin'; - $replace = array('Piwik\Plugins\ExamplePlugin' => $namespace, + $replace = array('Piwik\Plugins\ExamplePlugin\Updates' => $namespace, 'ExamplePlugin' => $component, 'Updates_0_0_2' => $className, '0.0.2' => $version); @@ -82,6 +82,10 @@ class GenerateUpdate extends GeneratePluginBase $className = str_replace('Updates_xx', '', $className); $className = trim($className, '\\'); + if ($component !== 'core') { + $className .= '\Updates'; + } + return $className; } |