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
6877c68c
Commit
6877c68c
authored
Jul 08, 2014
by
Sergio
Browse files
change page_form with this, left it when moving from plugin to web
parent
aee9d677
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/web/mail/mail_domain_edit.php
View file @
6877c68c
...
...
@@ -259,17 +259,17 @@ class page_action extends tform_actions {
global
$app
,
$conf
;
// Spamfilter policy
$policy_id
=
$app
->
functions
->
intval
(
$
page_form
->
dataRecord
[
"policy"
]);
$policy_id
=
$app
->
functions
->
intval
(
$
this
->
dataRecord
[
"policy"
]);
if
(
$policy_id
>
0
)
{
$tmp_user
=
$app
->
db
->
queryOneRecord
(
"SELECT id FROM spamfilter_users WHERE email = '@"
.
$app
->
db
->
quote
(
$
page_form
->
dataRecord
[
"domain"
])
.
"'"
);
$tmp_user
=
$app
->
db
->
queryOneRecord
(
"SELECT id FROM spamfilter_users WHERE email = '@"
.
$app
->
db
->
quote
(
$
this
->
dataRecord
[
"domain"
])
.
"'"
);
if
(
$tmp_user
[
"id"
]
>
0
)
{
// There is already a record that we will update
$app
->
db
->
datalogUpdate
(
'spamfilter_users'
,
"policy_id =
$policy_id
"
,
'id'
,
$tmp_user
[
"id"
]);
}
else
{
$tmp_domain
=
$app
->
db
->
queryOneRecord
(
"SELECT sys_groupid FROM mail_domain WHERE domain_id = "
.
$
page_form
->
id
);
$tmp_domain
=
$app
->
db
->
queryOneRecord
(
"SELECT sys_groupid FROM mail_domain WHERE domain_id = "
.
$
this
->
id
);
// We create a new record
$insert_data
=
"(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`)
VALUES ("
.
$_SESSION
[
"s"
][
"user"
][
"userid"
]
.
", "
.
$app
->
functions
->
intval
(
$tmp_domain
[
"sys_groupid"
])
.
", 'riud', 'riud', '', "
.
$app
->
functions
->
intval
(
$
page_form
->
dataRecord
[
"server_id"
])
.
", 5, "
.
$app
->
functions
->
intval
(
$policy_id
)
.
", '@"
.
$app
->
db
->
quote
(
$
page_form
->
dataRecord
[
"domain"
])
.
"', '@"
.
$app
->
db
->
quote
(
$
page_form
->
dataRecord
[
"domain"
])
.
"', 'Y')"
;
VALUES ("
.
$_SESSION
[
"s"
][
"user"
][
"userid"
]
.
", "
.
$app
->
functions
->
intval
(
$tmp_domain
[
"sys_groupid"
])
.
", 'riud', 'riud', '', "
.
$app
->
functions
->
intval
(
$
this
->
dataRecord
[
"server_id"
])
.
", 5, "
.
$app
->
functions
->
intval
(
$policy_id
)
.
", '@"
.
$app
->
db
->
quote
(
$
this
->
dataRecord
[
"domain"
])
.
"', '@"
.
$app
->
db
->
quote
(
$
this
->
dataRecord
[
"domain"
])
.
"', 'Y')"
;
$app
->
db
->
datalogInsert
(
'spamfilter_users'
,
$insert_data
,
'id'
);
unset
(
$tmp_domain
);
}
...
...
@@ -306,17 +306,17 @@ class page_action extends tform_actions {
global
$app
,
$conf
;
// Spamfilter policy
$policy_id
=
$app
->
functions
->
intval
(
$
page_form
->
dataRecord
[
"policy"
]);
$tmp_user
=
$app
->
db
->
queryOneRecord
(
"SELECT id FROM spamfilter_users WHERE email = '@"
.
$app
->
db
->
quote
(
$
page_form
->
dataRecord
[
"domain"
])
.
"'"
);
$policy_id
=
$app
->
functions
->
intval
(
$
this
->
dataRecord
[
"policy"
]);
$tmp_user
=
$app
->
db
->
queryOneRecord
(
"SELECT id FROM spamfilter_users WHERE email = '@"
.
$app
->
db
->
quote
(
$
this
->
dataRecord
[
"domain"
])
.
"'"
);
if
(
$policy_id
>
0
)
{
if
(
$tmp_user
[
"id"
]
>
0
)
{
// There is already a record that we will update
$app
->
db
->
datalogUpdate
(
'spamfilter_users'
,
"policy_id =
$policy_id
"
,
'id'
,
$tmp_user
[
"id"
]);
}
else
{
$tmp_domain
=
$app
->
db
->
queryOneRecord
(
"SELECT sys_groupid FROM mail_domain WHERE domain_id = "
.
$
page_form
->
id
);
$tmp_domain
=
$app
->
db
->
queryOneRecord
(
"SELECT sys_groupid FROM mail_domain WHERE domain_id = "
.
$
this
->
id
);
// We create a new record
$insert_data
=
"(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`)
VALUES ("
.
$_SESSION
[
"s"
][
"user"
][
"userid"
]
.
", "
.
$app
->
functions
->
intval
(
$tmp_domain
[
"sys_groupid"
])
.
", 'riud', 'riud', '', "
.
$app
->
functions
->
intval
(
$
page_form
->
dataRecord
[
"server_id"
])
.
", 5, "
.
$app
->
functions
->
intval
(
$policy_id
)
.
", '@"
.
$app
->
db
->
quote
(
$
page_form
->
dataRecord
[
"domain"
])
.
"', '@"
.
$app
->
db
->
quote
(
$
page_form
->
dataRecord
[
"domain"
])
.
"', 'Y')"
;
VALUES ("
.
$_SESSION
[
"s"
][
"user"
][
"userid"
]
.
", "
.
$app
->
functions
->
intval
(
$tmp_domain
[
"sys_groupid"
])
.
", 'riud', 'riud', '', "
.
$app
->
functions
->
intval
(
$
this
->
dataRecord
[
"server_id"
])
.
", 5, "
.
$app
->
functions
->
intval
(
$policy_id
)
.
", '@"
.
$app
->
db
->
quote
(
$
this
->
dataRecord
[
"domain"
])
.
"', '@"
.
$app
->
db
->
quote
(
$
this
->
dataRecord
[
"domain"
])
.
"', 'Y')"
;
$app
->
db
->
datalogInsert
(
'spamfilter_users'
,
$insert_data
,
'id'
);
unset
(
$tmp_domain
);
}
...
...
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