mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 17:59:55 +02:00
24 lines
527 B
PHP
24 lines
527 B
PHP
<?php
|
|
require_once __DIR__.'/../videos/configuration.php';
|
|
|
|
header('Content-Type: application/json');
|
|
|
|
if(!User::isAdmin()){
|
|
forbiddenPage('You Must be admin');
|
|
}
|
|
|
|
if(!empty($global['disableAdvancedConfigurations'])){
|
|
forbiddenPage('Configuration disabled');
|
|
}
|
|
|
|
$pluginsDir = __DIR__ . '/plugins/';
|
|
$files = [];
|
|
|
|
// Check if directory exists
|
|
if (is_dir($pluginsDir)) {
|
|
foreach (glob($pluginsDir . "*.zip") as $file) {
|
|
$files[] = basename($file); // Add only the file name
|
|
}
|
|
}
|
|
|
|
echo json_encode($files);
|