Acked-by: Peter Müller > The main page cannot be used while an installation is running. > Therefore it makes more sense to generate the log output first. > > Signed-off-by: Leo-Andres Hofmann > --- > html/cgi-bin/pakfire.cgi | 79 ++++++++++++++++++++-------------------- > 1 file changed, 40 insertions(+), 39 deletions(-) > > diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi > index 535168547..daa82e34c 100644 > --- a/html/cgi-bin/pakfire.cgi > +++ b/html/cgi-bin/pakfire.cgi > @@ -212,7 +212,45 @@ END > &Header::openpage($Lang::tr{'pakfire configuration'}, 1, $extraHead); > &Header::openbigbox('100%', 'left', '', $errormessage); > > -# Process Pakfire commands > +# Show error message > +if ($errormessage) { > + &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); > + print "$errormessage \n"; > + &Header::closebox(); > +} > + > +# Show log output while Pakfire is running > +if(&_is_pakfire_busy()) { > + &Header::openbox("100%", "center", "Pakfire"); > + > + print < +
> +
$Lang::tr{'active'}
> +
> + $Lang::tr{'pakfire working'}
> +
> + > +
> +
$Lang::tr{'refresh'}
> +
> + > + > +

> +
> +
> +END
> +;
> +
> +	&Header::closebox();
> +	&Header::closebigbox();
> +	&Header::closepage();
> +	exit;
> +}
> +
> +# Show Pakfire install/remove dependencies and confirm form
>  if (($cgiparams{'ACTION'} eq 'install') && (! &_is_pakfire_busy())) {
>  	&Header::openbox("100%", "center", $Lang::tr{'request'});
>  
> @@ -290,6 +328,7 @@ END
>  	exit;
>  }
>  
> +# Show Pakfire main page
>  my %selected=();
>  my %checked=();
>  
> @@ -299,44 +338,6 @@ $selected{"TREE"}{"testing"} = "";
>  $selected{"TREE"}{"unstable"} = "";
>  $selected{"TREE"}{$pakfiresettings{"TREE"}} = "selected";
>  
> -# DPC move error message to top so it is seen!
> -if ($errormessage) {
> -	&Header::openbox('100%', 'left', $Lang::tr{'error messages'});
> -	print "$errormessage \n";
> -	&Header::closebox();
> -}
> -
> -# Show log output while Pakfire is running
> -if(&_is_pakfire_busy()) {
> -	&Header::openbox("100%", "center", "Pakfire");
> -
> -	print < -
> -
$Lang::tr{'active'}
> -
> - $Lang::tr{'pakfire working'}
> -
> - > -
> -
$Lang::tr{'refresh'}
> -
> - > - > -

> -
> -
> -END
> -;
> -
> -	&Header::closebox();
> -	&Header::closebigbox();
> -	&Header::closepage();
> -	exit;
> -}
> -
>  my $core_release = `cat /opt/pakfire/db/core/mine 2>/dev/null`;
>  chomp($core_release);
>  my $core_update_age = &General::age("/opt/pakfire/db/core/mine");