Merge remote-tracking branch 'origin/new/bug_5211'
authorPaul Poulain <paul.poulain@biblibre.com>
Tue, 6 Dec 2011 10:36:57 +0000 (11:36 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 6 Dec 2011 10:36:57 +0000 (11:36 +0100)
14 files changed:
C4/Installer.pm
C4/Output.pm
C4/Serials.pm
catalogue/export.pl
debian/scripts/koha-create-dirs
debian/scripts/koha-remove
etc/zebradb/zebra-biblios.cfg
koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/patron-attr-types.tt
koha_perl_deps.pl
misc/cronjobs/overdue_notices.pl
misc/migration_tools/rebuild_zebra.pl
reports/issues_by_borrower_category.plugin
reports/itemtypes.plugin

index 1c177b9..a7eb1f6 100644 (file)
@@ -529,8 +529,10 @@ sub load_sql {
         # report the import a failure although it really succeded -fbcit
     }
 #   errors thrown while loading installer data should be logged
-    warn "C4::Installer::load_sql returned the following errors while attempting to load $filename:\n";
-    warn $error;
+    if($error) {
+      warn "C4::Installer::load_sql returned the following errors while attempting to load $filename:\n";
+      warn "$error";
+    }
     return $error;
 }
 
index 41a0a28..6ab16d9 100644 (file)
@@ -33,7 +33,6 @@ use C4::Dates qw(format_date);
 use C4::Budgets qw(GetCurrency);
 use C4::Templates;
 
-#use HTML::Template::Pro;
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 BEGIN {
index 18e0ce4..1471184 100644 (file)
@@ -588,7 +588,7 @@ sub GetSubscriptions {
             $tmpstring =~ s/^AND //;
             push @sqlstrings, $tmpstring;
         }
-        $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "(" . join( ") OR (", @sqlstrings ) . ")";
+        $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "((" . join( ") OR (", @sqlstrings ) . "))";
     }
     if ($issn) {
         my @sqlstrings;
@@ -601,7 +601,7 @@ sub GetSubscriptions {
             $tmpstring =~ s/^OR //;
             push @sqlstrings, $tmpstring;
         }
-        $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "(" . join( ") OR (", @sqlstrings ) . ")";
+        $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "((" . join( ") OR (", @sqlstrings ) . "))";
     }
     $sql .= "$sqlwhere ORDER BY title";
     $debug and warn "GetSubscriptions query: $sql params : ", join( " ", @bind_params );
index 3efdb21..2b55d9f 100755 (executable)
@@ -1,5 +1,4 @@
 #!/usr/bin/perl
-use HTML::Template::Pro;
 use strict;
 #use warnings; FIXME - Bug 2505
 
index 7daf57a..06b7bff 100755 (executable)
@@ -42,10 +42,15 @@ do
     userdir "$name" "/etc/koha/sites/$name"
     userdir "$name" "/var/lib/koha/$name"
     userdir "$name" "/var/lib/koha/$name/authorities"
+    userdir "$name" "/var/lib/koha/$name/authorities/key"
+    userdir "$name" "/var/lib/koha/$name/authorities/register"
+    userdir "$name" "/var/lib/koha/$name/authorities/shadow"
+    userdir "$name" "/var/lib/koha/$name/authorities/tmp"
     userdir "$name" "/var/lib/koha/$name/biblios"
     userdir "$name" "/var/lib/koha/$name/biblios/key"
     userdir "$name" "/var/lib/koha/$name/biblios/register"
     userdir "$name" "/var/lib/koha/$name/biblios/shadow"
+    userdir "$name" "/var/lib/koha/$name/biblios/tmp"
     userdir "$name" "/var/lock/koha/$name"
     userdir "$name" "/var/lock/koha/$name/authorities"
     userdir "$name" "/var/lock/koha/$name/biblios"
index 10a8b78..b9e5c2a 100755 (executable)
@@ -31,17 +31,27 @@ FLUSH PRIVILEGES;
 eof
     
     koha-stop-zebra $name
-    rm "/etc/apache2/sites-available/$name"
-    rm "/etc/koha/sites/$name/koha-conf.xml"
-    rm "/etc/koha/sites/$name/zebra-biblios.cfg"
-    rm "/etc/koha/sites/$name/zebra-authorities.cfg"
-    rm "/etc/koha/sites/$name/zebra-authorities-dom.cfg"
-    rm "/etc/koha/sites/$name/zebra.passwd"
-    rmdir "/etc/koha/sites/$name"
-    rm -r "/var/lock/koha/$name"
-    rm -r "/var/log/koha/$name"
-    rm -r "/var/run/koha/$name"
-    deluser --quiet "$name-koha"
+    [ -f "/etc/apache2/sites-available/$name" ]  && \
+        rm "/etc/apache2/sites-available/$name"
+    [ -f "/etc/koha/sites/$name/koha-conf.xml" ] && \
+        rm "/etc/koha/sites/$name/koha-conf.xml"
+    [ -f "/etc/koha/sites/$name/zebra-biblios.cfg" ] && \
+        rm "/etc/koha/sites/$name/zebra-biblios.cfg"
+    [ -f "/etc/koha/sites/$name/zebra-authorities.cfg" ] && \
+        rm "/etc/koha/sites/$name/zebra-authorities.cfg"
+    [ -f "/etc/koha/sites/$name/zebra-authorities-dom.cfg" ] && \
+        rm "/etc/koha/sites/$name/zebra-authorities-dom.cfg"
+    [ -f "/etc/koha/sites/$name/zebra.passwd" ] && \
+        rm "/etc/koha/sites/$name/zebra.passwd"
+    [ -d "/etc/koha/sites/$name" ] && \
+        rmdir "/etc/koha/sites/$name"
+    [ -d "/var/lock/koha/$name" ] && \
+        rm -r "/var/lock/koha/$name"
+    [ -d "/var/log/koha/$name" ] && \
+        rm -r "/var/log/koha/$name"
+    [ -d "/var/run/koha/$name" ] && \
+        rm -r "/var/run/koha/$name"
+    getent passwd "$name-koha" > /dev/null && deluser --quiet "$name-koha"
     a2dissite "$name"
 done
 
