Brought cron upload tag handling inline with everything else

This commit is contained in:
matthew 2019-06-01 12:12:36 -05:00
parent e92ac10349
commit 3e2a0ea3b5

View File

@ -351,20 +351,10 @@ class CronUploader extends Extension
foreach (new RecursiveIteratorIterator($ite) as $fullpath=>$cur) { foreach (new RecursiveIteratorIterator($ite) as $fullpath=>$cur) {
if (!is_link($fullpath) && !is_dir($fullpath)) { if (!is_link($fullpath) && !is_dir($fullpath)) {
$pathinfo = pathinfo($fullpath); $pathinfo = pathinfo($fullpath);
$matches = [];
$relativePath = substr($fullpath,strlen($base));
if (preg_match("/\d+ - (.*)\.([a-zA-Z]+)/", $pathinfo ["basename"], $matches)) { $tags = path_to_tags($relativePath);
$tags = $matches [1];
} else {
$tags = $subdir;
$tags = str_replace("/", " ", $tags);
$tags = str_replace("__", " ", $tags);
if ($tags == "") {
$tags = " ";
}
$tags = trim($tags);
}
$img = [ $img = [
0 => $fullpath, 0 => $fullpath,
1 => $pathinfo ["basename"], 1 => $pathinfo ["basename"],