File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -388,6 +388,16 @@ function onBeforeUpdate() {
388388 }
389389 }
390390 }
391+ } else {
392+ if (!empty ($ global_config ['default_remote_dbserver ' ])) {
393+ // Add default remote_ips from Main Configuration.
394+ $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
395+
396+ if ($ this ->dataRecord ['remote_access ' ] != 'y ' ){
397+ $ this ->dataRecord ['remote_ips ' ] = implode (', ' , $ remote_ips );
398+ $ this ->dataRecord ['remote_access ' ] = 'y ' ;
399+ }
400+ }
391401 }
392402
393403 if ($ app ->tform ->errorMessage == '' ) {
@@ -478,6 +488,16 @@ function onBeforeInsert() {
478488 }
479489 }
480490 }
491+ } else {
492+ if (!empty ($ global_config ['default_remote_dbserver ' ])) {
493+ // Add default remote_ips from Main Configuration.
494+ $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
495+
496+ if ($ this ->dataRecord ['remote_access ' ] != 'y ' ){
497+ $ this ->dataRecord ['remote_ips ' ] = implode (', ' , $ remote_ips );
498+ $ this ->dataRecord ['remote_access ' ] = 'y ' ;
499+ }
500+ }
481501 }
482502
483503 if ($ app ->tform ->errorMessage == '' ) {
You can’t perform that action at this time.
0 commit comments