addon import page content

This commit is contained in:
Fred Tempez 2021-06-07 13:27:52 +02:00
parent e7f4391e24
commit 248ad3638d

View File

@ -550,6 +550,8 @@ class addon extends common {
if( $list === ''){
file_put_contents(self::DATA_DIR . '/' .$key . '/' . $fileTarget . '.json', json_encode( $data ,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT|LOCK_EX) );
}
// copie du contenu de la page
$this->copyDir (self::TEMP_DIR . $tempFolder . '/' .$key . '/content', self::DATA_DIR . '/' .$key . '/');
// Supprimer les fichiers importés
unlink (self::TEMP_DIR . $tempFolder . '/' .$key . '/' . $fileTarget . '.json');
}