Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Guilherme Filippo
ISPConfig 3
Commits
f780d7e1
Commit
f780d7e1
authored
Jan 19, 2010
by
tbrehm
Browse files
Fixed: FS#1010 - Delete Reseller -> Customers messed up
parent
ba9f0329
Changes
2
Hide whitespace changes
Inline
Side-by-side
interface/web/client/lib/lang/en.lng
View file @
f780d7e1
...
...
@@ -9,4 +9,6 @@ $wb['Edit Client-Templates'] = 'Edit Client-Templates';
$wb
[
'Add Reseller'
]
=
'Add Reseller'
;
$wb
[
'Edit Reseller'
]
=
'Edit Reseller'
;
$wb
[
'Resellers'
]
=
'Resellers'
;
$wb
[
"error_has_clients"
]
=
'This reseller has clients. Delete the clients of the reseller first.'
;
?>
\ No newline at end of file
interface/web/client/reseller_del.php
View file @
f780d7e1
...
...
@@ -51,6 +51,17 @@ $app->uses('tpl,tform');
$app
->
load
(
'tform_actions'
);
class
page_action
extends
tform_actions
{
function
onBeforeDelete
()
{
global
$app
,
$conf
;
$client_id
=
intval
(
$this
->
dataRecord
[
'client_id'
]);
$tmp
=
$app
->
db
->
queryOneRecord
(
"SELECT count(client_id) as number FROM client WHERE parent_client_id = "
.
$client_id
);
if
(
$tmp
[
"number"
]
>
0
)
$app
->
error
(
$app
->
lng
(
'error_has_clients'
));
}
function
onAfterDelete
()
{
global
$app
,
$conf
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment