Skip to content

Commit a9cb703

Browse files
committed
Scripts patch.
1 parent 49321f1 commit a9cb703

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

scripts/DocGen.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
$Vendor = __DIR__ . DIRECTORY_SEPARATOR . 'vendor';
44

55
$loadL10N = function (string $Language) use (&$Vendor) {
6+
if (
7+
!file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'DocGen' . DIRECTORY_SEPARATOR . $Language . '.yml') ||
8+
!file_exists($Vendor . DIRECTORY_SEPARATOR . 'phpmussel' . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'l10n' . DIRECTORY_SEPARATOR . $Language . '.yml') ||
9+
!file_exists($Vendor . DIRECTORY_SEPARATOR . 'phpmussel' . DIRECTORY_SEPARATOR . 'web' . DIRECTORY_SEPARATOR . 'l10n' . DIRECTORY_SEPARATOR . $Language . '.yml') ||
10+
!file_exists($Vendor . DIRECTORY_SEPARATOR . 'phpmussel' . DIRECTORY_SEPARATOR . 'phpmailer' . DIRECTORY_SEPARATOR . 'l10n' . DIRECTORY_SEPARATOR . $Language . '.yml')
11+
) {
12+
echo 'Unable to read the "' . $Language . '" language files!';
13+
die;
14+
}
615
$YAML = new \Maikuolan\Common\YAML();
716
$Arr = [];
817
$DataDocGen = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'DocGen' . DIRECTORY_SEPARATOR . $Language . '.yml');

0 commit comments

Comments
 (0)