Skip to content

Commit 4d610bb

Browse files
lfalsbackportbot-libresign[bot]
authored andcommitted
refactor(migration): replace app config accessors
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
1 parent 073aafb commit 4d610bb

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lib/Migration/Version12000Date20250517134200.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
use Closure;
1313
use OCA\Libresign\AppInfo\Application;
1414
use OCP\DB\ISchemaWrapper;
15-
use OCP\IConfig;
15+
use OCP\IAppConfig;
1616
use OCP\Migration\IOutput;
1717
use OCP\Migration\SimpleMigrationStep;
1818

1919
class Version12000Date20250517134200 extends SimpleMigrationStep {
2020
public function __construct(
21-
protected IConfig $config,
21+
protected IAppConfig $appConfig,
2222
) {
2323
}
2424

@@ -29,11 +29,11 @@ public function __construct(
2929
*/
3030
#[\Override]
3131
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
32-
$keys = $this->config->getAppKeys(Application::APP_ID);
32+
$keys = $this->appConfig->getKeys(Application::APP_ID);
3333
if (in_array('notify_unsigned_user', $keys)) {
34-
$current = $this->config->getAppValue(Application::APP_ID, 'notify_unsigned_user');
35-
$this->config->setAppValue('activity', 'notify_email_libresign_file_to_sign', $current ? '1' : '0');
36-
$this->config->deleteAppValue(Application::APP_ID, 'notify_unsigned_user');
34+
$current = $this->appConfig->getValueString(Application::APP_ID, 'notify_unsigned_user');
35+
$this->appConfig->setValueString('activity', 'notify_email_libresign_file_to_sign', $current ? '1' : '0');
36+
$this->appConfig->deleteKey(Application::APP_ID, 'notify_unsigned_user');
3737
}
3838
}
3939
}

0 commit comments

Comments
 (0)