[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.5.2.6,1.5.2.7
From: |
Alan Millar |
Subject: |
[Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.5.2.6,1.5.2.7 |
Date: |
Wed, 29 May 2002 08:08:51 -0700 |
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv29472
Modified Files:
Tag: rel-1-2
Acquisitions.pm
Log Message:
Web site maintenance
Index: Acquisitions.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Acquisitions.pm,v
retrieving revision 1.5.2.6
retrieving revision 1.5.2.7
diff -C2 -r1.5.2.6 -r1.5.2.7
*** Acquisitions.pm 29 May 2002 15:06:16 -0000 1.5.2.6
--- Acquisitions.pm 29 May 2002 15:08:49 -0000 1.5.2.7
***************
*** 20,24 ****
&updatecost &checkitems &modnote &getitemtypes &getbiblio
&getbiblioitem &getitemsbybiblioitem &isbnsearch &keywordsearch
! &websitesearch);
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
--- 20,24 ----
&updatecost &checkitems &modnote &getitemtypes &getbiblio
&getbiblioitem &getitemsbybiblioitem &isbnsearch &keywordsearch
! &websitesearch &addwebsite &updatewebsite &deletewebsite);
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
***************
*** 1326,1329 ****
--- 1326,1383 ----
return($count, @results);
} # sub websitesearch
+
+
+ sub addwebsite {
+ my ($website) = @_;
+ my $dbh = C4Connect;
+ my $query;
+
+ $website->{'biblionumber'} = $dbh->quote($website->{'biblionumber'});
+ $website->{'title'} = $dbh->quote($website->{'title'});
+ $website->{'description'} = $dbh->quote($website->{'description'});
+ $website->{'url'} = $dbh->quote($website->{'url'});
+
+ $query = "Insert into websites set
+ biblionumber = $website->{'biblionumber'},
+ title = $website->{'title'},
+ description = $website->{'description'},
+ url = $website->{'url'}";
+
+ $dbh->do($query);
+
+ $dbh->disconnect;
+ } # sub website
+
+
+ sub updatewebsite {
+ my ($website) = @_;
+ my $dbh = C4Connect;
+ my $query;
+
+ $website->{'title'} = $dbh->quote($website->{'title'});
+ $website->{'description'} = $dbh->quote($website->{'description'});
+ $website->{'url'} = $dbh->quote($website->{'url'});
+
+ $query = "Update websites set
+ title = $website->{'title'},
+ description = $website->{'description'},
+ url = $website->{'url'}
+ where websitenumber = $website->{'websitenumber'}";
+
+ $dbh->do($query);
+
+ $dbh->disconnect;
+ } # sub updatewebsite
+
+
+ sub deletewebsite {
+ my ($websitenumber) = @_;
+ my $dbh = C4Connect;
+ my $query = "Delete from websites where websitenumber = $websitenumber";
+
+ $dbh->do($query);
+
+ $dbh->disconnect;
+ } # sub deletewebsite
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.5.2.6,1.5.2.7,
Alan Millar <=