From a5cd19d79a0d93d8101c5c6b69ef58f05f160075 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sun, 15 Dec 2013 22:17:08 -0800 Subject: [PATCH] Remove obsolete support for alternate start page --- index.cgi | 72 ++++++++++++++++++------------------------------------- 1 file changed, 23 insertions(+), 49 deletions(-) diff --git a/index.cgi b/index.cgi index 3c1a766be..9cb4c23de 100755 --- a/index.cgi +++ b/index.cgi @@ -35,58 +35,32 @@ if (!defined($in{'cat'})) { } $gconfig{'sysinfo'} = 0 if ($gconfig{'sysinfo'} == 1); -if ($gconfig{'alt_startpage'}) { - # Tim's webmin header - &header(&text('main_title', $ver, $hostname, $ostr)); - print "\n"; - print ""; - print "
\n"; - print "Version $ver
$hostname
$ostr
\n"; - print ""; - print ""; - print "$text{'main_homepage'}
"; - print "$text{'main_feedback'}" - if ($gconfig{'nofeedbackcc'} != 2 && $access{'feedback'}); - if ($miniserv{'logout'} && !$ENV{'SSL_USER'} && !$ENV{'LOCAL_USER'} && - $ENV{'HTTP_USER_AGENT'} !~ /webmin/i) { - print "

\n"; - if ($main::session_id) { - print "", - "$text{'main_logout'}"; - } - else { - print "$text{'main_switch'}"; - } - } - print "

\n\n"; + +if ($gconfig{'texttitles'}) { + @args = ( $text{'main_title2'}, undef ); } else { - # Standard webmin header - if ($gconfig{'texttitles'}) { - @args = ( $text{'main_title2'}, undef ); + @args = ( $gconfig{'nohostname'} ? $text{'main_title2'} : + &text('main_title', $ver, $hostname, $ostr), + "images/webmin-blue.png" ); + if ($gconfig{'showlogin'}) { + $args[0] = $remote_user." : ".$args[0]; } - else { - @args = ( $gconfig{'nohostname'} ? $text{'main_title2'} : - &text('main_title', $ver, $hostname, $ostr), - "images/webmin-blue.png" ); - if ($gconfig{'showlogin'}) { - $args[0] = $remote_user." : ".$args[0]; - } - } - &header(@args, undef, undef, 1, 1, - $tconfig{'brand'} ? - "$tconfig{'brand'}" : - $gconfig{'brand'} ? - "$gconfig{'brand'}" : - "$text{'main_homepage'}". - ($gconfig{'nofeedbackcc'} == 2 || !$access{'feedback'} ? "" : - "
$text{'main_feedback'}") - ); - print "

", - &text('main_version', $ver, $hostname, $ostr),"
\n" - if (!$gconfig{'nohostname'}); - print "

\n"; } +&header(@args, undef, undef, 1, 1, + $tconfig{'brand'} ? + "$tconfig{'brand'}" : + $gconfig{'brand'} ? + "$gconfig{'brand'}" : + "$text{'main_homepage'}". + ($gconfig{'nofeedbackcc'} == 2 || !$access{'feedback'} ? "" : + "
$text{'main_feedback'}") + ); +print "

", + &text('main_version', $ver, $hostname, $ostr),"
\n" + if (!$gconfig{'nohostname'}); +print "

\n"; + print $text{'main_header'}; if (!@modules) { @@ -188,7 +162,7 @@ if (&foreign_check("webmin")) { &webmin::show_webmin_notifications(); } -if ($miniserv{'logout'} && !$gconfig{'alt_startpage'} && +if ($miniserv{'logout'} && !$ENV{'SSL_USER'} && !$ENV{'LOCAL_USER'} && !$ENV{'ANONYMOUS_USER'} && $ENV{'HTTP_USER_AGENT'} !~ /webmin/i) { print "\n";