mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 07:52:16 +00:00
Fixed includes of filter type in FilterCmptLib when it is declared in an extension
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -151,5 +151,5 @@ export const CoreFilterAPIs = {
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -52,5 +52,5 @@ export const CoreNavigationAPIs = {
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user