diff --git a/.gitignore b/.gitignore
index 6a6a78de..94e2a1df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,8 @@ Icon?
ehthumbs.db
Thumbs.db
+.idea/*
+
# Database files and generated content #
*.sqlite
*.sqlite3
@@ -26,13 +28,13 @@ release-notes.html
/modules/*
!index.html
-# styles, except blucent #
+# styles, except default #
/styles/**/*
-!/styles/blucent/*
-/styles/blucent/.DS_Store
+!/styles/default/*
+/styles/default/.DS_Store
!index.html
+config_database.php
-
-/content/SQLite/.DS_Store
\ No newline at end of file
+/content/SQLite/.DS_Store
diff --git a/README.md b/README.md
index e47261be..c4e82654 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,4 @@
-
-
## flatCore CMS
@@ -13,6 +11,12 @@ flatCore is a lightweight Content Management System based on PHP and SQLite. MyS
* https://flatcore.org/documentation/
* https://flatcore.org/de/dokumentation/
+#### Technical requirements
+
++ Software: PHP 7.3+
++ Web Server: Apache with PDO/SQLite Module and mod_rewrite
++ Database: SQLite, MySQL 5.6+ (optional)
+
### Contribution
__You are very welcome to take part in this project.__ We are happy for every contribution. Please submit your code to the develop branch, and start a pull request.
diff --git a/acp/acp.php b/acp/acp.php
index f7be7c1e..c3dcae3d 100644
--- a/acp/acp.php
+++ b/acp/acp.php
@@ -21,16 +21,13 @@
$db_type = 'mysql';
$database = new Medoo([
-
- 'database_type' => 'mysql',
- 'database_name' => "$database_name",
- 'server' => "$database_host",
+ 'type' => 'mysql',
+ 'database' => "$database_name",
+ 'host' => "$database_host",
'username' => "$database_user",
'password' => "$database_psw",
-
'charset' => 'utf8',
'port' => $database_port,
-
'prefix' => DB_PREFIX
]);
@@ -40,7 +37,6 @@
$db_posts = $database;
-
} else {
$db_type = 'sqlite';
@@ -56,23 +52,23 @@
define("POSTS_DB", "$fc_db_posts");
$db_content = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => CONTENT_DB
+ 'type' => 'sqlite',
+ 'database' => CONTENT_DB
]);
$db_user = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => USER_DB
+ 'type' => 'sqlite',
+ 'database' => USER_DB
]);
$db_statistics = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => STATS_DB
+ 'type' => 'sqlite',
+ 'database' => STATS_DB
]);
$db_posts = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => POSTS_DB
+ 'type' => 'sqlite',
+ 'database' => POSTS_DB
]);
}
@@ -85,8 +81,8 @@
$db_index = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => INDEX_DB
+ 'type' => 'sqlite',
+ 'database' => INDEX_DB
]);
diff --git a/acp/index.php b/acp/index.php
index d8590cc5..b597c1ea 100644
--- a/acp/index.php
+++ b/acp/index.php
@@ -16,16 +16,13 @@
$db_type = 'mysql';
$database = new Medoo([
-
- 'database_type' => 'mysql',
- 'database_name' => "$database_name",
- 'server' => "$database_host",
+ 'type' => 'mysql',
+ 'database' => "$database_name",
+ 'host' => "$database_host",
'username' => "$database_user",
'password' => "$database_psw",
-
'charset' => 'utf8',
'port' => $database_port,
-
'prefix' => DB_PREFIX
]);
@@ -49,18 +46,18 @@
define("STATS_DB", "$fc_db_stats");
$db_content = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => CONTENT_DB
+ 'type' => 'sqlite',
+ 'database' => CONTENT_DB
]);
$db_user = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => USER_DB
+ 'type' => 'sqlite',
+ 'database' => USER_DB
]);
$db_statistics = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => STATS_DB
+ 'type' => 'sqlite',
+ 'database' => STATS_DB
]);
}
diff --git a/core/switch.php b/core/switch.php
index 3ec10e3d..024d25a4 100644
--- a/core/switch.php
+++ b/core/switch.php
@@ -59,10 +59,10 @@
$smarty->assign('homepage_linkname', text_parser($mainmenu[0]['homepage_linkname']));
$smarty->assign('homepage_title', $mainmenu[0]['homepage_title']);
-unset($mainmenu[0]['homepage_linkname'],$mainmenu[0]['homepage_title']);
+unset($mainmenu[0]['homepage_linkname'],$mainmenu[0]['homepage_title'],$mainmenu[0]['page_linkname']);
-$arr_mainmenu = @array_values($mainmenu);
-$arr_subnmenu = @array_values($submenu);
+$arr_mainmenu = array_filter(array_values($mainmenu));
+$arr_subnmenu = array_filter(array_values($submenu));
$smarty->assign('link_home', FC_INC_DIR . "/");
$smarty->assign('arr_menue', $arr_mainmenu);
diff --git a/database.php b/database.php
index ca297637..7126517c 100644
--- a/database.php
+++ b/database.php
@@ -15,16 +15,13 @@
$db_type = 'mysql';
$database = new Medoo([
-
- 'database_type' => 'mysql',
- 'database_name' => "$database_name",
- 'server' => "$database_host",
+ 'type' => 'mysql',
+ 'database' => "$database_name",
+ 'host' => "$database_host",
'username' => "$database_user",
'password' => "$database_psw",
-
'charset' => 'utf8',
'port' => $database_port,
-
'prefix' => DB_PREFIX
]);
@@ -44,22 +41,22 @@
define("POSTS_DB", "$fc_db_posts");
$db_content = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => CONTENT_DB
+ 'type' => 'sqlite',
+ 'database' => CONTENT_DB
]);
$db_user = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => USER_DB
+ 'type' => 'sqlite',
+ 'database' => USER_DB
]);
$db_statistics = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => STATS_DB
+ 'type' => 'sqlite',
+ 'database' => STATS_DB
]);
$db_posts = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => POSTS_DB
+ 'type' => 'sqlite',
+ 'database' => POSTS_DB
]);
}
diff --git a/install/inc.update.php b/install/inc.update.php
index fa949478..d04e3de1 100644
--- a/install/inc.update.php
+++ b/install/inc.update.php
@@ -34,9 +34,9 @@
$database = new Medoo([
- 'database_type' => 'mysql',
- 'database_name' => "$database_name",
- 'server' => "$database_host",
+ 'type' => 'mysql',
+ 'database' => "$database_name",
+ 'host' => "$database_host",
'username' => "$database_user",
'password' => "$database_psw",
@@ -67,31 +67,31 @@
define("POSTS_DB", "$fc_db_posts");
$db_content = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => CONTENT_DB
+ 'type' => 'sqlite',
+ 'database' => CONTENT_DB
]);
$db_user = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => USER_DB
+ 'type' => 'sqlite',
+ 'database' => USER_DB
]);
$db_statistics = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => STATS_DB
+ 'type' => 'sqlite',
+ 'database' => STATS_DB
]);
$db_posts = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => POSTS_DB
+ 'type' => 'sqlite',
+ 'database' => POSTS_DB
]);
}
define("INDEX_DB", "$fc_db_index");
$db_index = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => INDEX_DB
+ 'type' => 'sqlite',
+ 'database' => INDEX_DB
]);
diff --git a/install/php/check_connection.php b/install/php/check_connection.php
index 00000608..a6e56643 100644
--- a/install/php/check_connection.php
+++ b/install/php/check_connection.php
@@ -8,8 +8,8 @@
try {
$db_mysql = new Medoo([
- 'database_type' => 'mysql',
- 'database_name' => $_POST['prefs_database_name'],
+ 'type' => 'mysql',
+ 'database' => $_POST['prefs_database_name'],
'server' => $_POST['prefs_database_host'],
'username' => $_POST['prefs_database_username'],
'password' => $_POST['prefs_database_psw'],
diff --git a/install/php/createDB.php b/install/php/createDB.php
index d817c8b7..d5fad498 100644
--- a/install/php/createDB.php
+++ b/install/php/createDB.php
@@ -42,9 +42,9 @@
try {
$database = new Medoo([
- 'database_type' => 'mysql',
- 'database_name' => "$prefs_database_name",
- 'server' => "$prefs_database_host",
+ 'type' => 'mysql',
+ 'database' => "$prefs_database_name",
+ 'host' => "$prefs_database_host",
'username' => "$prefs_database_username",
'password' => "$prefs_database_psw",
@@ -85,31 +85,31 @@
$db_content = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => CONTENT_DB
+ 'type' => 'sqlite',
+ 'database' => CONTENT_DB
]);
$db_user = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => USER_DB
+ 'type' => 'sqlite',
+ 'database' => USER_DB
]);
$db_statistics = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => STATS_DB
+ 'type' => 'sqlite',
+ 'database' => STATS_DB
]);
$db_posts = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => POSTS_DB
+ 'type' => 'sqlite',
+ 'database' => POSTS_DB
]);
}
define("INDEX_DB", "$fc_db_index");
$db_index = new Medoo([
- 'database_type' => 'sqlite',
- 'database_file' => INDEX_DB
+ 'type' => 'sqlite',
+ 'database' => INDEX_DB
]);
diff --git a/install/php/init_checkup.php b/install/php/init_checkup.php
index 92f0d8c8..476c31e7 100644
--- a/install/php/init_checkup.php
+++ b/install/php/init_checkup.php
@@ -82,7 +82,7 @@ function checkexistingdir($path) {
/* minimum php version */
-$needed_phpversion = "5.5";
+$needed_phpversion = "7.3";
$loaded_extensions = get_loaded_extensions();
echo '