Fixed includes of filter type in FilterCmptLib when it is declared in an extension

This commit is contained in:
Paolo
2022-07-12 14:09:17 +02:00
parent f7e057d7db
commit ae70dbcb64
4 changed files with 12 additions and 5 deletions
+9 -2
View File
@@ -355,7 +355,7 @@ function sanitizeProblemChars($str)
/**
*
*/
function findResource($path, $resource, $subdir = false)
function findResource($path, $resource, $subdir = false, $extraDir = null)
{
// Place a / character at the and of the string if not present
if (strrpos($path, '/') < strlen($path) - 1) $path .= '/';
@@ -371,7 +371,14 @@ function findResource($path, $resource, $subdir = false)
// If entry is a directory but not the current and subdirectories should be loaded
if ($subdir === true && $entry != '.' && $entry != '..' && is_dir($path.$entry))
{
$tmpPaths[] = $path.$entry.'/';
if ($extension == null)
{
$tmpPaths[] = $path.$entry.'/';
}
else
{
$tmpPaths[] = $path.$entry.'/'.$extraDir.'/';
}
}
}
closedir($dirHandler);
+1 -1
View File
@@ -142,7 +142,7 @@ class FilterCmptLib
}
else
{
$filePath = findResource(APPPATH.'components/extensions/', $this->_filterType, true);
$filePath = findResource(APPPATH.'components/extensions/', $this->_filterType, true, 'filters');
if (!isEmptyString($filePath)) require_once($filePath);
}
+1 -1
View File
@@ -151,5 +151,5 @@ export const CoreFilterAPIs = {
}
);
}
}
};
+1 -1
View File
@@ -52,5 +52,5 @@ export const CoreNavigationAPIs = {
}
);
}
}
};