From 255717056bd0711cade453794ffd0d135d79b39e Mon Sep 17 00:00:00 2001 From: seabres Date: Thu, 24 Apr 2014 13:31:47 +0200 Subject: [PATCH] Minor modification to let Webmin run with Apache. --- WebminCore.pm | 7 +++++-- webmin/refresh_modules.cgi | 2 +- webmin/webmin-lib.pl | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/WebminCore.pm b/WebminCore.pm index a71965de6..986492875 100644 --- a/WebminCore.pm +++ b/WebminCore.pm @@ -30,8 +30,11 @@ push(@EXPORT, qw($config_directory $var_directory $remote_error_handler %month_t push(@EXPORT, qw(&theme_post_save_domain &theme_post_save_domains &theme_post_save_server &theme_select_server &theme_select_domain &theme_post_save_folder &theme_post_change_modules &theme_address_button &theme_virtualmin_ui_rating_selector &theme_virtualmin_ui_show_cron_time &theme_virtualmin_ui_parse_cron_time &theme_virtualmin_ui_html_editor_bodytags &theme_virtualmin_ui_show_html_editor)); $called_from_webmin_core = 1; -do "web-lib.pl"; -do "ui-lib.pl"; +my $script; +$script = -r '../web-lib.pl' ? '../web-lib.pl' : './web-lib.pl'; +do $script; +$script = -r '../ui-lib.pl' ? '../ui-lib.pl' : './ui-lib.pl'; +do $script; 1; diff --git a/webmin/refresh_modules.cgi b/webmin/refresh_modules.cgi index fae6816e9..07be8ee11 100755 --- a/webmin/refresh_modules.cgi +++ b/webmin/refresh_modules.cgi @@ -1,7 +1,7 @@ #!/usr/local/bin/perl # Refresh the list of visible modules -require 'webmin-lib.pl'; +require './webmin-lib.pl'; &ReadParse(); &ui_print_unbuffered_header(undef, $text{'refreshmods_title'}, "", undef, 0, 1); diff --git a/webmin/webmin-lib.pl b/webmin/webmin-lib.pl index 54031b7d7..7d146c9e1 100755 --- a/webmin/webmin-lib.pl +++ b/webmin/webmin-lib.pl @@ -1035,7 +1035,7 @@ if ($cache) { } my $temp = &transname(); my $perl = &get_perl_path(); -system("$perl $root_directory/oschooser.pl $file $temp 1"); +system("$root_directory/oschooser.pl $file $temp 1"); my %rv; &read_env_file($temp, \%rv); $rv{'time'} = time();