addon import page content

This commit is contained in:
Fred Tempez 2021-06-07 13:27:52 +02:00
parent 5ce8eefa6b
commit 85f31d986d

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');
}