1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Oinktube/plugin/API/status.json.php
2022-03-17 11:43:59 -03:00

23 lines
648 B
PHP

<?php
$configFile = '../../videos/configuration.php';
if (!file_exists($configFile)) {
[$scriptPath] = get_included_files();
$path = pathinfo($scriptPath);
$configFile = $path['dirname'] . "/" . $configFile;
}
require_once $configFile;
require_once $global['systemRootPath'].'plugin/API/API.php';
header('Content-Type: application/json');
$plugin = AVideoPlugin::loadPluginIfEnabled("API");
$objData = AVideoPlugin::getObjectDataIfEnabled("API");
if (empty($plugin)) {
$obj = new ApiObject("API Plugin disabled");
} else {
$obj = new ApiObject("API Plugin enabled", false);
}
die(json_encode($obj));