Bugzilla – Attachment 39439 Details for
Bug 14246
Add borrowernumber to koha_news
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed-off] Bug 14246: Add koha_news.borrowernumber and store
Signed-off-Bug-14246-Add-kohanewsborrowernumber-an.patch (text/plain), 1.96 KB, created by
Marc Véron
on 2015-05-23 10:19:49 UTC
(
hide
)
Description:
[Signed-off] Bug 14246: Add koha_news.borrowernumber and store
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-05-23 10:19:49 UTC
Size:
1.96 KB
patch
obsolete
>From 104dc80a61a504e698cfa5be736705822b9f447e Mon Sep 17 00:00:00 2001 >From: Martin Persson <xarragon@gmail.com> >Date: Thu, 21 May 2015 17:28:14 +0200 >Subject: [PATCH] [Signed-off] Bug 14246: Add koha_news.borrowernumber and > store >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch adds a new column to koha_news that links a >borrowernumber to each item. This allows Koha to display the >author for each entry which makes it suitable as a simple CMS. > >Sponsored-by: Halland County Library >Signed-off-by: Marc Véron <veron@veron.ch> >--- > installer/data/mysql/atomicupdate/add_news_author.pl | 12 ++++++++++++ > tools/koha-news.pl | 1 + > 2 files changed, 13 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/add_news_author.pl > >diff --git a/installer/data/mysql/atomicupdate/add_news_author.pl b/installer/data/mysql/atomicupdate/add_news_author.pl >new file mode 100644 >index 0000000..ce6c3dd >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/add_news_author.pl >@@ -0,0 +1,12 @@ >+#!/usr/bin/perl >+ >+use strict; >+use warnings; >+ >+use C4::Context; >+ >+my $dbh = C4::Context->dbh; >+$dbh->do("ALTER TABLE opac_news ADD borrowernumber INT(11) NULL DEFAULT NULL;"); >+$dbh->do("ALTER TABLE opac_news ADD CONSTRAINT fk_borrowernumber FOREIGN KEY (borrowernumber) REFERENCES borrowers(borrowernumber) ON DELETE SET NULL ON UPDATE SET NULL;"); >+ >+print "Upgrade done (Adding borrowernumber column and foreign key to opac_news)\n"; >diff --git a/tools/koha-news.pl b/tools/koha-news.pl >index cf1e2b4..3a6c596 100755 >--- a/tools/koha-news.pl >+++ b/tools/koha-news.pl >@@ -114,6 +114,7 @@ elsif ( $op eq 'add' ) { > timestamp => $timestamp, > number => $number, > branchcode => $branchcode, >+ borrowernumber => $borrowernumber, > } > ); > print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl"); >-- >1.7.10.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 14246
:
39361
|
39413
|
39417
|
39439
|
39521
|
39745
|
39747
|
40125
|
43714
|
43715
|
43716
|
43717
|
43718
|
43719
|
43720
|
43721
|
43722
|
43723
|
43909
|
43910
|
43911
|
43912
|
43913