mirror of
https://github.com/nextcloud/server.git
synced 2026-02-11 23:04:22 -05:00
Simply let the Exception bubble up instead of caching it and using grep to then detect it. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
22 lines
534 B
PHP
22 lines
534 B
PHP
<?php
|
|
/**
|
|
* SPDX-FileCopyrightText: 2016-2025 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-FileCopyrightText: 2012-2016 ownCloud, Inc.
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
require_once __DIR__ . '/../lib/base.php';
|
|
|
|
function enableApp($app) {
|
|
(new \OC_App())->enable($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());
|
|
}
|
|
}
|