Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #63 from flatCore/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
patkon committed Sep 24, 2021
2 parents f9ac068 + a5e7d70 commit 547ba7c
Show file tree
Hide file tree
Showing 11 changed files with 2,292 additions and 1,917 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Expand Up @@ -8,6 +8,8 @@ Icon?
ehthumbs.db
Thumbs.db

.idea/*

# Database files and generated content #
*.sqlite
*.sqlite3
Expand All @@ -26,10 +28,10 @@ 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

Expand Down
8 changes: 6 additions & 2 deletions README.md
@@ -1,6 +1,4 @@
<p align="center">
<img src="https://www.flatcore.org/content/images/icon-flatcore-128.png">
</p>

## flatCore CMS

Expand All @@ -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.
Expand Down
30 changes: 13 additions & 17 deletions acp/acp.php
Expand Up @@ -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
]);

Expand All @@ -40,7 +37,6 @@
$db_posts = $database;



} else {
$db_type = 'sqlite';

Expand All @@ -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
]);

}
Expand All @@ -85,8 +81,8 @@


$db_index = new Medoo([
'database_type' => 'sqlite',
'database_file' => INDEX_DB
'type' => 'sqlite',
'database' => INDEX_DB
]);


Expand Down
21 changes: 9 additions & 12 deletions acp/index.php
Expand Up @@ -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
]);

Expand All @@ -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
]);

}
Expand Down
6 changes: 3 additions & 3 deletions core/switch.php
Expand Up @@ -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);
Expand Down
25 changes: 11 additions & 14 deletions database.php
Expand Up @@ -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
]);

Expand All @@ -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
]);

}
Expand Down
26 changes: 13 additions & 13 deletions install/inc.update.php
Expand Up @@ -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",

Expand Down Expand Up @@ -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
]);


Expand Down
4 changes: 2 additions & 2 deletions install/php/check_connection.php
Expand Up @@ -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'],
Expand Down
26 changes: 13 additions & 13 deletions install/php/createDB.php
Expand Up @@ -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",

Expand Down Expand Up @@ -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
]);


Expand Down
2 changes: 1 addition & 1 deletion install/php/init_checkup.php
Expand Up @@ -82,7 +82,7 @@ function checkexistingdir($path) {

/* minimum php version */

$needed_phpversion = "5.5";
$needed_phpversion = "7.3";
$loaded_extensions = get_loaded_extensions();

echo '<fieldset>';
Expand Down

0 comments on commit 547ba7c

Please sign in to comment.