dirdata devient datapath

This commit is contained in:
fredtempez 2020-12-10 14:04:30 +01:00
parent 59354b4556
commit 812ad68832
2 changed files with 4 additions and 4 deletions

View File

@ -202,7 +202,7 @@ class common {
// Constructeur JsonDB
$this->dataFiles[$keys] = new \Prowebcraft\JsonDb([
'name' => $keys . '.json',
'dir' => $this->dirData ($keys,self::$i18nCurrent)
'dir' => $this->dataPath ($keys,self::$i18nCurrent)
]);;
}
@ -222,7 +222,7 @@ class common {
// Installation fraîche, initialisation des modules manquants
// La langue d'installation par défaut est fr
foreach ($this->dataFiles as $stageId => $item) {
$folder = $this->dirData ($stageId, self::$i18nCurrent);
$folder = $this->dataPath ($stageId, self::$i18nCurrent);
if (file_exists($folder . $stageId .'.json') === false) {
$this->initData($stageId,self::$i18nCurrent);
common::$coreNotices [] = $stageId ;
@ -714,7 +714,7 @@ class common {
* @param $lang langue des pages
* @return string du dossier à créer
*/
public function dirData($id, $lang) {
public function dataPath($id, $lang) {
// Sauf pour les pages et les modules
if ($id === 'page' ||
$id === 'module' ||

View File

@ -51,7 +51,7 @@ class translate extends common {
echo $keyFile;
$e = new \Prowebcraft\JsonDb([
'name' => $keyFile . '.json',
'dir' => $this->dirData ($keyFile,$keyi18n)
'dir' => $this->dataPath ($keyFile,$keyi18n)
]);;
$e->set($keyFile, init::$defaultData[$keyFile]);
$e->save();