Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Helmo
ISPConfig 3
Commits
21ee812c
Commit
21ee812c
authored
8 years ago
by
Till Brehm
Browse files
Options
Downloads
Patches
Plain Diff
Fixed #4029 client_delete_everything API only database entries removed
parent
fdc9446e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
interface/lib/classes/db_mysql.inc.php
+1
-1
1 addition, 1 deletion
interface/lib/classes/db_mysql.inc.php
interface/lib/classes/remote.d/client.inc.php
+1
-4
1 addition, 4 deletions
interface/lib/classes/remote.d/client.inc.php
with
2 additions
and
5 deletions
interface/lib/classes/db_mysql.inc.php
+
1
−
1
View file @
21ee812c
...
@@ -261,7 +261,6 @@ class db extends mysqli
...
@@ -261,7 +261,6 @@ class db extends mysqli
$aArgs
=
func_get_args
();
$aArgs
=
func_get_args
();
$sQuery
=
call_user_func_array
(
array
(
&
$this
,
'_build_query_string'
),
$aArgs
);
$sQuery
=
call_user_func_array
(
array
(
&
$this
,
'_build_query_string'
),
$aArgs
);
$this
->
securityScan
(
$sQuery
);
$this
->
securityScan
(
$sQuery
);
$this
->
_iQueryId
=
@
mysqli_query
(
$this
->
_iConnId
,
$sQuery
);
$this
->
_iQueryId
=
@
mysqli_query
(
$this
->
_iConnId
,
$sQuery
);
if
(
!
$this
->
_iQueryId
)
{
if
(
!
$this
->
_iQueryId
)
{
$this
->
_sqlerror
(
'Falsche Anfrage / Wrong Query'
,
'SQL-Query = '
.
$sQuery
);
$this
->
_sqlerror
(
'Falsche Anfrage / Wrong Query'
,
'SQL-Query = '
.
$sQuery
);
...
@@ -634,6 +633,7 @@ class db extends mysqli
...
@@ -634,6 +633,7 @@ class db extends mysqli
$diffstr
=
serialize
(
$diffrec_full
);
$diffstr
=
serialize
(
$diffrec_full
);
$username
=
$_SESSION
[
's'
][
'user'
][
'username'
];
$username
=
$_SESSION
[
's'
][
'user'
][
'username'
];
$dbidx
=
$primary_field
.
':'
.
$primary_id
;
$dbidx
=
$primary_field
.
':'
.
$primary_id
;
if
(
trim
(
$username
)
==
''
)
$username
=
'none'
;
if
(
$action
==
'INSERT'
)
$action
=
'i'
;
if
(
$action
==
'INSERT'
)
$action
=
'i'
;
if
(
$action
==
'UPDATE'
)
$action
=
'u'
;
if
(
$action
==
'UPDATE'
)
$action
=
'u'
;
...
...
This diff is collapsed.
Click to expand it.
interface/lib/classes/remote.d/client.inc.php
+
1
−
4
View file @
21ee812c
...
@@ -404,10 +404,9 @@ class remoting_client extends remoting {
...
@@ -404,10 +404,9 @@ class remoting_client extends remoting {
$app
->
db
->
query
(
"DELETE FROM sys_user WHERE client_id = ?"
,
$client_id
);
$app
->
db
->
query
(
"DELETE FROM sys_user WHERE client_id = ?"
,
$client_id
);
//* Delete all records (sub-clients, mail, web, etc....) of this client.
//* Delete all records (sub-clients, mail, web, etc....) of this client.
$tables
=
'cron,
client,
dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain,web_traffic,domain'
;
$tables
=
'cron,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain,web_traffic,domain
,mail_mailinglist,client
'
;
$tables_array
=
explode
(
','
,
$tables
);
$tables_array
=
explode
(
','
,
$tables
);
$client_group_id
=
$app
->
functions
->
intval
(
$client_group
[
'groupid'
]);
$client_group_id
=
$app
->
functions
->
intval
(
$client_group
[
'groupid'
]);
if
(
$client_group_id
>
1
)
{
if
(
$client_group_id
>
1
)
{
foreach
(
$tables_array
as
$table
)
{
foreach
(
$tables_array
as
$table
)
{
if
(
$table
!=
''
)
{
if
(
$table
!=
''
)
{
...
@@ -418,7 +417,6 @@ class remoting_client extends remoting {
...
@@ -418,7 +417,6 @@ class remoting_client extends remoting {
foreach
(
$table_info
as
$tmp
)
{
foreach
(
$table_info
as
$tmp
)
{
if
(
$tmp
[
'option'
]
==
'primary'
)
$index_field
=
$tmp
[
'name'
];
if
(
$tmp
[
'option'
]
==
'primary'
)
$index_field
=
$tmp
[
'name'
];
}
}
//* Delete the records
//* Delete the records
if
(
$index_field
!=
''
)
{
if
(
$index_field
!=
''
)
{
if
(
is_array
(
$records
))
{
if
(
is_array
(
$records
))
{
...
@@ -441,7 +439,6 @@ class remoting_client extends remoting {
...
@@ -441,7 +439,6 @@ class remoting_client extends remoting {
}
}
}
}
if
(
!
$this
->
checkPerm
(
$session_id
,
'client_delete'
))
{
if
(
!
$this
->
checkPerm
(
$session_id
,
'client_delete'
))
{
throw
new
SoapFault
(
'permission_denied'
,
'You do not have the permissions to access this function.'
);
throw
new
SoapFault
(
'permission_denied'
,
'You do not have the permissions to access this function.'
);
return
false
;
return
false
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment