|
|
|
|
@ -468,30 +468,10 @@ class OC_App {
|
|
|
|
|
* get a list of all apps in the apps folder
|
|
|
|
|
*
|
|
|
|
|
* @return string[] an array of app names (string IDs)
|
|
|
|
|
* @todo: change the name of this method to getInstalledApps, which is more accurate
|
|
|
|
|
* @deprecated 31.0.0 Use IAppManager::getAllAppsInAppsFolders instead
|
|
|
|
|
*/
|
|
|
|
|
public static function getAllApps(): array {
|
|
|
|
|
$apps = [];
|
|
|
|
|
|
|
|
|
|
foreach (OC::$APPSROOTS as $apps_dir) {
|
|
|
|
|
if (!is_readable($apps_dir['path'])) {
|
|
|
|
|
\OCP\Server::get(LoggerInterface::class)->warning('unable to read app folder : ' . $apps_dir['path'], ['app' => 'core']);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
$dh = opendir($apps_dir['path']);
|
|
|
|
|
|
|
|
|
|
if (is_resource($dh)) {
|
|
|
|
|
while (($file = readdir($dh)) !== false) {
|
|
|
|
|
if ($file[0] != '.' and is_dir($apps_dir['path'] . '/' . $file) and is_file($apps_dir['path'] . '/' . $file . '/appinfo/info.xml')) {
|
|
|
|
|
$apps[] = $file;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$apps = array_unique($apps);
|
|
|
|
|
|
|
|
|
|
return $apps;
|
|
|
|
|
return \OCP\Server::get(IAppManager::class)->getAllAppsInAppsFolders();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -512,9 +492,9 @@ class OC_App {
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
public function listAllApps(): array {
|
|
|
|
|
$installedApps = OC_App::getAllApps();
|
|
|
|
|
|
|
|
|
|
$appManager = \OC::$server->getAppManager();
|
|
|
|
|
|
|
|
|
|
$installedApps = $appManager->getAllAppsInAppsFolders();
|
|
|
|
|
//we don't want to show configuration for these
|
|
|
|
|
$blacklist = $appManager->getAlwaysEnabledApps();
|
|
|
|
|
$appList = [];
|
|
|
|
|
|