You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nextcloud-server/tests/enable_all.php

31 lines
719 B

<?php
/**
* SPDX-FileCopyrightText: 2016-2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2012-2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
use OC\Installer;
use OCP\App\IAppManager;
use OCP\Server;
require_once __DIR__ . '/../lib/base.php';
function enableApp($app) {
$installer = Server::get(Installer::class);
$appManager = Server::get(IAppManager::class);
$installer->installApp($app);
$appManager->enableApp($app);
echo "Enabled application {$app}\n";
}
foreach (new \DirectoryIterator(__DIR__ . '/../apps/') as $file) {
if ($file->isDot()) {
continue;
}
if (!file_exists($file->getPathname() . '/.git')) {
enableApp($file->getFilename());
}
}