Skip to content

Commit def1f78

Browse files
author
Marius Cramer
committed
Fixed FS#3173 - Update Domain Status via API
1 parent cd8bb80 commit def1f78

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

interface/lib/classes/remote.d/sites.inc.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -774,10 +774,12 @@ public function sites_web_domain_set_status($session_id, $primary_id, $status) {
774774
} else {
775775
$status = 'n';
776776
}
777-
$sql = "UPDATE web_domain SET active = '$status' WHERE domain_id = ".$app->functions->intval($primary_id);
778-
$app->db->query($sql);
779-
$result = $app->db->affectedRows();
780-
return $result;
777+
$app->remoting_lib->loadFormDef('../sites/form/web_domain.tform.php');
778+
$params = $app->remoting_lib->getDataRecord($primary_id);
779+
$params['active'] = $status;
780+
781+
$affected_rows = $this->updateQuery('../sites/form/web_domain.tform.php', 0, $primary_id, $params);
782+
return $affected_rows;
781783
} else {
782784
throw new SoapFault('status_undefined', 'The status is not available');
783785
return false;

0 commit comments

Comments
 (0)