1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-08 23:56:58 +02:00

CoreImage: API rework

This commit is contained in:
Nick Liu
2020-03-23 22:40:28 -05:00
parent 76bb9f6ad8
commit b425b4e45d
7 changed files with 331 additions and 323 deletions

View File

@@ -17,11 +17,21 @@ class e_file_inspector_json extends e_file_inspector
* @param $jsonFilePath string Absolute path to the file inspector database
*/
public function __construct($jsonFilePath = null)
{
parent::__construct($jsonFilePath);
}
/**
* @inheritDoc
*/
public function loadDatabase()
{
global $core_image;
if ($jsonFilePath === null) $jsonFilePath = e_ADMIN . "core_image.php";
require($jsonFilePath);
$this->coreImage = self::array_slash(json_decode($core_image, true));
@include($this->database);
$this->coreImage = json_decode($core_image, true);
if (!is_array($this->coreImage)) $this->coreImage = [];
$this->coreImage = self::array_slash($this->coreImage);
if (!$this->coreImage) $this->coreImage = [];
unset($core_image);
}