X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=suggestion%2Fsuggestion.pl;h=949cca30ffe13ba34d6ff650b777717b61a1aae2;hb=ef5d4f3c62957100dae0948a44bd27a2159892b4;hp=7d504470de8e6b5291d67adac03b244cba002c0a;hpb=87aabcd249b61553796cc51b8f7491a170062dfe;p=koha_fer diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index 7d504470de..949cca30ff 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -31,6 +31,7 @@ use C4::Search; use C4::Dates qw(format_date); use C4::Members; use C4::Debug; +use URI::Escape; sub Init{ my $suggestion= shift @_; @@ -182,7 +183,20 @@ elsif ($op eq "change" ) { $$suggestion_ref{'suggestionid'}=$suggestionid; &ModSuggestion($suggestion_ref); } - $op = 'else'; + my $params = ''; + foreach my $key ( + qw( + displayby branchcode title author isbn publishercode copyrightdate + collectiontitle suggestedby suggesteddate_from suggesteddate_to + manageddate_from manageddate_to accepteddate_from + accepteddate_to budgetid + ) + ) + { + $params .= $key . '=' . uri_escape($input->param($key)) . '&' + if defined($input->param($key)); + } + print $input->redirect("/cgi-bin/koha/suggestion/suggestion.pl?$params"); }elsif ($op eq "delete" ) { foreach my $delete_field (@editsuggestions) { &DelSuggestion( $borrowernumber, $delete_field,'intranet' ); @@ -288,10 +302,11 @@ if(defined($returnsuggested) and $returnsuggested ne "noone") #branch display management my $branchfilter = ($displayby ne "branchcode") ? $input->param('branchcode') : ''; -my $onlymine=C4::Context->preference('IndependentBranches') && - C4::Context->userenv && - C4::Context->userenv->{flags}!=1 && - C4::Context->userenv->{branch}; +my $onlymine = + C4::Context->preference('IndependentBranches') + && C4::Context->userenv + && !C4::Context->IsSuperLibrarian() + && C4::Context->userenv->{branch}; my $branches = GetBranches($onlymine); my @branchloop;