Commit 3b908324 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

simplification

parent 1f08a4a1
...@@ -108,7 +108,7 @@ foreach ($list as $item) { ...@@ -108,7 +108,7 @@ foreach ($list as $item) {
if ($item==$processed_subdir) continue; if ($item==$processed_subdir) continue;
$sublist = preg_grep('/^([^.])/', scandir("$path/$item")); $sublist = preg_grep('/^([^.])/', scandir("$path/$item"));
foreach($sublist as $subitem){ foreach($sublist as $subitem){
if (split_file("$item/$subitem")==0){ if (split_file("$path/$item","$subitem","../$destination")==0){
if ($move_processed){ if ($move_processed){
if (!is_dir("$path/$item/$processed_subdir")){ if (!is_dir("$path/$item/$processed_subdir")){
mkdir("$path/$item/$processed_subdir",0777); mkdir("$path/$item/$processed_subdir",0777);
...@@ -118,7 +118,7 @@ foreach ($list as $item) { ...@@ -118,7 +118,7 @@ foreach ($list as $item) {
} }
} }
}else{ }else{
if (split_file("$item")==0){ if (split_file("$path","$item","$destination")==0){
if ($move_processed){ if ($move_processed){
if (!is_dir("$path/$processed_subdir")){ if (!is_dir("$path/$processed_subdir")){
mkdir("$path/$processed_subdir",0777); mkdir("$path/$processed_subdir",0777);
...@@ -129,10 +129,8 @@ foreach ($list as $item) { ...@@ -129,10 +129,8 @@ foreach ($list as $item) {
} }
} }
function split_file($file){ function split_file($path,$file,$destination){
global $path;
global $destination;
global $startMarkerWithExif; global $startMarkerWithExif;
global $chunksize; global $chunksize;
global $input_exts; global $input_exts;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment