1212use Closure ;
1313use OCA \Libresign \AppInfo \Application ;
1414use OCP \DB \ISchemaWrapper ;
15- use OCP \IConfig ;
15+ use OCP \IAppConfig ;
1616use OCP \Migration \IOutput ;
1717use OCP \Migration \SimpleMigrationStep ;
1818
1919class 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