Marius Cramer
2013-11-20 df1d52c6fd5378700b549b2232a7b3e50a8b2781
Fixed  FS#3173 - Update Domain Status via API
1 files modified
12 ■■■■■ changed files
interface/lib/classes/remoting.inc.php 12 ●●●●● patch | view | raw | blame | history
interface/lib/classes/remoting.inc.php
@@ -3237,16 +3237,20 @@
            $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;