X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=admin%2Fauth_tag_structure.pl;h=27c48e9bf271c9e35d2186d7cf505aea346aecc4;hb=a52d4e8a70783fdf9cf4429931c2d133331d7ef5;hp=645916de3aab6f042ebdae0ade1d800d5c7b7304;hpb=2c6765610856bd298cec045077a55296ae10abda;p=srvgit diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index 645916de3a..27c48e9bf2 100755 --- a/admin/auth_tag_structure.pl +++ b/admin/auth_tag_structure.pl @@ -19,6 +19,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; +#use warnings; FIXME - Bug 2505 use CGI; use C4::Auth; use C4::Koha; @@ -38,7 +39,7 @@ my $offset = $input->param('offset') || 0; my $op = $input->param('op') || ''; $searchfield =~ s/\,//g; -my $pagesize = 20; + my $script_name = "/cgi-bin/koha/admin/auth_tag_structure.pl"; my $dbh = C4::Context->dbh; @@ -119,13 +120,13 @@ if ($op eq 'add_form') { if ($searchfield) { $template->param(action => "Modify tag", searchfield => "$searchfield"); - $template->param('heading-modify-tag-p' => 1); + $template->param('heading_modify_tag_p' => 1); } else { $template->param(action => "Add tag", searchfield => ""); - $template->param('heading-add-tag-p' => 1); + $template->param('heading_add_tag_p' => 1); } - $template->param('use-heading-flags-p' => 1); + $template->param('use_heading_flags_p' => 1); $template->param(liblibrarian => $data->{'liblibrarian'}, libopac => $data->{'libopac'}, repeatable => "".$data->{'repeatable'}, @@ -220,7 +221,7 @@ if ($op eq 'add_form') { } my ($count,$results)=StringSearch($searchfield,$authtypecode); my @loop_data = (); - for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ + for ( my $i = $offset ; $i < $count ; $i++ ) { my %row_data; # get a fresh hash for the row data $row_data{tagfield} = $results->[$i]{'tagfield'}; $row_data{liblibrarian} = $results->[$i]{'liblibrarian'}; @@ -236,15 +237,12 @@ if ($op eq 'add_form') { authtypecode => $authtypecode, ); if ($offset>0) { - my $prevpage = $offset-$pagesize; $template->param(isprevpage => $offset, - prevpage=> $prevpage, searchfield => $searchfield, ); } - if ($offset+$pagesize<$count) { - my $nextpage =$offset+$pagesize; - $template->param(nextpage =>$nextpage, + if ( $offset < $count ) { + $template->param( searchfield => $searchfield, ); }