diff options
author | Alexey Kulakov <panda75@bk.ru> | 2014-12-08 19:32:16 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2014-12-08 19:32:16 +0000 |
commit | 9e46759e7968e312841f7050a42f64808b4c0d22 (patch) | |
tree | 8bcc8fe951332f18533bd484a7ede98aa1156c47 /plugins/Utils.pas/dbsettings.pas | |
parent | f43e875851959070502a73d8313ca1586e0e54d1 (diff) |
Awkward's private repo sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@11279 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Utils.pas/dbsettings.pas')
-rw-r--r-- | plugins/Utils.pas/dbsettings.pas | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/Utils.pas/dbsettings.pas b/plugins/Utils.pas/dbsettings.pas index 1963248587..5679ef9fd1 100644 --- a/plugins/Utils.pas/dbsettings.pas +++ b/plugins/Utils.pas/dbsettings.pas @@ -37,7 +37,7 @@ function DBDeleteSetting(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiCh function DBDeleteGroup(hContact:TMCONTACT;szModule:PAnsiChar;prefix:pAnsiChar=nil):int_ptr;
-function DBDeleteModule(szModule:PAnsiChar):integer; // 0.8.0+
+function DBDeleteModule(hContact:TMCONTACT;szModule:PAnsiChar):integer;
function DBGetSettingType(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
@@ -236,6 +236,13 @@ var len:cardinal;
mask:array [0..31] of AnsiChar;
begin
+ if (prefix=nil) or (prefix^=#0) then
+ begin
+ DBDeleteModule(hContact,szModule);
+ result:=0;
+ exit;
+ end;
+
ces.szModule:=szModule;
num:=0;
//calculate size for setting names buffer
@@ -308,10 +315,10 @@ begin FreeMem(p);
end;
-function DBDeleteModule(szModule:PAnsiChar):integer;
+function DBDeleteModule(hContact:TMCONTACT;szModule:PAnsiChar):integer;
begin
result:=0;
- CallService(MS_DB_MODULE_DELETE,0,lParam(szModule));
+ CallService(MS_DB_MODULE_DELETE,hContact,lParam(szModule));
end;
function DBGetSettingType(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
|