diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-07-20 13:56:20 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-07-20 13:56:20 +0300 |
commit | a54b24e7a193436aba0ba7cbfd1974bc4af15044 (patch) | |
tree | 2f7248e5d7a2642e258d775f917678b193e05e45 /plugins | |
parent | 57f273092bf68bd8ecfe1cbaca314642be446e70 (diff) |
fixes #8294 CLI plugin generator doesnt intercept plugin description
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CoreConsole/Commands/GeneratePlugin.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/CoreConsole/Commands/GeneratePlugin.php b/plugins/CoreConsole/Commands/GeneratePlugin.php index 72d1fb533a..c42d7a619b 100644 --- a/plugins/CoreConsole/Commands/GeneratePlugin.php +++ b/plugins/CoreConsole/Commands/GeneratePlugin.php @@ -10,6 +10,7 @@ namespace Piwik\Plugins\CoreConsole\Commands; use Piwik\Filesystem; +use Piwik\Plugins\ExamplePlugin\ExamplePlugin; use Piwik\Version; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\InputInterface; @@ -39,11 +40,15 @@ class GeneratePlugin extends GeneratePluginBase $this->generatePluginFolder($pluginName); + $plugin = new ExamplePlugin(); + $info = $plugin->getInformation(); + $exampleDescription = $info['description']; + if ($isTheme) { $exampleFolder = PIWIK_INCLUDE_PATH . '/plugins/ExampleTheme'; $replace = array( 'ExampleTheme' => $pluginName, - 'ExampleDescription' => $description, + $exampleDescription => $description, '0.1.0' => $version, 'PIWIK_VERSION' => Version::VERSION ); @@ -54,7 +59,7 @@ class GeneratePlugin extends GeneratePluginBase $exampleFolder = PIWIK_INCLUDE_PATH . '/plugins/ExamplePlugin'; $replace = array( 'ExamplePlugin' => $pluginName, - 'ExampleDescription' => $description, + $exampleDescription => $description, '0.1.0' => $version, 'PIWIK_VERSION' => Version::VERSION ); |