Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Install insert data refactoring and settings functions refactoring
givanz8d9bffa54260
diff --git a/install/controller/index.php b/install/controller/index.phpindex 0d088a6..910c5a7 100755--- a/install/controller/index.php+++ b/install/controller/index.php@@ -112,7 +112,7 @@ class Index extends Base {}function writeConfig($data) {- return \Vvveb\set_config('db', $data);+ return \Vvveb\setConfig('db', $data);$configFile = DIR_ROOT . 'config/db.php';file_put_contents($configFile, "<?php\n return " . var_export($data, true) . ';');clearstatcache(true, $configFile);@@ -247,14 +247,14 @@ class Index extends Base {$user['status'] = 1;$result = Admin::update($user, ['username' => 'admin']);$sites = new SiteSQL();- //$result = \Vvveb\set_settings('site',$settings);+ //$result = \Vvveb\setMultiSetting('site',$settings);$site = [];$site['site_id'] = 1;$site['settings'] = json_encode($settings);if ($theme) {- //@\Vvveb\set_config('sites.* * *.theme', $theme);+ //@\Vvveb\setConfig('sites.* * *.theme', $theme);$site['theme'] = $theme;}@@ -279,7 +279,7 @@ class Index extends Base {$site = ['host' => $hostname ?? '*.*.*', //$_SERVER['HTTP_HOST']- 'id' => 1,+ 'site_id' => 1,'name' => 'Default','theme' => $theme,'settings' => json_encode($settings),@@ -314,7 +314,7 @@ class Index extends Base {}unset($site['settings']);- @\Vvveb\set_config('sites.* * *', $site);+ @\Vvveb\setConfig('sites.* * *', $site);$lang = \Vvveb\session('language');@@ -343,7 +343,7 @@ class Index extends Base {$to = DIR_PUBLIC . $adminPath;if (@rename($from, $to)) {- @\Vvveb\set_config('admin.path', $adminPath);+ @\Vvveb\setConfig('admin.path', $adminPath);//if succesful remove failsafe /admin login option@unlink(DIR_PUBLIC . 'admin' . DS . 'index.php');} else {@@ -351,12 +351,12 @@ class Index extends Base {}}- @\Vvveb\set_config('app.cronkey', Str::random(32));- @\Vvveb\set_config('app.key', Str::random(32));+ @\Vvveb\setConfig('app.cronkey', Str::random(32));+ @\Vvveb\setConfig('app.key', Str::random(32));//set APCu memory cache if available instead of default file cacheif (function_exists('apcu_cache_info') && ini_get('apc.enabled')) {- @\Vvveb\set_config('app.cache.driver', 'APCu');+ @\Vvveb\setConfig('app.cache.driver', 'APCu');}if ($error) {diff --git a/install/sql/insert/product/length_type.sql b/install/sql/insert/product/length_type.sqlnew file mode 100644index 0000000..fabd4be--- /dev/null+++ b/install/sql/insert/product/length_type.sql@@ -0,0 +1,5 @@+INSERT INTO `length_type` VALUES+(1,1.00000000),+(2,10.00000000),+(3,0.39370000),+(4,30.48);\ No newline at end of filediff --git a/install/sql/insert/product/weight_type.sql b/install/sql/insert/product/weight_type.sqlnew file mode 100644index 0000000..0189bfd--- /dev/null+++ b/install/sql/insert/product/weight_type.sql@@ -0,0 +1 @@+INSERT INTO `weight_type` VALUES (1,1.00000000),(2,1000.00000000),(5,2.20462300),(6,35.27396200),(7,0.15747300);diff --git a/install/sql/insert/tax/tax_type.sql b/install/sql/insert/tax/tax_type.sqlnew file mode 100644index 0000000..7ec96e2--- /dev/null+++ b/install/sql/insert/tax/tax_type.sql@@ -0,0 +1,4 @@+INSERT INTO `tax_type` VALUES+(1,'Taxable Goods','Taxed goods','2022-05-01 00:00:00','2022-05-01 00:00:00'),+(2,'Downloadable Products','Downloadable','2022-05-01 00:00:00','2022-05-01 00:00:00'),+(3,'Test tax class','Downloadable','2022-05-01 00:00:00','2022-05-01 00:00:00');diff --git a/install/sql/insert/user/user_group.sql b/install/sql/insert/user/user_group.sqlnew file mode 100644index 0000000..e4ccacf--- /dev/null+++ b/install/sql/insert/user/user_group.sql@@ -0,0 +1 @@+INSERT INTO `user_group` VALUES (1,1,1);diff --git a/install/sql/insert/user/user_group_content.sql b/install/sql/insert/user/user_group_content.sqlnew file mode 100644index 0000000..54ac6e4--- /dev/null+++ b/install/sql/insert/user/user_group_content.sql@@ -0,0 +1 @@+INSERT INTO `user_group_content` VALUES (1,1,'Default','Default group');diff --git a/public/install/default/index.html b/public/install/default/index.htmlindex d0a1066..f3fcefe 100755--- a/public/install/default/index.html+++ b/public/install/default/index.html@@ -118,7 +118,7 @@<select name="engine" id="engine" class="form-control" onchange="databaseEngine(this)"><option value="mysqli">MySQL / MariaDB</option><option value="sqlite">SQLite</option>- <option value="pgsql">PgSql</option>+ <option value="pgsql">PgSQL</option></select></div></div>