Drop "Extra Query" for Shutdown and Reboot from gui.cgi.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 18 Jan 2014 17:37:40 +0000 (18:37 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sat, 18 Jan 2014 17:37:40 +0000 (18:37 +0100)
In the past this option has been used to prevent users from
accidently shutting down or rebooting their systems. With IPFire 2.15
there is a own subpage on the WUI for doing this actions, so there is no
need anymore for those extra query.

html/cgi-bin/gui.cgi

index dfdf7cd..80a0596 100644 (file)
@@ -38,7 +38,6 @@ my $errormessage='';
 
 $cgiparams{'SPEED'} = 'off';
 $cgiparams{'WINDOWWITHHOSTNAME'} = 'off';
-$cgiparams{'REBOOTQUESTION'} = 'off';
 $cgiparams{'REFRESHINDEX'} = 'off';
 $cgiparams{'ACTION'} = '';
 &Header::getcgihash(\%cgiparams);
@@ -87,7 +86,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
         # write cgi vars to the file.
        $mainsettings{'LANGUAGE'} = $cgiparams{'lang'};
        $mainsettings{'WINDOWWITHHOSTNAME'} = $cgiparams{'WINDOWWITHHOSTNAME'};
-       $mainsettings{'REBOOTQUESTION'} = $cgiparams{'REBOOTQUESTION'};
        $mainsettings{'PPPUPDOWNBEEP'} = $cgiparams{'PPPUPDOWNBEEP'};
        $mainsettings{'SPEED'} = $cgiparams{'SPEED'};
        $mainsettings{'THEME'} = $cgiparams{'theme'};
@@ -101,12 +99,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
        } else {
                $cgiparams{'WINDOWWITHHOSTNAME'} = 'on';
        }
-       
-       if ($mainsettings{'REBOOTQUESTION'}) {
-               $cgiparams{'REBOOTQUESTION'} = $mainsettings{'REBOOTQUESTION'};
-       } else {
-               $cgiparams{'REBOOTQUESTION'} = 'on';
-       }
 
        if ($mainsettings{'PPPUPDOWNBEEP'}) {
                $cgiparams{'PPPUPDOWNBEEP'} = $mainsettings{'PPPUPDOWNBEEP'};
@@ -139,7 +131,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
 if ($cgiparams{'ACTION'} eq "$Lang::tr{'restore defaults'}")
 {
        $cgiparams{'WINDOWWITHHOSTNAME'} = 'on';
-       $cgiparams{'REBOOTQUESTION'} = 'on';
        $cgiparams{'PPPUPDOWNBEEP'} = 'on';
        $cgiparams{'REFRESHINDEX'} = 'off';
        $cgiparams{'SPEED'} = 'on';
@@ -150,10 +141,6 @@ $checked{'WINDOWWITHHOSTNAME'}{'off'} = '';
 $checked{'WINDOWWITHHOSTNAME'}{'on'} = '';
 $checked{'WINDOWWITHHOSTNAME'}{$cgiparams{'WINDOWWITHHOSTNAME'}} = "checked='checked'";
 
-$checked{'REBOOTQUESTION'}{'off'} = '';
-$checked{'REBOOTQUESTION'}{'on'} = '';
-$checked{'REBOOTQUESTION'}{$cgiparams{'REBOOTQUESTION'}} = "checked='checked'";
-
 $checked{'PPPUPDOWNBEEP'}{'off'} = '';
 $checked{'PPPUPDOWNBEEP'}{'on'} = '';
 $checked{'PPPUPDOWNBEEP'}{$cgiparams{'PPPUPDOWNBEEP'}} = "checked='checked'";
@@ -184,10 +171,6 @@ print <<END
     <td><input type='checkbox' name='WINDOWWITHHOSTNAME' $checked{'WINDOWWITHHOSTNAME'}{'on'} /></td>
     <td>$Lang::tr{'display hostname in window title'}</td>
 </tr>
-<tr>
-    <td><input type='checkbox' name='REBOOTQUESTION' $checked{'REBOOTQUESTION'}{'on'} /></td>
-    <td>$Lang::tr{'reboot question'}</td>
-</tr>
 <tr>
     <td><input type='checkbox' name='REFRESHINDEX' $checked{'REFRESHINDEX'}{'on'} /></td>
     <td>$Lang::tr{'refresh index page while connected'}</td>