koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/admin branches.pl,1.1.2.6,1.1.2.7


From: Steve Tonnesen
Subject: [Koha-cvs] CVS: koha/admin branches.pl,1.1.2.6,1.1.2.7
Date: Wed, 23 Oct 2002 10:03:34 -0700

Update of /cvsroot/koha/koha/admin
In directory usw-pr-cvs1:/tmp/cvs-serv13247/admin

Modified Files:
      Tag: rel-1-2
        branches.pl 
Log Message:
Fix branches.pl admin script so that it sets the IS and CU branchrelations on
by default.


Index: branches.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/branches.pl,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -r1.1.2.6 -r1.1.2.7
*** branches.pl 27 Aug 2002 05:10:27 -0000      1.1.2.6
--- branches.pl 23 Oct 2002 17:03:31 -0000      1.1.2.7
***************
*** 175,178 ****
--- 175,192 ----
        my $sth=$dbh->prepare($query);
        $sth->execute;
+       $sth=$dbh->prepare("select categorycode from branchrelations where 
branchcode=?");
+       $sth->execute($input->param('searchfield'));
+       my $categorycodes;
+       while (my ($categorycode) = $sth->fetchrow) {
+           $categorycodes->{$categorycode}=1;
+       }
+       unless ($categorycodes->{IS}) {
+           $sth=$dbh->prepare("insert into branchrelations 
(branchcode,categorycode) values (?, 'IS')");
+           $sth->execute($input->param('searchfield'));
+       }
+       unless ($categorycodes->{CU}) {
+           $sth=$dbh->prepare("insert into branchrelations 
(branchcode,categorycode) values (?, 'CU')");
+           $sth->execute($input->param('searchfield'));
+       }
        $sth->finish;
        print "data recorded";




reply via email to

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