File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -27,5 +27,21 @@ $in{'root_def'} || &can_directory($in{'root'}) ||
2727&unlock_all_config_files();
2828my $name = &find_value(" server_name" , $server );
2929&webmin_log(" sdocs" , " server" , $name );
30- &redirect(" edit_server.cgi?id=" .&urlize($in {' id' }));
30+
31+ # Redirect with the the new root directory if it was changed
32+ my ($dom , $domroot_curr ) = split (/ ;/ , $in {' id' });
33+ my $domroot_new = $in {' root' } ? $in {' root' } : undef ;
34+ my ($return_id , $return_query ) = ($in {' id' }, " " );
35+ if ($domroot_new && $domroot_new ne $domroot_curr ) {
36+ &foreign_require(" virtual-server" );
37+ my $d = &virtual_server::get_domain_by(' dom' , $dom );
38+ if ($d ) {
39+ &virtual_server::clear_links_cache($d );
40+ $return_id = " $dom ;$domroot_new " ;
41+ $return_query = " refresh=1" ;
42+ }
43+ }
44+
45+ &redirect(" edit_server.cgi?id=" .&urlize($return_id ).
46+ ($return_query ? " &$return_query " : " " ));
3147
You can’t perform that action at this time.
0 commit comments