Skip to content

Commit 9475d7b

Browse files
committed
update 1.1.13 to 1.1.14
1 parent 10b241d commit 9475d7b

File tree

540 files changed

+120508
-10441
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

540 files changed

+120508
-10441
lines changed

update/.gitignore

Lines changed: 0 additions & 40 deletions
This file was deleted.

update/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [1.1.14] - 2019-11-27
6+
- Fix of category tree does not appear after 3 level
7+
- Ability to change url of package manager
8+
- $.ajax.done() was not avaible
9+
- Sub module settings handle open setting on parent module
10+
- Change background picture does not work on old templates
11+
- Put scroll on deep category tree
12+
- Opening modal should close all handles submenus
13+
- Issue with reset password
14+
- Export orders to excel
15+
- Email on new order is not editable
16+
- Add page to menu is broken
17+
- Tooltip must close on element change
18+
- Added language choose method on install screen
19+
- Added admin url setting on install screen
20+
- Added module install command from CLI
21+
- Other fixes
22+
- [see all changes....](https://github.com/microweber/microweber/compare/1.1.13...1.1.14 "")
23+
524

625
## [1.1.13] - 2019-10-25
726
- Fixes on mw.dialog

update/composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@
6262
"aws/aws-sdk-php": "^3.0",
6363
"mailerlite/mailerlite-api-v2-php-sdk": "*",
6464
"finlet/flexmail": "*",
65-
"phpoffice/phpspreadsheet": "*",
66-
"nwidart/laravel-modules": "^1.27"
67-
},
65+
"phpoffice/phpspreadsheet": "*"
66+
},
6867
"require-dev": {
6968
"fzaninotto/faker": "^1.9"
7069
},

update/composer.lock

