WEB: Load localized data in models

This commit is contained in:
Mataniko
2020-10-10 01:34:06 -04:00
committed by Matan Bareket
parent 34dbf61a23
commit 08fffe6dd0
11 changed files with 32 additions and 28 deletions
+1 -4
View File
@@ -16,10 +16,7 @@ class SimpleModel extends BasicModel
public function __construct($type, $filename)
{
parent::__construct();
$this->filename = DIR_DATA . "/$filename";
if (!is_file($this->filename) || !is_readable($this->filename)) {
throw new \ErrorException(\sprintf(self::FILE_NOT_FOUND, $this->filename));
}
$this->filename = $this->getLocalizedFile($filename);
$this->type = "ScummVM\Objects\\$type";
}