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) {
if (!is_link($fullpath) && !is_dir($fullpath)) {
$pathinfo = pathinfo($fullpath);
$matches = [];
if (preg_match("/\d+ - (.*)\.([a-zA-Z]+)/", $pathinfo ["basename"], $matches)) {
$tags = $matches [1];
} else {
$tags = $subdir;
$tags = str_replace("/", " ", $tags);
$tags = str_replace("__", " ", $tags);
if ($tags == "") {
$tags = " ";
}
$tags = trim($tags);
}
$relativePath = substr($fullpath,strlen($base));
$tags = path_to_tags($relativePath);
$img = [
0 => $fullpath,
1 => $pathinfo ["basename"],