function updateUpdate($param) { // This is sort of a hack... The ssl configuration of the ipaddress has to be reflected properly in the domain too. So the web objects are initialized, the ssl parameters are changed on the fly and synced again. All this is because, apache will refuse to start if the ssl files are missing, which is f*****g terrible. (later)... Apache is actually cool. The whole damn problem is with iis. Be careful about the createExtraVariables. As for now, the web object doesn't create objects from the parent domain object, and thus web object will work indepnednely without the help of the domain parent object. Thus the parent of the web can anything. But if in the at any time in the future the web object starts needing any parameter from the domain, then this will have to be rewritten. Then the domain objects have to initialized first, then the web objects are initialized, and the web can be created only UNDER the domain, and not directly under this object. global $gbl, $sgbl, $login, $ghtml; $driverapp = $gbl->getSyncClass($this->__masterserver, $this->__readserver, 'web'); if ($param['sslcert'] == '__Select One__') { throw new lxException("need_real_cert"); } $this->ipaddr = $this->getParentO()->ipaddr; $sslcert = new SslCert(null, $this->__readserver, $param['sslcert']); $sslcert->get(); if ($sslcert->dbaction === 'add') { throw new lxException("sslcert_does_not_exist"); } $this->text_crt_content = $sslcert->text_crt_content; $this->text_key_content = $sslcert->text_key_content; $this->text_ca_content = $sslcert->text_ca_content; return $param; }
function fixInitialSsl($obj) { $sslipaddr = new SslIpaddress($this->__masterserver, $this->syncserver, $row['nname']); $sslipaddr->get(); if (!$sslipaddr->sslcert) { $sslipaddr->sslcert = "default___{$obj->devname}"; } $sslipaddr->parent_clname = $obj->getClName(); $sslipaddr->write(); $sslcert = new SslCert($this->__masterserver, $this->syncserver, "default___{$obj->nname}"); $sslcert->get(); $sslcert->upload_status = 'on'; $sslcert->certname = "default___{$obj->devname}"; $sslcert->parent_clname = $sslipaddr->getClName(); $sslcert->write(); }