koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/opac opac-basket.pl,1.6,1.7 opac-ISBDdetail.pl,1.8,


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/opac opac-basket.pl,1.6,1.7 opac-ISBDdetail.pl,1.8,1.9 opac-main.pl,1.18,1.19 opac-MARCdetail.pl,1.7,1.8 opac-search.pl,1.31,1.32 opac-sendbasket.pl,1.9,1.10 opac-user.pl,1.19,1.20
Date: Wed, 26 Oct 2005 02:13:13 -0700

Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29225/opac

Modified Files:
        opac-basket.pl opac-ISBDdetail.pl opac-main.pl 
        opac-MARCdetail.pl opac-search.pl opac-sendbasket.pl 
        opac-user.pl 
Log Message:
big commit, still breaking things...

* synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should not 
be modified deeply.
* code cleaning (cleaning warnings from perl -w) continued

Index: opac-basket.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-basket.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** opac-basket.pl      22 Sep 2005 10:01:46 -0000      1.6
--- opac-basket.pl      26 Oct 2005 09:13:11 -0000      1.7
***************
*** 34,38 ****
  
        my $dat                                   = &bibdata($biblionumber);
!       my ($authorcount, $addauthor)             = 
&getaddauthor($biblionumber);
        my @items                                 = &ItemInfo(undef, 
$biblionumber, 'opac');
  
--- 34,38 ----
  
        my $dat                                   = &bibdata($biblionumber);
!       my ($authorcount, $addauthor)             = &addauthor($biblionumber);
        my @items                                 = &ItemInfo(undef, 
$biblionumber, 'opac');
  
***************
*** 47,50 ****
--- 47,57 ----
        $dat->{'biblionumber'} = $biblionumber;
        $dat->{ITEM_RESULTS} = address@hidden;
+       if (C4::Context->preference("BiblioDefaultView") eq "normal") {
+            $dat->{dest} = "opac-detail.pl";
+       } elsif (C4::Context->preference("BiblioDefaultView") eq "marc") {
+            $dat->{dest} ="opac-MARCdetail.pl";
+       } else {
+            $dat->{dest} = "opac-ISBDdetail.pl";
+       }
        push (@results, $dat);
  }

Index: opac-ISBDdetail.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-ISBDdetail.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** opac-ISBDdetail.pl  4 Aug 2005 14:19:50 -0000       1.8
--- opac-ISBDdetail.pl  26 Oct 2005 09:13:11 -0000      1.9
***************
*** 115,119 ****
                                                my $subfieldvalue = 
get_authorised_value_desc($tag, $subf[$i][0], $subf[$i][1], '', $dbh);
                                                my $tagsubf = 
