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:
authorThomas Steur <thomas.steur@gmail.com>2015-07-20 13:56:20 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-07-20 13:56:20 +0300
commita54b24e7a193436aba0ba7cbfd1974bc4af15044 (patch)
tree2f7248e5d7a2642e258d775f917678b193e05e45 /plugins
parent57f273092bf68bd8ecfe1cbaca314642be446e70 (diff)
fixes #8294 CLI plugin generator doesnt intercept plugin description
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreConsole/Commands/GeneratePlugin.php9
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
);