mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-18 05:20:45 +01:00
31 lines
877 B
PHP
31 lines
877 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
/**
|
|
* SPDX-FileCopyrightText: 2020-2024 LibreCode coop and contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace OCA\Libresign\Migration;
|
|
|
|
use Closure;
|
|
use OCA\Libresign\AppInfo\Application;
|
|
use OCP\IAppConfig;
|
|
use OCP\Migration\IOutput;
|
|
use OCP\Migration\SimpleMigrationStep;
|
|
|
|
class Version8000Date20230608004729 extends SimpleMigrationStep {
|
|
public function __construct(
|
|
protected IAppConfig $appConfig,
|
|
) {
|
|
}
|
|
|
|
#[\Override]
|
|
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
|
|
$cfsslBin = $this->appConfig->getValueString(Application::APP_ID, 'cfssl_bin');
|
|
$cfsslUrl = $this->appConfig->getValueString(Application::APP_ID, 'cfssl_url');
|
|
if ($cfsslBin || $cfsslUrl) {
|
|
$this->appConfig->setValueString(Application::APP_ID, 'certificate_engine', 'cfssl');
|
|
}
|
|
}
|
|
}
|