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

18 lines
700 B
PHP

<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
require_once $global['systemRootPath'] . 'objects/plugin.php';
require_once $global['systemRootPath'] . 'objects/user.php';
header('Content-Type: application/json');
$row = Plugin::getAll();
if (!User::isAdmin()) {
foreach ($row as $key => $value) {
if (!empty($row[$key]->installedPlugin['object_data'])) {
$row[$key]->installedPlugin['object_data'] = '';
}
}
}
$total = Plugin::getTotal();
echo '{ "current": '.$_POST['current'].',"rowCount": '.$_POST['rowCount'].', "total": '.$total.', "rows":'. json_encode($row).'}';