Bugzilla – Attachment 7166 Details for
Bug 5668
Star ratings in the opac
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5668: Follow up - Star ratings
Bug-5668-Follow-up---Star-ratings.patch (text/plain), 3.25 KB, created by
Katrin Fischer
on 2012-01-15 22:05:54 UTC
(
hide
)
Description:
Bug 5668: Follow up - Star ratings
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2012-01-15 22:05:54 UTC
Size:
3.25 KB
patch
obsolete
>From 5ca50dec56537aa1988d2fd01db613a2ea1ee87d Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Sun, 15 Jan 2012 23:01:28 +0100 >Subject: [PATCH] Bug 5668: Follow up - Star ratings > >- adds new system preference OpacStarRatings to sysprefs.sql file > - changes NULL NULL to 'yes|no|details','Choice' >- changes updatedatabase.pl > - removes mysqlisms from the table definition > - changes INSERT to make it more robust and match sysprefs.sql >--- > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 18 +++++++++--------- > 2 files changed, 10 insertions(+), 9 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 918df5c..35f6f59 100755 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -330,3 +330,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CircAutoPrintQuickSlip', '1', 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.',NULL,'YesNo'); >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacStarRatings','0',NULL,'yes|no|details','Choice'); >\ No newline at end of file >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 1c2b9c3..631ad8c 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4621,17 +4621,17 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > $DBversion = '3.07.00.XXX'; > if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > $dbh->do( qq | >- CREATE TABLE `ratings` ( >- `borrowernumber` int(11) NOT NULL, >- `biblionumber` int(11) NOT NULL, >- `rating_value` tinyint(1) NOT NULL, >- `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, >- PRIMARY KEY (`borrowernumber`,`biblionumber`), >- KEY `ratings_borrowers_fk_1` (`borrowernumber`), >- KEY `ratings_biblionumber_fk_1` (`biblionumber`) >+ CREATE TABLE ratings ( >+ borrowernumber int(11) NOT NULL, >+ biblionumber int(11) NOT NULL, >+ rating_value tinyint(1) NOT NULL, >+ timestamp timestamp NOT NULL default CURRENT_TIMESTAMP, >+ PRIMARY KEY (borrowernumber,biblionumber), >+ KEY ratings_borrowers_fk_1 (borrowernumber), >+ KEY ratings_biblionumber_fk_1 (biblionumber) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 |); > >- $dbh->do(qq|INSERT INTO `systempreferences` VALUES ('OpacStarRatings','0',NULL,NULL,NULL)|); >+ $dbh->do(qq/INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacStarRatings','0',NULL,'yes|no|details','Choice');/); > print "Upgrade to $DBversion done (Add 'ratings' table and 'OpacStarRatings' syspref)\n"; > SetVersion($DBversion); > } >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5668
:
3034
|
3035
|
5097
|
5098
|
5136
|
5137
|
5792
|
5794
|
5833
|
7116
|
7165
|
7166
|
7215
|
7604
|
7798
|
8027
|
8199
|
8202
|
8312
|
8326
|
8359
|
8459
|
8514
|
8537
|
8548
|
8613
|
8704
|
8705
|
8706
|
9159
|
9163
|
9164