X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=misc%2Fexportauth.pl;h=4ac916c4d011cc3cbd892b5ba9f55eca029b1a01;hb=36d64bd18c5695d773c9d956796c605fd7ae25c9;hp=109713fd823963309e284d7b102c8b5aac9c28ab;hpb=b8a58c493493f8c9aa16a9ce621609c6dcb4a5f6;p=koha_gimpoz diff --git a/misc/exportauth.pl b/misc/exportauth.pl index 109713fd82..4ac916c4d0 100755 --- a/misc/exportauth.pl +++ b/misc/exportauth.pl @@ -4,34 +4,27 @@ # use strict; +#use warnings; FIXME - Bug 2505 BEGIN { # find Koha's Perl modules # test carefully before changing this use FindBin; eval { require "$FindBin::Bin/kohalib.pl" }; } -require Exporter; -use C4::Auth; +use C4::Context; use C4::Output; # contains gettemplate use C4::Biblio; -use CGI; use C4::Auth; my $outfile = $ARGV[0]; open(OUT,">$outfile") or die $!; -my $query = new CGI; -my $dbh=DBI->connect("DBI:mysql:database=koha2;host=localhost;port=3306","kohaserver","kohaserver") or die $DBI::errmsg; -#$dbh->do("set character_set_client='latin5'"); -#$dbh->do("set character_set_connection='utf8'"); -#$dbh->do("set character_set_results='latin5'"); -#my $dbh=C4::Context->dbh; - my $sth; - - $sth=$dbh->prepare("select marc from auth_header order by authid"); - $sth->execute(); - - while (my ($marc) = $sth->fetchrow) { - - print OUT $marc; - } +my $dbh=C4::Context->dbh; +#$dbh->do("set character_set_client='latin5'"); +$dbh->do("set character_set_connection='utf8'"); +#$dbh->do("set character_set_results='latin5'"); +my $sth=$dbh->prepare("select marc from auth_header order by authid"); +$sth->execute(); +while (my ($marc) = $sth->fetchrow) { + print OUT $marc; + } close(OUT);