mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
parent
2d76afee6f
commit
8958e65ec2
3 changed files with 34 additions and 33 deletions
|
|
@ -267,38 +267,38 @@ class PluginImportService
|
|||
|
||||
// If zipEntryPath is specified, look for files in that specific directory first
|
||||
if ($zipEntryPath) {
|
||||
$targetDir = $tempDir . '/' . $zipEntryPath;
|
||||
$targetDir = $tempDir.'/'.$zipEntryPath;
|
||||
if (File::exists($targetDir)) {
|
||||
// Check if files are directly in the target directory
|
||||
if (File::exists($targetDir . '/settings.yml')) {
|
||||
$settingsYamlPath = $targetDir . '/settings.yml';
|
||||
|
||||
if (File::exists($targetDir . '/full.liquid')) {
|
||||
$fullLiquidPath = $targetDir . '/full.liquid';
|
||||
} elseif (File::exists($targetDir . '/full.blade.php')) {
|
||||
$fullLiquidPath = $targetDir . '/full.blade.php';
|
||||
if (File::exists($targetDir.'/settings.yml')) {
|
||||
$settingsYamlPath = $targetDir.'/settings.yml';
|
||||
|
||||
if (File::exists($targetDir.'/full.liquid')) {
|
||||
$fullLiquidPath = $targetDir.'/full.liquid';
|
||||
} elseif (File::exists($targetDir.'/full.blade.php')) {
|
||||
$fullLiquidPath = $targetDir.'/full.blade.php';
|
||||
}
|
||||
|
||||
if (File::exists($targetDir . '/shared.liquid')) {
|
||||
$sharedLiquidPath = $targetDir . '/shared.liquid';
|
||||
|
||||
if (File::exists($targetDir.'/shared.liquid')) {
|
||||
$sharedLiquidPath = $targetDir.'/shared.liquid';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Check if files are in src subdirectory of target directory
|
||||
if (!$settingsYamlPath && File::exists($targetDir . '/src/settings.yml')) {
|
||||
$settingsYamlPath = $targetDir . '/src/settings.yml';
|
||||
|
||||
if (File::exists($targetDir . '/src/full.liquid')) {
|
||||
$fullLiquidPath = $targetDir . '/src/full.liquid';
|
||||
} elseif (File::exists($targetDir . '/src/full.blade.php')) {
|
||||
$fullLiquidPath = $targetDir . '/src/full.blade.php';
|
||||
if (! $settingsYamlPath && File::exists($targetDir.'/src/settings.yml')) {
|
||||
$settingsYamlPath = $targetDir.'/src/settings.yml';
|
||||
|
||||
if (File::exists($targetDir.'/src/full.liquid')) {
|
||||
$fullLiquidPath = $targetDir.'/src/full.liquid';
|
||||
} elseif (File::exists($targetDir.'/src/full.blade.php')) {
|
||||
$fullLiquidPath = $targetDir.'/src/full.blade.php';
|
||||
}
|
||||
|
||||
if (File::exists($targetDir . '/src/shared.liquid')) {
|
||||
$sharedLiquidPath = $targetDir . '/src/shared.liquid';
|
||||
|
||||
if (File::exists($targetDir.'/src/shared.liquid')) {
|
||||
$sharedLiquidPath = $targetDir.'/src/shared.liquid';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// If we found the required files in the target directory, return them
|
||||
if ($settingsYamlPath && $fullLiquidPath) {
|
||||
return [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue