Tout fonctionne, je ne touche à rien.
This commit is contained in:
parent
4c4bae1fc1
commit
7c5fa0f73f
1 changed files with 6 additions and 6 deletions
12
xsaf3.php
12
xsaf3.php
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
define('DEBUG', true);
|
||||
define('DEBUG', false);
|
||||
define('XSAF_VERSION', 3);
|
||||
define('AUTOBLOG_FILE_NAME', 'autoblog.php');
|
||||
define('ALLOW_REMOTE_DB_DL', true);
|
||||
define('ALLOW_REMOTE_MEDIA_DL', true);
|
||||
define('ALLOW_REMOTE_DB_DL', false);
|
||||
define('ALLOW_REMOTE_MEDIA_DL', false);
|
||||
define('EXEC_TIME', 10);
|
||||
|
||||
header("HTTP/1.0 403 Forbidden"); /* Uncivilized method to prevent bot indexing, huh :) */
|
||||
|
@ -114,15 +114,15 @@ function xsafimport($xsafremote, $max_exec_time) {
|
|||
}
|
||||
/* préparation à la récupération des médias distants */
|
||||
if($get_remote_media == true && ALLOW_REMOTE_MEDIA_DL ) {
|
||||
$remote_media=str_replace("?export", $foldername."/?media", $xsafremote);
|
||||
$remote_media=str_replace("?export", $foldername."?media", $xsafremote);
|
||||
if(DEBUG)
|
||||
debug("Récupération de la liste des médias à $remote_media <br>");
|
||||
$json_media_import = file_get_contents($remote_media);
|
||||
if(DEBUG)
|
||||
debug($json_media_import);
|
||||
if(!empty($json_media_import) && !strpos($json_media_import, '[]}"'))
|
||||
if(!empty($json_media_import) && !strpos($json_media_import, '[]}'))
|
||||
{
|
||||
file_put_contents('./'. $foldername .'/import.json', $json_media_import);
|
||||
file_put_contents('./'. $foldername .'/import.json', $json_media_import);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue