mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Language loading exception added
This commit is contained in:
parent
961a386e12
commit
a626c0d0f0
|
|
@ -14,6 +14,7 @@
|
|||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\Module;
|
||||
use phpOMS\System\FilePathException;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -91,8 +92,6 @@ abstract class ModuleAbstract
|
|||
*
|
||||
* @param \phpOMS\ApplicationAbstract $app Application instance
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn
|
||||
*/
|
||||
|
|
@ -134,6 +133,10 @@ abstract class ModuleAbstract
|
|||
$lang = [];
|
||||
if (isset(static::$localization[$destination])) {
|
||||
foreach (static::$localization[$destination] as $file) {
|
||||
if(($path = $path = realpath(__DIR__ . '/../../Modules/' . static::$module . '/Theme/lang/' . $file . '.' . $language . '.lang.php')) === false) {
|
||||
throw new FilePathException(__DIR__ . '/../../Modules/' . static::$module . '/Theme/lang/' . $file . '.' . $language . '.lang.php');
|
||||
}
|
||||
|
||||
/** @noinspection PhpIncludeInspection */
|
||||
include realpath(__DIR__ . '/../../Modules/' . static::$module . '/Theme/lang/' . $file . '.' . $language . '.lang.php');
|
||||
/** @var array $MODLANG */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user