X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=admin%2Fadmin-home.pl;h=f6a7b23ac1f209196cf5a33cb84f2ee9a94f0521;hb=a24a82d757feab0ae17eada4ceb72f16ead54c06;hp=17f93e33edf6848d19fb714d972c03b414e6ef27;hpb=b810e2d71e12b82f95c2e8775b6158764351271d;p=koha-ffzg.git diff --git a/admin/admin-home.pl b/admin/admin-home.pl index 17f93e33ed..f6a7b23ac1 100755 --- a/admin/admin-home.pl +++ b/admin/admin-home.pl @@ -1,21 +1,44 @@ #!/usr/bin/perl -use strict; -use CGI; +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use CGI qw ( -utf8 ); use C4::Auth; use C4::Output; -use C4::Interface::CGI::Output; -use C4::Database; -use HTML::Template; +use Koha::Plugins; my $query = new CGI; -my ($template, $loggedinuser, $cookie) - = get_template_and_user({template_name => "admin/admin-home.tmpl", - query => $query, - type => "intranet", - authnotrequired => 0, - flagsrequired => {parameters => 1, management => 1, tools => 1}, - debug => 1, - }); + +my $plugins_enabled = C4::Context->preference('UseKohaPlugins') && C4::Context->config("enable_plugins"); +my $mana_url = C4::Context->config('mana_config'); + +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "admin/admin-home.tt", + query => $query, + type => "intranet", + authnotrequired => 0, + flagsrequired => { parameters => '*' }, + debug => 1, + } +); + +$template->param( plugins_enabled => $plugins_enabled, ); +$template->param( mana_url => $mana_url, ); output_html_with_http_headers $query, $cookie, $template->output;