ENH Set the default resources dir to "_resources"

This commit is contained in:
Guy Sartorelli 2022-08-04 11:36:54 +12:00
parent 37dc0daacc
commit ee4144fc35

View File

@ -219,7 +219,7 @@ if (!defined('TEMP_FOLDER')) {
// Define the resource dir constant that will be use to exposed vendor assets
if (!defined('RESOURCES_DIR')) {
$project = new SilverStripe\Core\Manifest\Module(BASE_PATH, BASE_PATH);
$resourcesDir = $project->getResourcesDir() ?: 'resources';
$resourcesDir = $project->getResourcesDir() ?: '_resources';
if (preg_match('/^[_\-a-z0-9]+$/i', $resourcesDir ?? '')) {
define('RESOURCES_DIR', $resourcesDir);
} else {