4cf30123a4
don't update your cvs if you want to have a working head... this commit contains : * updater/updatedatabase : get rid with marc_* tables, but DON'T remove them. As a lot of things uses them, it would not be a good idea for instance to drop them. If you really want to play, you can rename them to test head without them but being still able to reintroduce them... * Biblio.pm : modify MARCgetbiblio to find the raw marc record in biblioitems.marc field, not from marc_subfield_table, modify MARCfindframeworkcode to find frameworkcode in biblio.frameworkcode, modify some other subs to use biblio.biblionumber & get rid of bibid. * other files : get rid of bibid and use biblionumber instead. What is broken : * does not do anything on zebra yet. * if you rename marc_subfield_table, you can't search anymore. * you can view a biblio & bibliodetails, go to MARC editor, but NOT save any modif. * don't try to add a biblio, it would add data poorly... (don't try to delete either, it may work, but that would be a surprise ;-) ) IMPORTANT NOTE : you need MARC::XML package (http://search.cpan.org/~esummers/MARC-XML-0.7/lib/MARC/File/XML.pm), that requires a recent version of MARC::Record Updatedatabase stores the iso2709 data in biblioitems.marc field & an xml version in biblioitems.marcxml Not sure we will keep it when releasing the stable version, but I think it's a good idea to have something readable in sql, at least for development stage.
75 lines
2.3 KiB
Perl
Executable file
75 lines
2.3 KiB
Perl
Executable file
#!/usr/bin/perl
|
|
use strict;
|
|
require Exporter;
|
|
use CGI;
|
|
use C4::Search;
|
|
use C4::Auth;
|
|
use C4::Bull; #uses getsubscriptionfrom biblionumber
|
|
use C4::Interface::CGI::Output;
|
|
use HTML::Template;
|
|
use C4::Biblio;
|
|
use C4::SearchMarc;
|
|
|
|
my $query=new CGI;
|
|
my ($template, $borrowernumber, $cookie)
|
|
= get_template_and_user({template_name => "catalogue/detail.tmpl",
|
|
query => $query,
|
|
type => "intranet",
|
|
authnotrequired => 1,
|
|
flagsrequired => {borrow => 1},
|
|
});
|
|
|
|
my $biblionumber=$query->param('biblionumber');
|
|
$template->param(biblionumber => $biblionumber);
|
|
|
|
|
|
# change back when ive fixed request.pl
|
|
my @items = &ItemInfo(undef, $biblionumber, 'intra');
|
|
my $dat = &bibdata($biblionumber);
|
|
my ($authorcount, $addauthor) = &addauthor($biblionumber);
|
|
my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
|
|
my ($websitecount, @websites) = &getwebsites($biblionumber);
|
|
my $subscriptionsnumber = getsubscriptionfrombiblionumber($biblionumber);
|
|
|
|
$dat->{'count'}=@items;
|
|
|
|
$dat->{'additional'}=$addauthor->[0]->{'author'};
|
|
for (my $i = 1; $i < $authorcount; $i++) {
|
|
$dat->{'additional'} .= " ; " . $addauthor->[$i]->{'author'};
|
|
} # for
|
|
|
|
my $norequests = 1;
|
|
foreach my $itm (@items) {
|
|
$norequests = 0 unless $itm->{'notforloan'};
|
|
$itm->{$itm->{'publictype'}} = 1;
|
|
}
|
|
|
|
$template->param(norequests => $norequests);
|
|
|
|
## get notes and subjects from MARC record
|
|
my $marc = C4::Context->preference("marc");
|
|
if ($marc eq "yes") {
|
|
my $dbh = C4::Context->dbh;
|
|
my $marcflavour = C4::Context->preference("marcflavour");
|
|
my $marcnotesarray = &getMARCnotes($dbh,$biblionumber,$marcflavour);
|
|
my $marcsubjctsarray = &getMARCsubjects($dbh,$biblionumber,$marcflavour);
|
|
|
|
$template->param(MARCNOTES => $marcnotesarray);
|
|
$template->param(MARCSUBJCTS => $marcsubjctsarray);
|
|
}
|
|
|
|
my @results = ($dat,);
|
|
|
|
my $resultsarray=\@results;
|
|
my $itemsarray=\@items;
|
|
my $webarray=\@webbiblioitems;
|
|
my $sitearray=\@websites;
|
|
|
|
$template->param(BIBLIO_RESULTS => $resultsarray,
|
|
ITEM_RESULTS => $itemsarray,
|
|
WEB_RESULTS => $webarray,
|
|
SITE_RESULTS => $sitearray,
|
|
subscriptionsnumber => $subscriptionsnumber,
|
|
);
|
|
|
|
output_html_with_http_headers $query, $cookie, $template->output;
|