forked from ZwiiCMS-Team/ZwiiCMS
[9.2.15] probleme stockage + defaultdata
This commit is contained in:
parent
15cc04f073
commit
4a9a63c3a9
@ -529,8 +529,14 @@ class common {
|
|||||||
// Save config core page module et user
|
// Save config core page module et user
|
||||||
// 5 premières clés principales
|
// 5 premières clés principales
|
||||||
// Trois tentatives
|
// Trois tentatives
|
||||||
|
$core = ['core' => $this->getData(['core'])];
|
||||||
|
$config = ['config' => $this->getData(['config'])];
|
||||||
|
$page = ['page' => $this->getData(['page'])];
|
||||||
|
$module = ['module' => $this->getData(['module'])];
|
||||||
|
$user = ['user' => $this->getData(['user'])];
|
||||||
|
|
||||||
for($i = 0; $i < 3; $i++) {
|
for($i = 0; $i < 3; $i++) {
|
||||||
if(file_put_contents(self::DATA_DIR.'core.json', json_encode(array_slice($this->getData(),0,5)) , LOCK_EX) !== false) {
|
if(file_put_contents(self::DATA_DIR.'core.json', json_encode( $core + $config + $page + $module + $user ) , LOCK_EX) !== false) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Pause de 10 millisecondes
|
// Pause de 10 millisecondes
|
||||||
@ -539,8 +545,9 @@ class common {
|
|||||||
// Save theme
|
// Save theme
|
||||||
// dernière clé principale
|
// dernière clé principale
|
||||||
// Trois tentatives
|
// Trois tentatives
|
||||||
|
$theme = ['theme' => $this->getData(['theme'])];
|
||||||
for($i = 0; $i < 3; $i++) {
|
for($i = 0; $i < 3; $i++) {
|
||||||
if(file_put_contents(self::DATA_DIR.'theme.json', json_encode(array_slice($this->getData(),5)), LOCK_EX) !== false) {
|
if(file_put_contents(self::DATA_DIR.'theme.json', json_encode($theme), LOCK_EX) !== false) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Pause de 10 millisecondes
|
// Pause de 10 millisecondes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user