Tout fonctionne, je ne touche à rien.

This commit is contained in:
ArthurHoaro 2013-06-30 18:30:30 +02:00
parent 4c4bae1fc1
commit 7c5fa0f73f

View file

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