ftimme
2012-01-09 6c54b1ddc757c429ecd740a7f6f1c56165cc58b4
server/plugins-available/nginx_plugin.inc.php
@@ -198,7 +198,17 @@
         if(trim($data["new"]["ssl_request"]) != '') file_put_contents($csr_file,$data["new"]["ssl_request"]);
         if(trim($data["new"]["ssl_cert"]) != '') file_put_contents($crt_file,$data["new"]["ssl_cert"]);
         // for nginx, bundle files have to be appended to the certificate file
         if(trim($data["new"]["ssl_bundle"]) != '') file_put_contents($crt_file,$data["new"]["ssl_bundle"], FILE_APPEND);
         if(trim($data["new"]["ssl_bundle"]) != ''){
            if(file_exists($crt_file)){
               $crt_file_contents = trim(file_get_contents($crt_file));
            } else {
               $crt_file_contents = '';
            }
            if($crt_file_contents != '') $crt_file_contents .= "\n";
            $crt_file_contents .= $data["new"]["ssl_bundle"];
            file_put_contents($crt_file,$crt_file_contents);
            unset($crt_file_contents);
         }
         /* Update the DB of the (local) Server */
         $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'");
         /* Update also the master-DB of the Server-Farm */