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