Bug 34859: Remove unnecessary params from reports-home.pl
This change removes unnecessary syspref template parameters and tidies the code. Test plan: 0. Apply the patch and koha-plack --reload kohadev 1. Go to /cgi-bin/koha/admin/preferences.pl?op=search&searchfield=IntranetNav 2. Add the following and save: <li><a href="#">Awesome</a></li> 3. Go to /cgi-bin/koha/admin/preferences.pl?op=search&searchfield=intranetstylesheet 4. Add the following and save: http://bad 5. Go to /cgi-bin/koha/admin/preferences.pl?op=search&searchfield=intranetcolorstylesheet 6. Add the following and save: http://bad2 7. Go to /cgi-bin/koha/reports/reports-home.pl 8. Note the "Awesome" link in the top navbar 9. Note in the console that there are two errors where http://bad and http://bad2 can't be resolved Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
c9ab718a39
commit
7382e305e1
1 changed files with 8 additions and 13 deletions
|
@ -17,23 +17,18 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with Koha; if not, see <http://www.gnu.org/licenses>.
|
||||
|
||||
|
||||
use Modern::Perl;
|
||||
use CGI qw ( -utf8 );
|
||||
use C4::Auth qw( get_template_and_user );
|
||||
use C4::Output qw( output_html_with_http_headers );
|
||||
use C4::Context;
|
||||
|
||||
|
||||
my $query = CGI->new;
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "reports/reports-home.tt",
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "reports/reports-home.tt",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
flagsrequired => { reports => '*' },
|
||||
});
|
||||
$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
|
||||
intranetstylesheet => C4::Context->preference("intranetstylesheet"),
|
||||
IntranetNav => C4::Context->preference("IntranetNav"),
|
||||
}
|
||||
);
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
Loading…
Reference in a new issue