Skip to content

Commit

Permalink
Bug 2617: Add strict (and warnings), partial fix.
Browse files Browse the repository at this point in the history
These are some of the simpler scripts to add strict to.
Corrected perldoc for Bookfund.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
  • Loading branch information
Joe Atzberger authored and Galen Charlton committed Mar 11, 2009
1 parent 1b12339 commit ccee815
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 20 deletions.
8 changes: 4 additions & 4 deletions C4/Bookfund.pm
Expand Up @@ -315,11 +315,13 @@ sub NewBookFund{


=head3 ModBookFund =head3 ModBookFund
&ModBookFund($bookfundname,$bookfundid,$current_branch, $branchcode) = &ModBookFund($bookfundname,$bookfundid,$current_branch, $branchcode)
this function update the bookfundname and the branchcode on aqbookfund table on database.
This function updates the bookfundname and the branchcode in the aqbookfund table.
=cut =cut


# FIXME: use placeholders, ->prepare(), ->execute()


sub ModBookFund { sub ModBookFund {
my ($bookfundname,$bookfundid,$current_branch, $branchcode) = @_; my ($bookfundname,$bookfundid,$current_branch, $branchcode) = @_;
Expand Down Expand Up @@ -349,8 +351,6 @@ sub ModBookFund {
} }
} }




#-------------------------------------------------------------# #-------------------------------------------------------------#


=head3 SearchBookFund =head3 SearchBookFund
Expand Down
25 changes: 13 additions & 12 deletions acqui/currency.pl
@@ -1,11 +1,9 @@
#!/usr/bin/perl #!/usr/bin/perl



#written by chris@katipo.co.nz #written by chris@katipo.co.nz
#9/10/2000 #9/10/2000
#script to display and update currency rates #script to display and update currency rates



# Copyright 2000-2002 Katipo Communications # Copyright 2000-2002 Katipo Communications
# #
# This file is part of Koha. # This file is part of Koha.
Expand All @@ -23,18 +21,21 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA # Suite 330, Boston, MA 02111-1307 USA


use strict;
use warnings;
use CGI; use CGI;
use C4::Acquisition; use C4::Bookfund qw(ModCurrencies);
use C4::Biblio;
use C4::Bookfund;


my $input=new CGI; # FIXME: CHECK AUTH
# FIXME: This should be part of another script, not a throwaway standalone.
# FIXME: params should have better checks before passed to ModCurrencies
# FIXME: need error handling if ModCurrencies FAILS.


my @params=$input->param; my $input = new CGI;
foreach my $param (@params){
if ($param ne 'type' && $param !~ /submit/){ foreach my $param ($input->param) {
my $data=$input->param($param); if ($param ne 'type' && $param !~ /submit/) {
ModCurrencies($param,$data); ModCurrencies($param, $input->param($param));
} }
} }
print $input->redirect('/cgi-bin/koha/acqui/acqui-home.pl'); print $input->redirect('/cgi-bin/koha/acqui/acqui-home.pl');
2 changes: 2 additions & 0 deletions admin/env_tz_test.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl #!/usr/bin/perl


use strict;
use warnings;
use CGI; use CGI;
# use Data::Dumper; # use Data::Dumper;


Expand Down
5 changes: 4 additions & 1 deletion changelanguage.pl
Expand Up @@ -15,7 +15,10 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA # Suite 330, Boston, MA 02111-1307 USA


use C4::Output; use strict;
use warnings;

use C4::Output qw(setlanguagecookie);
use CGI; use CGI;


my $query = new CGI; my $query = new CGI;
Expand Down
6 changes: 5 additions & 1 deletion misc/sax_parser_print.pl
@@ -1,7 +1,11 @@
#!/usr/bin/perl #!/usr/bin/perl
# check the current SAX Parser # check the current SAX Parser

use strict;
use warnings;
use XML::SAX::ParserFactory; use XML::SAX::ParserFactory;
$parser = XML::SAX::ParserFactory->parser();
my $parser = XML::SAX::ParserFactory->parser();
print "Koha wants something like: print "Koha wants something like:
XML::LibXML::SAX::Parser=HASH(0x81fe220) XML::LibXML::SAX::Parser=HASH(0x81fe220)
You have: You have:
Expand Down
6 changes: 4 additions & 2 deletions opac/opac-changelanguage.pl
Expand Up @@ -15,12 +15,14 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA # Suite 330, Boston, MA 02111-1307 USA


use C4::Output; use strict;
use warnings;
use C4::Output qw(setlanguagecookie);
use CGI; use CGI;


my $query = new CGI; my $query = new CGI;
my $language = $query->param('language'); my $language = $query->param('language');
my $url = $query->referer(); my $url = $query->referer();


warn "Language : $query // $language // $url"; # warn "Language : $query // $language // $url";
setlanguagecookie( $query, $language, $url ); setlanguagecookie( $query, $language, $url );

0 comments on commit ccee815

Please sign in to comment.