Lines changed: 1 addition & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
<?php
2+
3+
namespace Microweber\Commands;
4+
5+
use Illuminate\Console\Command;
6+
use Symfony\Component\Console\Input\InputOption;
7+
use Symfony\Component\Console\Input\InputArgument;
8+
use Microweber\Controllers\InstallController;
9+
10+
11+
class InstallCommand extends Command
12+
{
13+
protected $name = 'microweber:install';
14+
protected $description = 'Installs Microweber (duh)';
15+
protected $installer;
16+
17+
public function __construct(InstallController $installer)
18+
{
19+
$this->installer = $installer;
20+
parent::__construct();
21+
}
22+
23+
public function fire()
24+
{
25+
/*
26+
*
27+
// you can now do
28+
php artisan microweber:install
29+
30+
31+
// or you can also install from env with:
32+
33+
export DB_HOST=localhost
34+
export DB_USER=user
35+
export DB_PASS=pass
36+
export DB_ENGINE=sqlite
37+
export DB_NAME=storage/database.sqlite
38+
export DB_PREFIX=mw_
39+
export DB_PORT=
40+
41+
php artisan microweber:install
42+
43+
*/
44+
45+
46+
$input = array(
47+
'db_host' => $this->argument('db_host'),
48+
'db_name' => $this->argument('db_name'),
49+
'db_user' => $this->argument('db_user'),
50+
'db_pass' => $this->argument('db_pass'),
51+
'db_driver' => $this->argument('db_driver'),
52+
'table_prefix' => $this->option('prefix'),
53+
'admin_email' => $this->argument('email'),
54+
'admin_username' => $this->argument('username'),
55+
'admin_password' => $this->argument('password'),
56+
'with_default_content' => $this->option('default-content'),
57+
'default_template' => $this->option('template'),
58+
'config_only' => $this->option('config_only'),
59+
'site_lang' => trim($this->option('language')),
60+
);
61+
$vals = array_filter($input);
62+
if (!$vals) {
63+
$this->info('No arguments provided... Performing lazy install');
64+
$lazy_install = true;
65+
} else {
66+
$lazy_install = false;
67+
}
68+
if (!isset($input['make_install'])) {
69+
$input['make_install'] = true;
70+
}
71+
72+
if (!$input['db_host']) {
73+
$input['db_host'] = getenv('DB_HOST');
74+
}
75+
if (!$input['db_user']) {
76+
$input['db_user'] = getenv('DB_USER');
77+
}
78+
if (!$input['db_pass']) {
79+
$input['db_pass'] = getenv('DB_PASS');
80+
}
81+
if (!$input['db_name']) {
82+
$input['db_name'] = getenv('DB_NAME');
83+
}
84+
85+
if (!$input['db_driver']) {
86+
$input['db_driver'] = (getenv('DB_ENGINE') ?: 'sqlite');
87+
if (!$input['db_name']) {
88+
$input['db_name'] = (getenv('DB_NAME') ?: 'storage/database.sqlite');
89+
}
90+
}
91+
92+
93+
if (!$input['table_prefix']) {
94+
$input['table_prefix'] = (getenv('DB_PREFIX') ?: '');
95+
}
96+
if (!$input['table_prefix']) {
97+
$input['table_prefix'] = (getenv('TABKE_PREFIX') ?: '');
98+
}
99+
100+
if ($lazy_install) {
101+
$input['default_template'] = (getenv('DEFAULT_TEMPLATE') ?: 'liteness');
102+
$input['with_default_content'] = true;
103+
}
104+
$input['subscribe_for_update_notification'] = true;
105+
106+
107+
$this->info('Installing Microweber...');
108+
$this->installer->command_line_logger = $this;
109+
$result = $this->installer->index($input);
110+
$this->info($result);
111+
}
112+
113+
protected function getArguments()
114+
{
115+
return [
116+
['email', InputArgument::OPTIONAL, 'Admin account email'],
117+
['username', InputArgument::OPTIONAL, 'Admin account username'],
118+
['password', InputArgument::OPTIONAL, 'Admin account password'],
119+
['db_host', InputArgument::OPTIONAL, 'Database host address'],
120+
['db_name', InputArgument::OPTIONAL, 'Database schema name'],
121+
['db_user', InputArgument::OPTIONAL, 'Database username'],
122+
['db_pass', InputArgument::OPTIONAL, 'Database password'],
123+
['db_driver', InputArgument::OPTIONAL, 'Database driver'],
124+
['prefix', InputArgument::OPTIONAL, 'Table prefix'],
125+
];
126+
}
127+
128+
protected function getOptions()
129+
{
130+
return [
131+
['prefix', 'p', InputOption::VALUE_OPTIONAL, 'Database tables prefix'],
132+
['template', 't', InputOption::VALUE_OPTIONAL, 'Set default template name'],
133+
['default-content', 'd', InputOption::VALUE_OPTIONAL, 'Install default content'],
134+
['config_only', 'c', InputOption::VALUE_OPTIONAL, 'Prepare the install'],
135+
['language', 'l', InputOption::VALUE_OPTIONAL, 'Prepare the language install'],
136+
];
137+
}
138+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
3+
namespace Microweber\Commands;
4+
5+
use Illuminate\Console\Command;
6+
use Symfony\Component\Console\Input\InputArgument;
7+
use Microweber\Controllers\DefaultController;
8+
9+
10+
// php artisan microweber:module shop 1 --env=localhost
11+
// php artisan microweber:module shop 0 --env=localhost
12+
class ModuleCommand extends Command
13+
{
14+
protected $name = 'microweber:module';
15+
protected $description = 'Install or uninstall module';
16+
protected $controller;
17+
18+
public function __construct(DefaultController $controller)
19+
{
20+
$this->controller = $controller;
21+
parent::__construct();
22+
}
23+
24+
public function fire()
25+
{
26+
$input = array(
27+
'module' => $this->argument('module'),
28+
'module_action' => $this->argument('module_action'),
29+
);
30+
31+
$this->info('Setting module...');
32+
33+
if (isset($input['module_action'])) {
34+
if (trim($input['module_action']) == 'install' or intval($input['module_action']) == 1) {
35+
mw()->modules->set_installed(array('for_module' => $input['module']));
36+
$this->info($input['module'] . ' is installed');
37+
} else if (trim($input['module_action']) == 'uninstall' or intval($input['module_action']) == 0) {
38+
mw()->modules->uninstall(array('for_module' => $input['module']));
39+
$this->info($input['module'] . ' is uninstalled');
40+
}
41+
}
42+
}
43+
44+
protected function getArguments()
45+
{
46+
return [
47+
['module', InputArgument::REQUIRED, 'The module type'],
48+
['module_action', InputArgument::REQUIRED, 'Should module be installed , install or uninstall'],
49+
];
50+
}
51+
}

0 commit comments

Comments
 (0)