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
ISPConfig
ISPConfig 3
Commits
fe11e421
Commit
fe11e421
authored
Aug 01, 2008
by
tbrehm
Browse files
Bugfix: Custom rules field not emptied when a custom mail filter is deleted.
parent
c30ad791
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/web/mail/mail_user_filter_del.php
View file @
fe11e421
...
...
@@ -45,7 +45,39 @@ require_once('../../lib/app.inc.php');
//* Check permissions for module
$app
->
auth
->
check_module_permissions
(
'mail'
);
$app
->
uses
(
"tform_actions"
);
$app
->
tform_actions
->
onDelete
();
// Loading classes
$app
->
uses
(
'tpl,tform,tform_actions'
);
$app
->
load
(
'tform_actions'
);
class
page_action
extends
tform_actions
{
function
onAfterDelete
()
{
global
$app
,
$conf
;
$mailuser
=
$app
->
db
->
queryOneRecord
(
"SELECT custom_mailfilter FROM mail_user WHERE mailuser_id = "
.
$this
->
dataRecord
[
"mailuser_id"
]);
$skip
=
false
;
$lines
=
explode
(
"
\n
"
,
$mailuser
[
'custom_mailfilter'
]);
$out
=
''
;
foreach
(
$lines
as
$line
)
{
$line
=
trim
(
$line
);
if
(
$line
==
'### BEGIN FILTER_ID:'
.
$this
->
id
)
{
$skip
=
true
;
}
if
(
$skip
==
false
&&
$line
!=
''
)
$out
.
=
$line
.
"
\n
"
;
if
(
$line
==
'### END FILTER_ID:'
.
$this
->
id
)
{
$skip
=
false
;
}
}
$out
=
addslashes
(
$out
);
$app
->
db
->
datalogUpdate
(
'mail_user'
,
"custom_mailfilter = '
$out
'"
,
'mailuser_id'
,
$this
->
dataRecord
[
"mailuser_id"
]);
}
}
$page
=
new
page_action
;
$page
->
onDelete
();
?>
\ No newline at end of file
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