Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
df1d52c6
Commit
df1d52c6
authored
Nov 20, 2013
by
Marius Cramer
Browse files
Fixed FS#3173 - Update Domain Status via API
parent
c02d3f04
Changes
1
Show whitespace changes
Inline
Side-by-side
interface/lib/classes/remoting.inc.php
View file @
df1d52c6
...
...
@@ -3237,16 +3237,20 @@ class remoting {
$this
->
server
->
fault
(
'permission_denied'
,
'You do not have the permissions to access this function.'
);
return
false
;
}
$app
->
uses
(
'remoting_lib'
);
if
(
in_array
(
$status
,
array
(
'active'
,
'inactive'
)))
{
if
(
$status
==
'active'
)
{
$status
=
'y'
;
}
else
{
$status
=
'n'
;
}
$sql
=
"UPDATE web_domain SET active = '
$status
' WHERE domain_id = "
.
$app
->
functions
->
intval
(
$primary_id
);
$app
->
db
->
query
(
$sql
);
$result
=
$app
->
db
->
affectedRows
();
return
$result
;
$app
->
remoting_lib
->
loadFormDef
(
'../sites/form/web_domain.tform.php'
);
$params
=
$app
->
remoting_lib
->
getDataRecord
(
$primary_id
);
$params
[
'active'
]
=
$status
;
$affected_rows
=
$this
->
updateQuery
(
'../sites/form/web_domain.tform.php'
,
$client_id
,
$primary_id
,
$params
);
return
$affected_rows
;
}
else
{
$this
->
server
->
fault
(
'status_undefined'
,
'The status is not available'
);
return
false
;
...
...
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