#37 slightly improved
This commit is contained in:
parent
7d7e1c90a9
commit
7be56daca7
1 changed files with 4 additions and 1 deletions
|
@ -120,7 +120,10 @@ function xsafimport($xsafremote, $max_exec_time) {
|
|||
$json_media_import = file_get_contents($remote_media);
|
||||
if(DEBUG)
|
||||
debug($json_media_import);
|
||||
if(!empty($json_media_import) && !strpos($json_media_import, '[]}') && json_decode($json_media_import) !== null)
|
||||
$media_data = json_decode($json_media_import, true);
|
||||
if(DEBUG)
|
||||
debug($media_data);
|
||||
if(!empty($json_media_import) && $media_data !== null && !empty($media_data['files']))
|
||||
{
|
||||
file_put_contents('./'. $foldername .'/import.json', $json_media_import);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue