From 8351bfef700295534f8b0829c37499c400913dcc Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 15 Feb 2019 13:48:43 +0300 Subject: [PATCH 1/2] Fix bugs in webasystCreateSystempluginCli --- .../webasyst/lib/cli/webasystCreateSystemplugin.cli.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wa-system/webasyst/lib/cli/webasystCreateSystemplugin.cli.php b/wa-system/webasyst/lib/cli/webasystCreateSystemplugin.cli.php index fe59361d6..fa0870286 100644 --- a/wa-system/webasyst/lib/cli/webasystCreateSystemplugin.cli.php +++ b/wa-system/webasyst/lib/cli/webasystCreateSystemplugin.cli.php @@ -103,7 +103,7 @@ protected function createClass($file) return str_replace($this->template_id, $this->plugin_id, $file); } - protected function createConfig() + protected function createConfig($params = array()) { return array( 'name' => empty($params['name']) ? ucfirst($this->plugin_id) : $params['name'], @@ -116,13 +116,13 @@ protected function createConfig() protected function create($params = array()) { - $config = $this->createConfig(); + $config = $this->createConfig($params); $structure = array( 'lib/classes', 'lib/vendors', 'lib/config/plugin.php' => $config, - //TODO add plugin's images + 'img' ); $files = array( @@ -152,7 +152,7 @@ protected function create($params = array()) } $this->createStructure($structure); - $this->protect(array('lib', 'lib/config')); + $this->protect(array('lib', 'templates'); return $config; } From 58b0e2f70fbceb30ab188f715f529eec733d3ef8 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 15 Feb 2019 13:49:24 +0300 Subject: [PATCH 2/2] Update webasystCreateSystemplugin.cli.php --- wa-system/webasyst/lib/cli/webasystCreateSystemplugin.cli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wa-system/webasyst/lib/cli/webasystCreateSystemplugin.cli.php b/wa-system/webasyst/lib/cli/webasystCreateSystemplugin.cli.php index fa0870286..03f3d9fca 100644 --- a/wa-system/webasyst/lib/cli/webasystCreateSystemplugin.cli.php +++ b/wa-system/webasyst/lib/cli/webasystCreateSystemplugin.cli.php @@ -152,7 +152,7 @@ protected function create($params = array()) } $this->createStructure($structure); - $this->protect(array('lib', 'templates'); + $this->protect(array('lib', 'templates')); return $config; }