Merge pull request #10 from LeOSW42/copilot/improve-project-structure

Restructure MVC layout into public/src with Core/Thirds/Controllers/Models
This commit is contained in:
leo authored and GitHub committed 2026-01-24 15:47:18 +01:00
commit 2cec4bed5b
129 files changed
+82 -63

No files matched your search

+5 -5
View File
@@ -1,8 +1,8 @@
/includes/config.php /src/Core/config.php
/medias/* /public/medias/*
/_maps /public/_maps
_ressources/dump.sql /public/_ressources/dump.sql
*.sublime-project *.sublime-project
*.sublime-workspace *.sublime-workspace
*.log *.log
/tmp/* /tmp/*
+9
View File
@@ -1 +1,10 @@
[Kabano website](https://kabano.org/) [Kabano website](https://kabano.org/)
## Arborescence
- `public/` : assets frontend et point d'entrée web (`index.php`, `views/`, `_ressources/`)
- `src/` : code backend commun
- `Core/` : configuration et utilitaires communs (ancien `includes/`)
- `Controllers/` : contrôleurs MVC backend (ancien `controllers/`)
- `Models/` : modèles MVC backend (ancien `models/`)
- `Thirds/` : dépendances tierces backend (ancien `third/`)
-50
View File
@@ -1,50 +0,0 @@
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
locale_set_default("fr_FR");
date_default_timezone_set("UTC"); // Default tz for date manipulation is UTC. Display tz is in session.php
/*****
** Management of folder names
*****/
// It is the include folder name
$config['include_folder']=basename(__DIR__);
// This is the absolute folder to the root of the website
$config['abs_root_folder']=str_replace($config['include_folder'],"",__DIR__);
// This is the relative folder to the root of the website from the DocumentRoot (can also be called subfolder)
$config['rel_root_folder']=str_replace($_SERVER['DOCUMENT_ROOT'],"",$config['abs_root_folder']);
$config['web_root_folder']="https://kabano.test/";
if($config['rel_root_folder']=="") $config['rel_root_folder']="/";
// Here all the absolute paths to specific folders
$config['views_folder'] = $config['abs_root_folder']."views/";
$config['controllers_folder'] = $config['abs_root_folder']."controllers/";
$config['models_folder'] = $config['abs_root_folder']."models/";
$config['medias_folder'] = $config['abs_root_folder']."medias/";
$config['includes_folder'] = $config['abs_root_folder']."includes/";
$config['third_folder'] = $config['abs_root_folder']."third/";
$config['logs_folder'] = $config['abs_root_folder']."logs/";
// Here all the relative url to specific folders
$config['views_url'] = $config['rel_root_folder']."views/";
/*****
** SQL Database configuration
*****/
$config['SQL_host'] = "localhost";
$config['SQL_user'] = "kabano";
$config['SQL_pass'] = "PASSWORD";
$config['SQL_db'] = "postgres";
/*****
** Mail configuration
*****/
$config['admin_mail'] = "leo@lstronic.com";
$config['bot_mail'] = "robot@kabano.com";
-4
View File
@@ -1,4 +0,0 @@
<?php
require_once __DIR__ . '/includes/config.php';
require_once __DIR__ . '/includes/routes.php';
View File
File renamed without changes.
+4
View File
@@ -0,0 +1,4 @@
<?php
require_once __DIR__ . '/../src/Core/config.php';
require_once __DIR__ . '/../src/Core/routes.php';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -19,7 +19,7 @@ echo ('<?xml version="1.0" encoding="UTF-8"?>'); ?>
<description>L'actualité du blog officiel de Kabano : Plateforme collaborative de recensement de cabanes et refuges.</description> <description>L'actualité du blog officiel de Kabano : Plateforme collaborative de recensement de cabanes et refuges.</description>
<language>fr</language> <language>fr</language>
<image> <image>
<url><?=$config['web_root_folder']?>views/img/header_rss.svg</url> <url><?=$config['web_root_folder']?>public/views/img/header_rss.svg</url>
<title>Kabano</title> <title>Kabano</title>
<link><?=$config['web_root_folder']?></link> <link><?=$config['web_root_folder']?></link>
<height>44</height> <height>44</height>
@@ -42,4 +42,4 @@ echo ('<?xml version="1.0" encoding="UTF-8"?>'); ?>
</channel> </channel>
</rss> </rss>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 356 B

After

Width:  |  Height:  |  Size: 356 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 673 KiB

After

Width:  |  Height:  |  Size: 673 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 139 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 708 KiB

After

Width:  |  Height:  |  Size: 708 KiB

File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 299 B

After

Width:  |  Height:  |  Size: 299 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 420 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 696 B

After

Width:  |  Height:  |  Size: 696 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 618 B

After

Width:  |  Height:  |  Size: 618 B

Loaded 100 of 129 files, more files were not shown because too many files have changed in this diff. Show more