$tag.$subfieldcode;
!                                               $calculated =~ 
s/\{(.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue$2\{$1$tagsubf$2\}/g;
                                        }
                                        # field builded, store the result
--- 115,119 ----
                                                my $subfieldvalue = 
get_authorised_value_desc($tag, $subf[$i][0], $subf[$i][1], '', $dbh);
                                                my $tagsubf = 
$tag.$subfieldcode;
!                                               $calculated =~ 
s/\{(.?.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue$2\{$1$tagsubf$2\}/g;
                                        }
                                        # field builded, store the result

Index: opac-main.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-main.pl,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** opac-main.pl        8 Aug 2005 02:09:39 -0000       1.18
--- opac-main.pl        26 Oct 2005 09:13:11 -0000      1.19
***************
*** 44,47 ****
--- 44,48 ----
  foreach my $language (getalllanguages()) {
        next if $language eq 'images';
+       next if $language eq 'CVS';
        my $selected='0';
  #                            next if 
$currently_selected_languages->{$language};
***************
*** 49,57 ****
        $counter++;
  }
  
  $template->param(CGIitemtype => $CGIitemtype,
                                suggestion => 
C4::Context->preference("suggestion"),
                                virtualshelves => 
C4::Context->preference("virtualshelves"),
-                               languages => address@hidden,
                                textmessaging => $borrower->{textmessaging},
                                opaclargeimage => 
C4::Context->preference("opaclargeimage"),
--- 50,61 ----
        $counter++;
  }
+ my $languages_count = @options;
  
+ if($languages_count > 1){
+               $template->param(languages => address@hidden);
+ }
  $template->param(CGIitemtype => $CGIitemtype,
                                suggestion => 
C4::Context->preference("suggestion"),
                                virtualshelves => 
C4::Context->preference("virtualshelves"),
                                textmessaging => $borrower->{textmessaging},
                                opaclargeimage => 
C4::Context->preference("opaclargeimage"),

Index: opac-MARCdetail.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-MARCdetail.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** opac-MARCdetail.pl  15 Jun 2005 16:09:42 -0000      1.7
--- opac-MARCdetail.pl  26 Oct 2005 09:13:11 -0000      1.8
***************
*** 169,172 ****
--- 169,174 ----
        }
  }
+ my ($holdingbrtagf,$holdingbrtagsubf) = 
&MARCfind_marc_from_kohafield($dbh,"items.holdingbranch",$itemtype);
+ @big_array = sort {$a->{$holdingbrtagsubf} cmp $b->{$holdingbrtagsubf}} 
@big_array;
  #fill big_row with missing datas
  foreach my $subfield_code  (keys(%witness)) {

Index: opac-search.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-search.pl,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** opac-search.pl      25 Jun 2005 05:26:14 -0000      1.31
--- opac-search.pl      26 Oct 2005 09:13:11 -0000      1.32
***************
*** 98,103 ****
--- 98,111 ----
        $resultsperpage= $query->param('resultsperpage');
        $resultsperpage = 19 if(!defined $resultsperpage);
+       
        my $orderby = $query->param('orderby');
        my $desc_or_asc = $query->param('desc_or_asc');
+       my $exactsearch = $query->param('exact');
+       if ($exactsearch) {
+               warn "EXACT";
+               foreach (@operator) {
+                       $_='=';
+               }
+       }
        # builds tag and subfield arrays
        my @tags;
***************
*** 153,164 ****
        my ($results,$total) = catalogsearch($dbh, 
address@hidden,address@hidden,
                                                                                
address@hidden, address@hidden, address@hidden,
!                                                                               
$startfrom*$resultsperpage, $resultsperpage,$orderby,$desc_or_asc,$sqlstring, 
$extratables);
        if ($total ==1) {
        if (C4::Context->preference("BiblioDefaultView") eq "normal") {
             print 
$query->redirect("/cgi-bin/koha/opac-detail.pl?bib="address@hidden>{biblionumber});
!       } elsif (C4::Context->preference("BiblioDefaultView") eq "MARC") {
!            print 
$query->redirect("/cgi-bin/koha/MARCdetail.pl?bib="address@hidden>{biblionumber});
        } else {
!            print 
$query->redirect("/cgi-bin/koha/ISBDdetail.pl?bib="address@hidden>{biblionumber});
        }
        exit;
--- 161,172 ----
        my ($results,$total) = catalogsearch($dbh, 
address@hidden,address@hidden,
                                                                                
address@hidden, address@hidden, address@hidden,
!                                                                               
$startfrom*$resultsperpage, $resultsperpage,$orderby,$desc_or_asc);
        if ($total ==1) {
        if (C4::Context->preference("BiblioDefaultView") eq "normal") {
             print 
$query->redirect("/cgi-bin/koha/opac-detail.pl?bib="address@hidden>{biblionumber});
!       } elsif (C4::Context->preference("BiblioDefaultView") eq "marc") {
!            print 
$query->redirect("/cgi-bin/koha/opac-MARCdetail.pl?bib="address@hidden>{biblionumber});
        } else {
!            print 
$query->redirect("/cgi-bin/koha/opac-ISBDdetail.pl?bib="address@hidden>{biblionumber});
        }
        exit;
***************
*** 354,364 ****
                                                        suggestion => 
C4::Context->preference("suggestion"),
                                                        virtualshelves => 
C4::Context->preference("virtualshelves"),
-                 itemtypelist => $itemtypelist,
-               subcategorylist => $subcategorylist,
-               brancheslist => $brancheslist,
-               categorylist => $categorylist,
-               mediatypelist => $mediatypelist,
-               itemtypesstring => $itemtypesstring,
-               avail => $avail,
                                                        );
  
--- 362,365 ----
***************
*** 407,411 ****
        $sth->finish;
      
!       $template->param(itemtypelist => $itemtypelist,
                                        CGIitemtype => $CGIitemtype,
                                        CGIbranch => $CGIbranch,
--- 408,413 ----
        $sth->finish;
      
!       
$template->param('Disable_Dictionary'=>C4::Context->preference("Disable_Dictionary"))
 if (C4::Context->preference("Disable_Dictionary"));
!       $template->param(classlist => $classlist,
                                        CGIitemtype => $CGIitemtype,
                                        CGIbranch => $CGIbranch,

Index: opac-sendbasket.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-sendbasket.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** opac-sendbasket.pl  22 Sep 2005 10:01:46 -0000      1.9
--- opac-sendbasket.pl  26 Oct 2005 09:13:11 -0000      1.10
***************
*** 6,10 ****
  use MIME::QuotedPrint;
  use MIME::Base64;
! use C4::Context;
  use C4::Biblio;
  use C4::Auth;
--- 6,11 ----
  use MIME::QuotedPrint;
  use MIME::Base64;
! 
! use C4::Search;
  use C4::Biblio;
  use C4::Auth;
***************
*** 52,56 ****
  
                my $dat = &bibdata($biblionumber);
!               my ($authorcount, $addauthor) = &getaddauthor($biblionumber);
                my @items                     = &ItemInfo(undef, $biblionumber, 
'opac');
  
--- 53,57 ----
  
                my $dat = &bibdata($biblionumber);
!               my ($authorcount, $addauthor) = &addauthor($biblionumber);
                my @items                     = &ItemInfo(undef, $biblionumber, 
'opac');
  
***************
*** 70,75 ****
        }
  
!     # Getting template result                                                 
                                            
!     my $template_res = $template2->output();
        # Analysing information and getting mail properties
        if ($template_res =~ /<SUBJECT>\n(.*)\n<END_SUBJECT>/s) { 
$mail{'subject'} = $1; }
--- 71,82 ----
        }
  
!       my address@hidden;
!       $template2->param(BIBLIO_RESULTS => $resultsarray,
!                                       email_sender => $email_sender);
! 
!       # Getting template result
!       my $template_res = $template2->output();
!       my $body;
! 
        # Analysing information and getting mail properties
        if ($template_res =~ /<SUBJECT>\n(.*)\n<END_SUBJECT>/s) { 
$mail{'subject'} = $1; }
***************
*** 82,86 ****
        if ($template_res =~ /<FILENAME>\n(.*)\n<END_FILENAME>/s) { $email_file 
= $1; }
  
!       if ($template_res =~ /<MESSAGE>\n(.*)\n<END_MESSAGE>/s) { $mail{'body'} 
= $1; }
  
        my $boundary = "====" . time() . "====";
--- 89,93 ----
        if ($template_res =~ /<FILENAME>\n(.*)\n<END_FILENAME>/s) { $email_file 
= $1; }
  
!       if ($template_res =~ /<MESSAGE>\n(.*)\n<END_MESSAGE>/s) { $body = $1; }
  
        my $boundary = "====" . time() . "====";
***************
*** 94,160 ****
  #     $mail{body} =
        $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\"";
! 
!       my $message = encode_qp( "" );
! 
! # $file = $^X; # This is the perl executable
! # 
! # open (F, $file) or die "Cannot read $file: $!";
! # binmode F; undef $/;
! $mail{body} = encode_base64($iso2709);
! # close F;
! 
! $boundary = '--'.$boundary;
! $mail{body} = <<END_OF_BODY;
  $boundary
  Content-Type: text/plain; charset="iso-8859-1"
  Content-Transfer-Encoding: quoted-printable
  
! $message
  $boundary
! Content-Type: application/octet-stream; name="basket"
  Content-Transfer-Encoding: base64
! Content-Disposition: attachment; filename="basket"
! 
! $mail{body}
! $boundary--
! END_OF_BODY
! 
! 
! 
!        <<END_OF_BODY;
! $boundary
! Content-Type: text/plain; charset="iso-8859-1"
! Content-Transfer-Encoding: quoted-printable
! 
! $email_header
! 
! $mail{'body'}
  
  $boundary--
  END_OF_BODY
  
- $mail{attachment} = $iso2709;
- #     $mail{body} = <<END_OF_BODY;
- #$boundary
- #Content-Type: text/plain; charset="iso-8859-1"
- #Content-Transfer-Encoding: quoted-printable
- #
- #$email_header
- #
- #$boundary
- #Content-Type: text/plain; name="$email_file"
- #Content-Transfer-Encoding: quoted-printable
- #Content-Disposition: attachment; filename="$email_file"
- #
- #$mail{'body'}
- #
- #$boundary--
- #END_OF_BODY
- 
        # Sending mail
        if (sendmail %mail) {
        # do something if it works....
- #             warn " ".$mail{body};
- #             warn " ".$mail{PJ};
                $template->param(SENT => "1");
                $template->param(email_add => $email_add);
--- 101,125 ----
  #     $mail{body} =
        $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\"";
!       my $isofile = encode_base64($iso2709);
!       $boundary = '--'.$boundary;
!       $mail{body} = 
! <<END_OF_BODY;
  $boundary
  Content-Type: text/plain; charset="iso-8859-1"
  Content-Transfer-Encoding: quoted-printable
  
! $body
  $boundary
! Content-Type: application/octet-stream; name="basket.iso2709"
  Content-Transfer-Encoding: base64
! Content-Disposition: attachment; filename="basket.iso2709"
  
+ $isofile
  $boundary--
  END_OF_BODY
  
        # Sending mail
        if (sendmail %mail) {
        # do something if it works....
                $template->param(SENT => "1");
                $template->param(email_add => $email_add);
***************
*** 163,168 ****
                warn "Error sending mail: $Mail::Sendmail::error \n";
        }
! 
!     output_html_with_http_headers $query, $cookie, $template->output;
  }
  else {
--- 128,132 ----
                warn "Error sending mail: $Mail::Sendmail::error \n";
        }
!       output_html_with_http_headers $query, $cookie, $template->output;
  }
  else {

Index: opac-user.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-user.pl,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** opac-user.pl        22 Sep 2005 10:01:46 -0000      1.19
--- opac-user.pl        26 Oct 2005 09:13:11 -0000      1.20
***************
*** 32,35 ****
--- 32,39 ----
  $borr->{'ethnicity'}    = fixEthnicity($borr->{'ethnicity'});
  
+ if($borr->{'debarred'} || $borr->{'gonenoaddress'} || $borr->{'lost'}){
+       $borr->{'flagged'} =1;
+ }
+ 
  if ($borr->{'amountoutstanding'} > 5) {
      $borr->{'amountoverfive'} = 1;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]