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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user