Skip to content

Commit 6f26e54

Browse files
committed
Changement de repertoire de certains elements
les langues ont étées remis dans le dossier app idem pour les seeds et migration de bd desormais les classes applicative mappées sont dans "/storage" definitionn d'une constante pour le dossier des langue mise a jour de l'autoloader et de tous les fichiers impactés
1 parent 07ed964 commit 6f26e54

File tree

12 files changed

+15
-15
lines changed

12 files changed

+15
-15
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

app/resources/reserved/.classmap.php

-8
This file was deleted.

storage/lang/fr/empty

Whitespace-only changes.

system/Autoloader.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private static function loadConfigFiles()
105105
self::$_class_map_syst = require $class_map_file;
106106
}
107107

108-
$class_map_file = APP_DIR.'resources'.DS.'reserved'.DS.'.classmap.php';
108+
$class_map_file = STORAGE_DIR . '.classmap.php';
109109
/**
110110
* Chargement des classes applicatives mapées
111111
*/

system/constants/constants.php

+10-2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@
6161
define('RESOURCE_DIR', APP_DIR . 'resources' . DS);
6262
}
6363

64+
if (!defined('LANG_DIR'))
65+
{
66+
/**
67+
* File translation directory path
68+
*/
69+
define('LANG_DIR', RESOURCE_DIR . 'lang' . DS);
70+
}
71+
6472
if (!defined('SERVICE_DIR'))
6573
{
6674
/**
@@ -91,15 +99,15 @@
9199
/**
92100
* Database migrations storage path
93101
*/
94-
define('DB_MIGRATION_DIR', DATABASE_DIR . 'migrations' . DS);
102+
define('DB_MIGRATION_DIR', RESOURCE_DIR . 'database' . DS . 'migrations' . DS);
95103
}
96104

97105
if (!defined('DB_SEED_DIR'))
98106
{
99107
/**
100108
* Database seeds storage path
101109
*/
102-
define('DB_SEED_DIR', DATABASE_DIR . 'seeds' . DS);
110+
define('DB_SEED_DIR', RESOURCE_DIR . 'database' . DS . 'seeds' . DS);
103111
}
104112

105113
if (!defined('DB_DUMP_DIR'))

system/core/cli/General.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected function _map() : Command
7070
\APP_DIR.'class',
7171
]
7272
]);
73-
$export_file = \RESOURCE_DIR.'reserved'.\DS.'.classmap.php';
73+
$export_file = STORAGE_DIR . '.classmap.php';
7474
}
7575
else
7676
{

system/core/loader/FileLocator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ public static function lang(string $lang, string $locale) : array
4545
SYST_DIR . 'constants' . DS . 'lang' . DS . config('general.language') . DS . $file,
4646

4747
// Path to app languages
48-
RESOURCE_DIR . 'reserved' . DS . 'lang' . DS . config('general.language') . DS . $file,
48+
LANG_DIR . config('general.language') . DS . $file,
4949

5050
// Path to system languages
5151
SYST_DIR . 'constants' . DS . 'lang' . DS . $locale . DS . $file,
5252

5353
// Path to app languages
54-
RESOURCE_DIR . 'reserved' . DS . 'lang' . DS . $locale . DS . $file,
54+
LANG_DIR . $locale . DS . $file,
5555
];
5656
$file_exist = false;
5757
$languages = [];

system/core/loader/Load.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public static function lang(string $file, &$var, ?string $locale = null, bool $a
240240
}
241241
$file = preg_replace('#\.json$#i', '', $file);
242242
$filename = (true === $app)
243-
? RESOURCE_DIR . 'reserved'.DS.'lang' . DS . $locale . DS . $file . '.json'
243+
? LANG_DIR . $locale . DS . $file . '.json'
244244
: SYST_DIR . 'constants' . DS . 'lang' . DS . $locale . DS . $file . '.json';
245245

246246
if (true !== file_exists($filename))

0 commit comments

Comments
 (0)