File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -388,6 +388,14 @@ function onBeforeUpdate() {
388388 }
389389 }
390390 }
391+ } else {
392+ // Add default remote_ips from Main Configuration.
393+ $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
394+
395+ if ($ this ->dataRecord ['remote_access ' ] != 'y ' ){
396+ $ this ->dataRecord ['remote_ips ' ] = implode (', ' , $ remote_ips );
397+ $ this ->dataRecord ['remote_access ' ] = 'y ' ;
398+ }
391399 }
392400
393401 if ($ app ->tform ->errorMessage == '' ) {
@@ -478,6 +486,14 @@ function onBeforeInsert() {
478486 }
479487 }
480488 }
489+ } else {
490+ // Add default remote_ips from Main Configuration.
491+ $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
492+
493+ if ($ this ->dataRecord ['remote_access ' ] != 'y ' ){
494+ $ this ->dataRecord ['remote_ips ' ] = implode (', ' , $ remote_ips );
495+ $ this ->dataRecord ['remote_access ' ] = 'y ' ;
496+ }
481497 }
482498
483499 if ($ app ->tform ->errorMessage == '' ) {
You can’t perform that action at this time.
0 commit comments