koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha C4/Branch.pm C4/Search.pm admin/branches.p...


From: paul poulain
Subject: [Koha-cvs] koha C4/Branch.pm C4/Search.pm admin/branches.p...
Date: Fri, 04 May 2007 16:24:09 +0000

CVSROOT:        /sources/koha
Module name:    koha
Changes by:     paul poulain <tipaul>   07/05/04 16:24:09

Modified files:
        C4             : Branch.pm Search.pm 
        admin          : branches.pl checkmarc.pl 
                         marc_subfields_structure.pl 
                         systempreferences.pl 
        cataloguing/value_builder: unimarc_field_210c.pl 
        koha-tmpl/intranet-tmpl/prog/en/admin: admin-home.tmpl 
                                               currency.tmpl 
                                               marc_subfields_structure.tmpl 
        misc/migration_tools: rebuild_nozebra.pl 
        misc/migration_tools/22_to_30: rebuild_unimarc_100.pl 
        updater        : updatedatabase 

Log message:
        various bugfixes on parameters modules + adding default NoZebraIndexes 
systempreference if it's empty

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Branch.pm?cvsroot=koha&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Search.pm?cvsroot=koha&r1=1.136&r2=1.137
http://cvs.savannah.gnu.org/viewcvs/koha/admin/branches.pl?cvsroot=koha&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/koha/admin/checkmarc.pl?cvsroot=koha&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/koha/admin/marc_subfields_structure.pl?cvsroot=koha&r1=1.43&r2=1.44
http://cvs.savannah.gnu.org/viewcvs/koha/admin/systempreferences.pl?cvsroot=koha&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/value_builder/unimarc_field_210c.pl?cvsroot=koha&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/admin-home.tmpl?cvsroot=koha&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/currency.tmpl?cvsroot=koha&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/marc_subfields_structure.tmpl?cvsroot=koha&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/koha/misc/migration_tools/rebuild_nozebra.pl?cvsroot=koha&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/koha/misc/migration_tools/22_to_30/rebuild_unimarc_100.pl?cvsroot=koha&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/koha/updater/updatedatabase?cvsroot=koha&r1=1.163&r2=1.164

Patches:
Index: C4/Branch.pm
===================================================================
RCS file: /sources/koha/koha/C4/Branch.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- C4/Branch.pm        9 Mar 2007 15:35:32 -0000       1.2
+++ C4/Branch.pm        4 May 2007 16:24:08 -0000       1.3
@@ -15,7 +15,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: Branch.pm,v 1.2 2007/03/09 15:35:32 tipaul Exp $
+# $Id: Branch.pm,v 1.3 2007/05/04 16:24:08 tipaul Exp $
 
 use strict;
 require Exporter;
@@ -25,7 +25,7 @@
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.2 $' =~ /\d+/g; shift(@v).".".join( "_", 
map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.3 $' =~ /\d+/g; shift(@v).".".join( "_", 
map { sprintf "%03d", $_ } @v ); };
 
 =head1 NAME
 
@@ -56,6 +56,7 @@
    &GetBranchInfo
    &ModBranchCategoryInfo
    &DelBranch
+   &DelBranchCategory
 );
 
 =head2 GetBranches
@@ -407,7 +408,7 @@
 
 =cut
 
