From 790b7cc1b931d383647731b23ba9083922820007 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Thu, 22 Oct 2009 11:45:38 +0200 Subject: [PATCH] MT 2037 : Update ISBD --- C4/Biblio.pm | 5 +++-- catalogue/ISBDdetail.pl | 2 +- installer/data/mysql/updatedatabase.pl | 27 +++++++++++++++++++++++++++ kohaversion.pl | 2 +- opac/opac-ISBDdetail.pl | 2 +- 5 files changed, 33 insertions(+), 5 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 9b63223d7e..aef06631a9 100755 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -766,6 +766,7 @@ Return the ISBD view which can be included in opac and intranet sub GetISBDView { my $biblionumber = shift; + my $template = shift; my $record = GetMarcBiblio($biblionumber); my $itemtype = &GetFrameworkCode($biblionumber); my ($holdingbrtagf,$holdingbrtagsubf) = &GetMarcFromKohaField("items.holdingbranch",$itemtype); @@ -809,7 +810,7 @@ sub GetISBDView { my $tagsubf = $tag . $subfvalue; $calculated =~ s/\{(.?.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue$2\{$1$tagsubf$2\}/g; - $calculated =~s#/cgi-bin/koha/[^/]+/([^.]*.pl\?.*)$#opac-$1#g; + if ($template eq "opac") { $calculated =~s#/cgi-bin/koha/[^/]+/([^.]*.pl\?.*)$#opac-$1#g; } # field builded, store the result if ( $calculated && !$hasputtextbefore ) @@ -850,7 +851,7 @@ sub GetISBDView { $calculated =~ s/\{(.?.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue$2\{$1$tagsubf$2\}/g; - $calculated =~s#/cgi-bin/koha/[^/]+/([^.]*.pl\?.*)$#opac-$1#g; + if ($template eq "opac") { $calculated =~s#/cgi-bin/koha/[^/]+/([^.]*.pl\?.*)$#opac-$1#g; } } # field builded, store the result diff --git a/catalogue/ISBDdetail.pl b/catalogue/ISBDdetail.pl index b2dea4041b..7414d73e8d 100755 --- a/catalogue/ISBDdetail.pl +++ b/catalogue/ISBDdetail.pl @@ -68,7 +68,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( # my @blocs = split /\@/,$ISBD; # my @fields = $record->fields(); -my $res = GetISBDView($biblionumber); +my $res = GetISBDView($biblionumber, "intranet"); # count of item linked with biblio my $itemcount = GetItemsCount($biblionumber); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 779244acd9..149c203158 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3103,6 +3103,33 @@ $dbh->do(" SetVersion ($DBversion); } +$DBversion = "3.01.00.120"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { +$dbh->do(<<'ISBDUPDATE'); +UPDATE `koha`.`systempreferences` SET `value` = '#200|

|{200a}{. 200c}{ = 200d}{ : 200e}{. 200h}{. 200i}{ / 200f}{ ; 200g }| +#205|. - |{205a}{ / 205f}| +#210|. - |{ 210a }{ : 210c }{, 210d}| + +#461|. - Extrait de : | chercher{461t}{, 461x }{ ; 461v}{, 461h}{, 461p}| + +#461||{ 461c}| + +#215|. - |{215a}{ : 215c}{ ; 215d}{ + 215e}| + +#225| - | ( recherche cat{225a}{ = 225d}{ : 225e}{. 225h}{. 225i}{ / 225f}{, 225x}{ ; 225v}) | + +#200|||

+ +#010|

|ISBN {010a}{ (010b)}. - |

+ +#300|

|{300a}|

+ +#320|param( # my @blocs = split /\@/,$ISBD; # my @fields = $record->fields(); -my $res = GetISBDView($biblionumber); +my $res = GetISBDView($biblionumber, "opac"); my $reviews = getreviews( $biblionumber, 1 ); foreach ( @$reviews ) { -- 2.11.4.GIT