index 6de43bf..b461a64 100644 (file)
@@ -57,3 +57,8 @@ keyTmpDir: __ZEBRA_DATA_DIR__/biblios/key
 memMax: 50M
 rank:rank-1
 truncmax: 1000000000
+
+# Specifies the maximum number of records that will be sorted in a result set.
+# If the result set contains more than that limit, the records after the limit
+# will not be sorted. If omitted, the default value is 1,000.
+sortmax: 1000
index 2933544..913076f 100644 (file)
@@ -94,6 +94,7 @@ function update_child() {
            new YAHOO.widget.Button("editpatron");
            new YAHOO.widget.Button("addnote");
         [% IF CAN_user_staffaccess %] new YAHOO.widget.Button("changepassword");  [% END %]
+           new YAHOO.widget.Button("duplicate");
            new YAHOO.widget.Button("printslip");
                new YAHOO.widget.Button("printpage");
        }
@@ -117,9 +118,10 @@ function update_child() {
         [% END %]
        [% END %]
        [% IF ( CAN_user_borrowers ) %]
-       [% IF ( adultborrower ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
-       [% CAN_user_staffaccess %] <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change Password</a></li>[% END %]
-       <li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">Duplicate</a></li>
+        [% IF ( adultborrower ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
+        [% IF ( CAN_user_staffaccess ) %] <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change Password</a></li>[% END %]
+    [% END %]
+    <li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">Duplicate</a></li>
        <li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&amp;print=page">Print Page</a></li>
        <li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&amp;print=slip">Print Slip</a></li>
        <li id="searchtoholdc"><a id="searchtohold" href="#">Search to hold</a></li>
index c068da7..1925e69 100644 (file)
@@ -31,6 +31,7 @@
        <li>Check 'Allow password' to make it possible to associate a password with this attribute.</li>
        <li>Check 'Display in OPAC' to display this attribute on a patron's details page in the OPAC.</li>
        <li>Check 'Searchable' to make this attribute searchable in the staff patron search.</li>
+       <li>Check 'Display in check-out' to make this attribute visible in the patron's short detail display on the left of the checkout screen and other patron pages</li>
        <li>Authorized value category; if one is selected, the patron record input page will only allow values to be chosen from the authorized value list.
 <ul>
        <li>You will first need to add an authorized value list for it to appear in this menu</li>
index c5b614e..01e17d5 100755 (executable)
@@ -39,7 +39,7 @@ push @pm, 'missing_pm' if $missing || $all;
 push @pm, 'upgrade_pm' if $upgrade || $all;
 push @pm, 'current_pm' if $installed || $all;
 
-print color 'bold white' if $color;
+print color 'bold blue' if $color;
 print"
                                               Installed         Required          Module is
 Module Name                                   Version           Version            Required
@@ -68,7 +68,7 @@ write;
         }
     }
 }
-print color 'bold white' if $color;
+print color 'bold blue' if $color;
 my $footer = "
 --------------------------------------------------------------------------------------------
 Total modules reported: $count                      ";
@@ -81,6 +81,7 @@ else {
 }
 
 print $footer;
+print color 'reset' if $color;
 
 1;
 
index 5646efc..5347f69 100755 (executable)
@@ -504,7 +504,8 @@ END_SQL
                         items           => \@items,
                         substitute      => {    # this appears to be a hack to overcome incomplete features in this code.
                                             bib             => $branch_details->{'branchname'}, # maybe 'bib' is a typo for 'lib<rary>'?
-                                            'items.content' => $titles
+                                            'items.content' => $titles,
+                                            'count'         => $itemcount,
                                            }
                     }
                 );
index fa87f22..fbfd3af 100755 (executable)
@@ -175,7 +175,7 @@ if ($keep_export) {
 sub check_zebra_dirs {
        my ($base) = shift() . '/';
        my $needed_repairing = 0;
-       my @dirs = ( '', 'key', 'register', 'shadow' );
+       my @dirs = ( '', 'key', 'register', 'shadow', 'tmp' );
        foreach my $dir (@dirs) {
                my $bdir = $base . $dir;
         if (! -d $bdir) {
index 5b43023..825a492 100755 (executable)
@@ -22,7 +22,6 @@ use strict;
 use C4::Auth;
 use CGI;
 use C4::Context;
-use HTML::Template::Pro;
 use C4::Search;
 use C4::Output;
 use C4::Koha;
index d541429..f543f2d 100755 (executable)
@@ -22,7 +22,6 @@ use strict;
 use C4::Auth;
 use CGI;
 use C4::Context;
-use HTML::Template::Pro;
 use C4::Search;
 use C4::Output;
 use C4::Koha;