-sub DeleteBranchCategory {
+sub DelBranchCategory {
     my ($categorycode) = @_;
     my $dbh = C4::Context->dbh;
     my $sth = $dbh->prepare("delete from branchcategories where categorycode = 
?");

Index: C4/Search.pm
===================================================================
RCS file: /sources/koha/koha/C4/Search.pm,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -b -r1.136 -r1.137
--- C4/Search.pm        4 May 2007 13:59:16 -0000       1.136
+++ C4/Search.pm        4 May 2007 16:24:08 -0000       1.137
@@ -25,7 +25,7 @@
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.136 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.137 $' =~ /\d+/g;
     shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v );
 };
 
@@ -1221,6 +1221,9 @@
         my $results;
         if ($operator) {
             #do a specific search
+            # automatic replace for short operator
+            $operator='title' if $operator eq 'ti';
+            $operator='author' if $operator eq 'au';
             my $dbh = C4::Context->dbh;
             $operator='LIKE' if $operator eq '=' and $right=~ /%/;
             my $sth = $dbh->prepare("SELECT biblionumbers FROM nozebra WHERE 
indexname=? AND value $operator ?");

Index: admin/branches.pl
===================================================================
RCS file: /sources/koha/koha/admin/branches.pl,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- admin/branches.pl   24 Apr 2007 13:54:28 -0000      1.40
+++ admin/branches.pl   4 May 2007 16:24:08 -0000       1.41
@@ -183,7 +183,7 @@
 elsif ( $op eq 'categorydelete_confirmed' ) {
 
     # actually delete branch and return to the main screen....
-    DeleteBranchCategory($categorycode);
+    DelBranchCategory($categorycode);
     $template->param( else => 1 );
     default("MESSAGE6",$template);
 

Index: admin/checkmarc.pl
===================================================================
RCS file: /sources/koha/koha/admin/checkmarc.pl,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- admin/checkmarc.pl  24 Apr 2007 13:54:28 -0000      1.12
+++ admin/checkmarc.pl  4 May 2007 16:24:08 -0000       1.13
@@ -67,7 +67,7 @@
 
 # checks all item fields are in the same tag and in tab 10
 
-$sth = $dbh->prepare("select tagfield,tab,kohafield from 
marc_subfield_structure where kohafield like \"items.%\"");
+$sth = $dbh->prepare("select tagfield,tab,kohafield from 
marc_subfield_structure where kohafield like \"items.%\" and tab >=0");
 $sth->execute;
 my $field;
 ($res,$res2,$field) = $sth->fetchrow;
@@ -77,7 +77,7 @@
 #warn "TAGF : $tagfield";
 while (($res,$res2,$field) = $sth->fetchrow) {
        # (ignore itemnumber, that must be in -1 tab)
-       if (($res ne $tagfield or $res2 ne $tab ) && $res2 ne -1) {
+       if (($res ne $tagfield) or ($res2 ne $tab)) {
                $subtotal++;
        }
 }
@@ -89,7 +89,7 @@
                $subtotal++;
        }
 }
-if ($subtotal eq 0) {
+if ($subtotal == 0) {
        $template->param(itemfields => 0);
 } else {
        $template->param(itemfields => 1);

Index: admin/marc_subfields_structure.pl
===================================================================
RCS file: /sources/koha/koha/admin/marc_subfields_structure.pl,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- admin/marc_subfields_structure.pl   24 Apr 2007 13:54:28 -0000      1.43
+++ admin/marc_subfields_structure.pl   4 May 2007 16:24:08 -0000       1.44
@@ -277,8 +277,10 @@
     }
 
     # add more_subfields empty lines for add if needed
-    for ( my $j = $i ; $j <= $more_subfields + $i ; $j++ ) {
+    for ( my $j = 1 ; $j <= 1 ; $j++ ) {
         my %row_data;    # get a fresh hash for the row data
+        $row_data{'subfieldcode'} = '';
+
         $row_data{tab} = CGI::scrolling_list(
             -name   => 'tab',
             -id     => "tab$j",
@@ -373,6 +375,8 @@
         $row_data{toggle} = $toggle;
         $row_data{row}    = $j;
         push( @loop_data, \%row_data );
+        use Data::Dumper;
+        warn "push : ".Dumper(%row_data);
     }
     $template->param( 'use-heading-flags-p'      => 1 );
     $template->param( 'heading-edit-subfields-p' => 1 );
@@ -468,8 +472,7 @@
 "select * from marc_subfield_structure where tagfield=? and tagsubfield=? and 
frameworkcode=?"
       );
 
-    #FIXME : called with 2 bind variables when 3 are needed
-    $sth->execute( $tagfield, $tagsubfield );
+    $sth->execute( $tagfield, $tagsubfield, $frameworkcode );
     my $data = $sth->fetchrow_hashref;
     $sth->finish;
     $template->param(

Index: admin/systempreferences.pl
===================================================================
RCS file: /sources/koha/koha/admin/systempreferences.pl,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- admin/systempreferences.pl  24 Apr 2007 13:54:28 -0000      1.39
+++ admin/systempreferences.pl  4 May 2007 16:24:08 -0000       1.40
@@ -90,6 +90,9 @@
     $tabsysprefs{Stemming}="Catalogue";
     $tabsysprefs{WeightFields}="Catalogue";
     $tabsysprefs{expandedSearchOption}="Catalogue";
+    $tabsysprefs{NoZebra}="Catalogue";
+    $tabsysprefs{NoZebraIndexes}="Catalogue";
+    $tabsysprefs{ReceiveBackIssues}="Catalogue";
     
 # Circulation
     $tabsysprefs{maxoutstanding}="Circulation";
@@ -123,6 +126,7 @@
     $tabsysprefs{borrowerRelationship}="Members";
     $tabsysprefs{BorrowersTitles}="Members";    
     $tabsysprefs{patronimages}="Members";
+    $tabsysprefs{MinPasswordLength}="Members";
     
 # OPAC
     $tabsysprefs{AmazonAssocTag}="OPAC";

Index: cataloguing/value_builder/unimarc_field_210c.pl
===================================================================
RCS file: /sources/koha/koha/cataloguing/value_builder/unimarc_field_210c.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- cataloguing/value_builder/unimarc_field_210c.pl     24 Apr 2007 13:54:29 
-0000      1.3
+++ cataloguing/value_builder/unimarc_field_210c.pl     4 May 2007 16:24:08 
-0000       1.4
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: unimarc_field_210c.pl,v 1.3 2007/04/24 13:54:29 hdl Exp $
+# $Id: unimarc_field_210c.pl,v 1.4 2007/05/04 16:24:08 tipaul Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -63,12 +63,12 @@
 #---- 200$a for isbn
 #---- 200$b for editor
 #---- 200$c (repeated) for collections
- my $sth; 
-#= $dbh->prepare("select auth_subfield_table.authid,subfieldvalue from 
auth_subfield_table 
-#                         left join auth_header on 
auth_subfield_table.authid=auth_header.authid
-#                         where authtypecode='EDITORS' and tag='200' and 
subfieldcode='a'");
- my $sth2;
- # = $dbh->prepare("select subfieldvalue from auth_subfield_table where 
tag='200' and subfieldcode='b' and authid=?");
+ my $sth 
+= $dbh->prepare("select auth_subfield_table.authid,subfieldvalue from 
auth_subfield_table 
+                        left join auth_header on 
auth_subfield_table.authid=auth_header.authid
+                        where authtypecode='EDITORS' and tag='200' and 
subfieldcode='a'");
+ my $sth2
+ = $dbh->prepare("select subfieldvalue from auth_subfield_table where 
tag='200' and subfieldcode='b' and authid=?");
 $sth->execute;
 my @editors;
 my $authoritysep = C4::Context->preference("authoritysep");

Index: koha-tmpl/intranet-tmpl/prog/en/admin/admin-home.tmpl
===================================================================
RCS file: 
/sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/admin/admin-home.tmpl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- koha-tmpl/intranet-tmpl/prog/en/admin/admin-home.tmpl       18 Mar 2007 
02:46:21 -0000      1.10
+++ koha-tmpl/intranet-tmpl/prog/en/admin/admin-home.tmpl       4 May 2007 
16:24:08 -0000       1.11
@@ -57,6 +57,10 @@
        <td>Define issuing rules in a matrix for branches / borrowers / item 
types (number of issues, duration, cost...).</td>
 </tr>
 <tr>
+       <td><a href="/cgi-bin/koha/admin/finesrules.pl">Fines rules</a></td>
+       <td>Define fines in a matrix for branches / borrowers / item types 
(cost, grace period...).</td>
+</tr>
+<tr>
 <th colspan="2">Catalogue</th>
 </tr>
 <tr>

Index: koha-tmpl/intranet-tmpl/prog/en/admin/currency.tmpl
===================================================================
RCS file: 
/sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/admin/currency.tmpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- koha-tmpl/intranet-tmpl/prog/en/admin/currency.tmpl 11 Mar 2007 21:08:12 
-0000      1.2
+++ koha-tmpl/intranet-tmpl/prog/en/admin/currency.tmpl 4 May 2007 16:24:09 
-0000       1.3
@@ -98,7 +98,7 @@
                </tr>
         </table>
                
-               <input type="button" value="Update" onClick="Check(this.form)" 
/> <input type="button" value="Cancel" onclick="location.href='<!-- TMPL_VAR 
NAME="script_name" -->'; return false;" />
+               <input type="button" value="OK" onClick="Check(this.form)" /> 
<input type="button" value="Cancel" onclick="location.href='<!-- TMPL_VAR 
NAME="script_name" -->'; return false;" />
         </form>
 
 <!-- /TMPL_IF -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/marc_subfields_structure.tmpl
===================================================================
RCS file: 
/sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/admin/marc_subfields_structure.tmpl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- koha-tmpl/intranet-tmpl/prog/en/admin/marc_subfields_structure.tmpl 19 Mar 
2007 18:35:12 -0000      1.5
+++ koha-tmpl/intranet-tmpl/prog/en/admin/marc_subfields_structure.tmpl 4 May 
2007 16:24:09 -0000       1.6
@@ -20,12 +20,13 @@
     <input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR 
NAME="frameworkcode" -->" />
     <input type="submit" value="Save Changes" />
     
-    <h3>Tag <!-- TMPL_VAR NAME="tagfield" --></h3>
-    <b>Edit subfields :</b>
+    <h2>Tag <!-- TMPL_VAR NAME="tagfield" --></h2>
     <div id="tabs">
+     <p>Edit subfield
         <!-- TMPL_LOOP NAME="loop" -->
-           <!-- TMPL_IF NAME="subfieldcode"-->
+                <!-- TMPL_IF name="subfieldcode" -->
                <input type="hidden" name="tagsubfield" value="<!-- TMPL_VAR 
NAME="subfieldcode" -->" />
+                <!-- /TMPL_IF -->
                <a 
                     href="javascript:active('sub<!-- TMPL_VAR 
NAME='subfieldcode' -->');"
                     class="tab_inactive"
@@ -34,16 +35,18 @@
                 >
                     <!-- TMPL_VAR NAME="subfieldcode" -->
                </a>
-           <!-- /TMPL_IF -->
            <!-- /TMPL_LOOP -->
+    </p>
     </div>
     
     <div id="content" style="display:block">
         <!-- TMPL_LOOP NAME="loop" --> 
-        <!-- TMPL_IF NAME="subfieldcode"-->
         <div id="content_sub<!-- TMPL_VAR NAME="subfieldcode" -->" 
class="content_hidden">
         
         <h3>Basic constaints</h3>
+            <!-- TMPL_UNLESS name="subfieldcode" -->
+                <p>Subfield code: <input type="text" name="tagsubfield" 
value="<!-- TMPL_VAR NAME="subfieldcode" -->" /></p>
+            <!-- /TMPL_UNLESS -->
                 <p><label for="liblibrarian<!-- TMPL_VAR NAME="row" -->">Text 
for librarian</label><input id="liblibrarian<!-- TMPL_VAR NAME="row" -->" 
type="text" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" -->" 
size="40" maxlength="80" /></p>
                 <p><label for="libopac<!-- TMPL_VAR NAME="row" -->">Text for 
OPAC</label><input type="text" id="libopac<!-- TMPL_VAR NAME="row" -->" 
name="libopac" value="<!-- TMPL_VAR NAME="libopac" -->" size="40" 
maxlength="80" /></p>
                 <p><label for="repeatable<!-- TMPL_VAR NAME="row" 
-->">Repeatable</label><!-- TMPL_VAR NAME="repeatable" -->&nbsp;</p>
@@ -51,7 +54,6 @@
                 <p><label for="tab<!-- TMPL_VAR NAME="row" -->">Managed in 
tab</label><!-- TMPL_VAR NAME="tab" --> (ignore means that the subfield is NOT 
managed by Koha)</p>
                 
                 <a href="javascript:displayMoreConstraint('more<!-- TMPL_VAR 
NAME="subfieldcode" -->')">display more constraints</a>
-               
             <span id="more<!-- TMPL_VAR NAME="subfieldcode" -->" 
class="content_hidden">
                 <h3>Advanced constraint</h3>
                 <p>
@@ -69,7 +71,6 @@
                 <p><label for="kohafield<!-- TMPL_VAR NAME="row" -->">Koha 
link</label><!-- TMPL_VAR NAME="kohafield" --></p>
             </span>
         </div>
-        <!-- /TMPL_IF -->
         <!-- /TMPL_LOOP -->
     </div>
     </form>

Index: misc/migration_tools/rebuild_nozebra.pl
===================================================================
RCS file: /sources/koha/koha/misc/migration_tools/rebuild_nozebra.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- misc/migration_tools/rebuild_nozebra.pl     2 May 2007 16:44:31 -0000       
1.3
+++ misc/migration_tools/rebuild_nozebra.pl     4 May 2007 16:24:09 -0000       
1.4
@@ -14,7 +14,7 @@
 $|=1; # flushes output
 
 # limit for database dumping
-my $limit = "LIMIT 100";
+my $limit;# = "LIMIT 100";
 my $directory;
 my $skip_export;
 my $keep_export;
@@ -49,6 +49,27 @@
 
 my %index = GetNoZebraIndexes();
 
+unless (%index) {
+    if (C4::Context->preference('marcflavour') eq 'UNIMARC') {
+        $dbh->do("UPDATE systempreferences SET value=\"'title' => 
'200a,200c,200d,200e,225a,225d,225e,225f,225h,225i,225v,500*,501*,503*,510*,512*,513*,514*,515*,516*,517*,518*,519*,520*,530*,531*,532*,540*,541*,545*,604t,610t,605a',
+        'author' 
=>'200f,600a,601a,604a,700a,700b,700c,700d,700a,701b,701c,701d,702a,702b,702c,702d,710a,710b,710c,710d,711a,711b,711c,711d,712a,712b,712c,712d',
+        'isbn' => '010a',
+        'issn' => '011a',
+        'biblionumber' =>'0909',
+        'itemtype' => '200b',
+        'language' => '010a',
+        'publisher' => '210x',
+        'date' => '210d',
+        'note' => 
'300a,301a,302a,303a,304a,305a,306az,307a,308a,309a,310a,311a,312a,313a,314a,315a,316a,317a,318a,319a,320a,321a,322a,323a,324a,325a,326a,327a,328a,330a,332a,333a,336a,337a,345a',
+        'Koha-Auth-Number' => '6009,6019,6029,6039,6049,6059,6069,6109',
+        'subject' => '600*,601*,606*,610*',
+        'dewey' => '676a',
+        'host-item' => '995a,995c',\" where variable='NoZebraIndexes'");
+        %index = GetNoZebraIndexes();
+    } else {
+        # build a MARC21 default index file
+    }
+}
 $|=1;
 while (my ($biblionumber) = $sth->fetchrow) {
     $i++;
@@ -117,9 +138,9 @@
 my $sth = $dbh->prepare("INSERT INTO nozebra (indexname,value,biblionumbers) 
VALUES (?,?,?)");
 foreach my $key (keys %result) {
     foreach my $index (keys %{$result{$key}}) {
-        $sth->execute($key,$index,$result{$key}->{$index});
-        if (length($result{$key}->{$index}) > 40000) {
-            print length($result{$key}->{$index})."\n for $key / $index\n";
+        if (length($result{$key}->{$index}) > 1000000) {
+            print "very long index (".length($result{$key}->{$index}).")for 
$key / $index. update mySQL config file if you have an error just after this 
warning (max_paquet_size parameter)\n";
         }
+        $sth->execute($key,$index,$result{$key}->{$index});
     }
 }

Index: misc/migration_tools/22_to_30/rebuild_unimarc_100.pl
===================================================================
RCS file: 
/sources/koha/koha/misc/migration_tools/22_to_30/rebuild_unimarc_100.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- misc/migration_tools/22_to_30/rebuild_unimarc_100.pl        29 Mar 2007 
16:45:54 -0000      1.2
+++ misc/migration_tools/22_to_30/rebuild_unimarc_100.pl        4 May 2007 
16:24:09 -0000       1.3
@@ -43,7 +43,7 @@
         }
         substr($string,22,6,"frey50");
         unless ($record->subfield(100,"a")){
-            
$record->insert_fields_ordered(MARC::Field->new(100,"","","a"=>$string));
+            
$record->insert_fields_ordered(MARC::Field->new(100,"","","a"=>"$string"));
         }
 #     warn "APRES : ".$record->as_formatted;
     # delete all items related fields

Index: updater/updatedatabase
===================================================================
RCS file: /sources/koha/koha/updater/updatedatabase,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -b -r1.163 -r1.164
--- updater/updatedatabase      2 May 2007 16:44:31 -0000       1.163
+++ updater/updatedatabase      4 May 2007 16:24:09 -0000       1.164
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: updatedatabase,v 1.163 2007/05/02 16:44:31 tipaul Exp $
+# $Id: updatedatabase,v 1.164 2007/05/04 16:24:09 tipaul Exp $
 
 # Database Updater
 # This script checks for required updates to the database.
@@ -1098,7 +1098,26 @@
         {
             indexname => 'branchcode',
             content   => 'branchcode',
-    
+            type => 'PRI',
+        }
+    ],
+    branchrelations => [
+        {
+            indexname => 'PRIMARY',
+            content => 'categorycode',
+            type => 'PRI',
+        }
+    ],
+    branchrelations => [
+        {    indexname => 'PRIMARY',
+            content => 'branchcode,categorycode',
+            type => 'PRI',
+        },
+        {    indexname => 'branchcode',
+            content => 'branchcode',
+        },
+        {    indexname => 'categorycode',
+            content => 'categorycode',
         }
     ],
     currency => [
@@ -1152,6 +1171,20 @@
 #            onDelete => 'CASCADE|SET NULL|NO ACTION| RESTRICT',
 #         }
 #    ],
+    branchrelations => [
+        {    key => 'branchcode',
+            foreigntable => 'branches',
+            foreignkey => 'branchcode',
+            onUpdate => 'CASCADE',
+            onDelete => 'CASCADE',
+        },
+        {    key => 'categorycode',
+            foreigntable => 'branchcategories',
+            foreignkey => 'categorycode',
+            onUpdate => 'CASCADE',
+            onDelete => 'CASCADE',
+        },
+    ],
     shelfcontents => [
         {    key => 'shelfnumber',
             foreigntable => 'bookshelf',
@@ -2001,6 +2034,9 @@
 exit;
 
 # $Log: updatedatabase,v $
+# Revision 1.164  2007/05/04 16:24:09  tipaul
+# various bugfixes on parameters modules + adding default NoZebraIndexes 
systempreference if it's empty
+#
 # Revision 1.163  2007/05/02 16:44:31  tipaul
 # NoZebra SQL index management :
 # * adding 3 subs in Biblio.pm




reply via email to

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