From 18fc0605b073fbbd27378b7e8b1ec961843b5628 Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Fri, 16 Nov 2007 18:49:35 -0600 Subject: [PATCH] database changes for xisbn support Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- .../data/mysql/en/mandatory/sysprefs.sql | 7 +++++- installer/data/mysql/kohastructure.sql | 7 ++++++ installer/data/mysql/updatedatabase.pl | 25 +++++++++++++++++++ .../en/modules/admin/systempreferences.tmpl | 3 ++- kohaversion.pl | 2 +- 5 files changed, 41 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index d86dc5ead9..4d86ed2251 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -115,4 +115,9 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('QueryWeightFields','1','If ON, enables field weighting',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('yuipath','http://yui.yahooapis.com/2.3.1/build','Insert the path to YUI libraries',NULL,'free'); INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('canreservefromotherbranches','1','','With Independent branches on, can a user from one library reserve an item from another library','YesNo'); - +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('FRBRizeEditions',0,'','If ON, Koha will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'); +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('XISBN',0,'','Use with FRBRizeEditions. If ON, Koha will use the OCLC xISBN web service in the Editions tab on the detail pages. See: http://www.worldcat.org/affiliate/webservices/xisbn/app.jsp','YesNo'); +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'); +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('XISBNDailyLimit',499,'','The xISBN Web service is free for non-commercial use when usage does not exceed 500 requests per day','free'); +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('PINESISBN',0,'','Use with FRBRizeEditions. If ON, Koha will use PINES OISBN web service in the Editions tab on the detail pages.','YesNo'); +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('ThingISBN',0,'','Use with FRBRizeEditions. If ON, Koha will use the ThingISBN web service in the Editions tab on the detail pages.','YesNo'); diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3d3b6a2125..07049cde08 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1811,6 +1811,13 @@ CREATE TABLE `zebraqueue` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +DROP TABLE IF EXISTS `services_throttle`; +CREATE TABLE `services_throttle` ( + `service_type` varchar(10) NOT NULL default '', + `service_count` varchar(45) default NULL, + PRIMARY KEY (`service_type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 688c26214a..bbbd1351fc 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -680,6 +680,31 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.00.00.030"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do(" +CREATE TABLE services_throttle ( + service_type varchar(10) NOT NULL default '', + service_count varchar(45) default NULL, + PRIMARY KEY (service_type) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) + VALUES ('FRBRizeEditions',0,'','If ON, Koha will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) + VALUES ('XISBN',0,'','Use with FRBRizeEditions. If ON, Koha will use the OCLC xISBN web service in the Editions tab on the detail pages. See: http://www.worldcat.org/affiliate/webservices/xisbn/app.jsp','YesNo')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) + VALUES ('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) + VALUES ('XISBNDailyLimit',499,'','The xISBN Web service is free for non-commercial use when usage does not exceed 500 requests per day','free')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) + VALUES ('PINESISBN',0,'','Use with FRBRizeEditions. If ON, Koha will use PINES OISBN web service in the Editions tab on the detail pages.','YesNo')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) + VALUES ('ThingISBN',0,'','Use with FRBRizeEditions. If ON, Koha will use the ThingISBN web service in the Editions tab on the detail pages.','YesNo')"); + print "Upgrade to $DBversion done (adding services throttle table and sysprefs for xISBN)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tmpl index 76c039abc7..4c2b143c4e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tmpl @@ -187,9 +187,10 @@ Authorities Catalogue Circulation - Borrowers + Patrons OPAC OPAC Features + FRBR Staff Client Logs Other diff --git a/kohaversion.pl b/kohaversion.pl index c18be35ee2..64025c0302 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -8,7 +8,7 @@ # and is automatically called by Auth.pm when needed. sub kohaversion { - return "3.00.00.029"; + return "3.00.00.030"; } 1; -- 2.39.5