View | Details | Raw Unified | Return to bug 14246
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_14246-add_news_author.sql (+2 lines)
Line 0 Link Here
1
ALTER TABLE `opac_news` ADD `borrowernumber` INT(11) default NULL;
2
ALTER TABLE `opac_news` ADD CONSTRAINT `borrowernumber_fk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers`(`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL;
(-)a/installer/data/mysql/kohastructure.sql (+2 lines)
Lines 1689-1695 CREATE TABLE `opac_news` ( -- data from the news tool Link Here
1689
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- pulibcation date and time
1689
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- pulibcation date and time
1690
  `expirationdate` date default NULL, -- date the article is set to expire or no longer be visible
1690
  `expirationdate` date default NULL, -- date the article is set to expire or no longer be visible
1691
  `number` int(11) default NULL, -- the order in which this article appears in that specific location
1691
  `number` int(11) default NULL, -- the order in which this article appears in that specific location
1692
  `borrowernumber` int(11) default NULL, -- The user who created the news article
1692
  PRIMARY KEY  (`idnew`),
1693
  PRIMARY KEY  (`idnew`),
1694
  CONSTRAINT `borrowernumber_fk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL,
1693
  CONSTRAINT opac_news_branchcode_ibfk FOREIGN KEY (branchcode) REFERENCES branches (branchcode)
1695
  CONSTRAINT opac_news_branchcode_ibfk FOREIGN KEY (branchcode) REFERENCES branches (branchcode)
1694
    ON DELETE CASCADE ON UPDATE CASCADE
1696
    ON DELETE CASCADE ON UPDATE CASCADE
1695
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1697
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
(-)a/tools/koha-news.pl (-1 / +1 lines)
Lines 114-119 elsif ( $op eq 'add' ) { Link Here
114
                timestamp      => $timestamp,
114
                timestamp      => $timestamp,
115
                number         => $number,
115
                number         => $number,
116
                branchcode     => $branchcode,
116
                branchcode     => $branchcode,
117
                borrowernumber => $borrowernumber,
117
            }
118
            }
118
        );
119
        );
119
        print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
120
        print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
120
- 

Return to bug 14246