File tree Expand file tree Collapse file tree 4 files changed +9
-4
lines changed
Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -145,9 +145,13 @@ function convertClientName($name){
145145 }
146146
147147 /* TODO: rewrite SQL */
148- function getDomainModuleDomains ($ not_used_in_table = null , $ selected_domain = null ) {
148+ function getDomainModuleDomains ($ not_used_in_table = null , $ selected_domain = '' ) {
149149 global $ app ;
150150
151+ // Fix a null value passed in by the create new forms, which lack an id.
152+ if ($ selected_domain == null ) {
153+ $ selected_domain = '' ;
154+ }
151155 $ sql = "SELECT domain_id, domain FROM domain WHERE " ;
152156 if ($ not_used_in_table ) {
153157 if (strpos ($ not_used_in_table , 'dns ' ) !== false ) {
Original file line number Diff line number Diff line change 196196 /*
197197 * The domain-module is in use.
198198 */
199- $ domains = $ app ->tools_sites ->getDomainModuleDomains ("dns_soa " , ' domain ' );
199+ $ domains = $ app ->tools_sites ->getDomainModuleDomains ("dns_soa " );
200200 $ domain_select = "<option value=''></option> " ;
201201 if (is_array ($ domains ) && sizeof ($ domains ) > 0 ) {
202202 /* We have domains in the list, so create the drop-down-list */
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ function onShowEnd() {
105105 /*
106106 * The domain-module is in use.
107107 */
108- $ domains = $ app ->tools_sites ->getDomainModuleDomains ($ this ->_vhostdomain_type == 'subdomain ' ? null : "web_domain " );
108+ $ domains = $ app ->tools_sites ->getDomainModuleDomains ($ this ->_vhostdomain_type == 'subdomain ' ? null : "web_domain " , $ this -> dataRecord [ ' domain ' ] );
109109 $ domain_select = "<option value=''></option> " ;
110110 $ selected_domain = '' ;
111111 if (is_array ($ domains ) && sizeof ($ domains ) > 0 ) {
Original file line number Diff line number Diff line change @@ -694,7 +694,8 @@ function onShowEnd() {
694694 /*
695695 * The domain-module is in use.
696696 */
697- $ domains = $ app ->tools_sites ->getDomainModuleDomains ($ this ->_vhostdomain_type == 'subdomain ' ? null : "web_domain " );
697+ $ domains = $ app ->tools_sites ->getDomainModuleDomains ($ this ->_vhostdomain_type == 'subdomain ' ? null : "web_domain " , $ this ->dataRecord ['domain ' ]);
698+
698699 $ domain_select = "<option value=''></option> " ;
699700 $ selected_domain = '' ;
700701 if (is_array ($ domains ) && sizeof ($ domains ) > 0 ) {
You can’t perform that action at this time.
0 commit comments