File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 33$ Vendor = __DIR__ . DIRECTORY_SEPARATOR . 'vendor ' ;
44
55$ loadL10N = function (string $ Language ) use (&$ Vendor ) {
6+ if (!file_exists (__DIR__ . DIRECTORY_SEPARATOR . 'DocGen ' . DIRECTORY_SEPARATOR . $ Language . '.yml ' )) {
7+ echo 'Unable to read the " ' . $ Language . '" language files! ' ;
8+ die;
9+ }
10+ $ DataDocGen = file_get_contents (__DIR__ . DIRECTORY_SEPARATOR . 'DocGen ' . DIRECTORY_SEPARATOR . $ Language . '.yml ' );
11+ $ Language = preg_replace ('~-.*$~ ' , '' , $ Language );
612 if (
7- !file_exists (__DIR__ . DIRECTORY_SEPARATOR . 'DocGen ' . DIRECTORY_SEPARATOR . $ Language . '.yml ' ) ||
813 !file_exists ($ Vendor . DIRECTORY_SEPARATOR . 'phpmussel ' . DIRECTORY_SEPARATOR . 'frontend ' . DIRECTORY_SEPARATOR . 'l10n ' . DIRECTORY_SEPARATOR . $ Language . '.yml ' ) ||
914 !file_exists ($ Vendor . DIRECTORY_SEPARATOR . 'phpmussel ' . DIRECTORY_SEPARATOR . 'web ' . DIRECTORY_SEPARATOR . 'l10n ' . DIRECTORY_SEPARATOR . $ Language . '.yml ' ) ||
1015 !file_exists ($ Vendor . DIRECTORY_SEPARATOR . 'phpmussel ' . DIRECTORY_SEPARATOR . 'phpmailer ' . DIRECTORY_SEPARATOR . 'l10n ' . DIRECTORY_SEPARATOR . $ Language . '.yml ' )
1318 die;
1419 }
1520 $ YAML = new \Maikuolan \Common \YAML ();
21+ if (file_exists ($ Vendor . DIRECTORY_SEPARATOR . 'phpmussel ' . DIRECTORY_SEPARATOR . 'frontend ' . DIRECTORY_SEPARATOR . 'assets ' . DIRECTORY_SEPARATOR . 'references.yml ' )) {
22+ $ Data = file_get_contents ($ Vendor . DIRECTORY_SEPARATOR . 'phpmussel ' . DIRECTORY_SEPARATOR . 'frontend ' . DIRECTORY_SEPARATOR . 'assets ' . DIRECTORY_SEPARATOR . 'references.yml ' );
23+ $ YAML ->process ($ Data , $ YAML ->Refs );
24+ }
1625 $ Arr = [];
17- $ DataDocGen = file_get_contents (__DIR__ . DIRECTORY_SEPARATOR . 'DocGen ' . DIRECTORY_SEPARATOR . $ Language . '.yml ' );
1826 $ YAML ->process ($ DataDocGen , $ Arr );
1927 foreach (['frontend ' , 'web ' , 'phpmailer ' ] as $ Dir ) {
2028 $ DataThisDir = file_get_contents ($ Vendor . DIRECTORY_SEPARATOR . 'phpmussel ' . DIRECTORY_SEPARATOR . $ Dir . DIRECTORY_SEPARATOR . 'l10n ' . DIRECTORY_SEPARATOR . $ Language . '.yml ' );
You can’t perform that action at this time.
0 commit comments