diff --git a/_experimental/autoblog-0.3.php b/_experimental/autoblog-0.3.php index 666e72d..827c2e2 100755 --- a/_experimental/autoblog-0.3.php +++ b/_experimental/autoblog-0.3.php @@ -590,6 +590,19 @@ if (isset($_GET['feed'])) // FEED exit; } +if (isset($_GET['media'])) // MEDIA +{ + header('Content-Type: application/json'); + if(is_dir(MEDIA_DIR)) + { + $files = scandir(MEDIA_DIR); + unset($files[0]); // . + unset($files[1]); // .. + echo json_encode(array("url"=> LOCAL_URL.substr(MEDIA_DIR, strlen(ROOT_DIR)+1).'/', "files" => $files)); + } + exit; +} + if (isset($_GET['update'])) { $_SERVER['QUERY_STRING'] = ''; @@ -791,7 +804,8 @@ echo '
'; if ($vvb->mustUpdate()) diff --git a/_experimental/config.php b/_experimental/config.php index 1c3ec6a..de7d943 100755 --- a/_experimental/config.php +++ b/_experimental/config.php @@ -40,6 +40,10 @@ function __($str) case 'configuration': case 'articles': return $str; + case 'Media export': + return 'Export fichiers media'; + default: + return $str; } }