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

(-)a/installer/data/mysql/kohastructure.sql (+19 lines)
Lines 2977-2982 CREATE TABLE borrower_attribute_types_branches( -- association table between bor Link Here
2977
    FOREIGN KEY (b_branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
2977
    FOREIGN KEY (b_branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
2978
) ENGINE=INNODB DEFAULT CHARSET=utf8;
2978
) ENGINE=INNODB DEFAULT CHARSET=utf8;
2979
2979
2980
--
2981
-- Table structure for table linktracker
2982
-- This stores clicks to external links
2983
--
2984
2985
DROP TABLE IF EXISTS linktracker;
2986
CREATE TABLE linktracker (
2987
   id int(11) NOT NULL AUTO_INCREMENT, -- primary key identifier
2988
   biblionumber int(11) DEFAULT NULL, -- biblionumber of the record the link is from
2989
   itemnumber int(11) DEFAULT NULL, -- itemnumber if applicable that the link was from
2990
   borrowernumber int(11) DEFAULT NULL, -- borrowernumber who clicked the link
2991
   url text, -- the link itself
2992
   timeclicked datetime DEFAULT NULL, -- the date and time the link was clicked
2993
   PRIMARY KEY (id),
2994
   KEY bibidx (biblionumber),
2995
   KEY itemidx (itemnumber),
2996
   KEY borridx (borrowernumber),
2997
   KEY dateidx (timeclicked)
2998
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2980
2999
2981
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
3000
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
2982
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
3001
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 388-390 INSERT INTO systempreferences (variable, value, options, explanation, type) VALU Link Here
388
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
388
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
389
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('alphabet','A B C D E F G H I J K L M N O P Q R S T U V W X Y Z','Alphabet than can be expanded into browse links, e.g. on Home > Patrons',NULL,'free');
389
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('alphabet','A B C D E F G H I J K L M N O P Q R S T U V W X Y Z','Alphabet than can be expanded into browse links, e.g. on Home > Patrons',NULL,'free');
390
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RefundLostItemFeeOnReturn', '1', 'If enabled, the lost item fee charged to a borrower will be refunded when the lost item is returned.', NULL, 'YesNo');
390
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RefundLostItemFeeOnReturn', '1', 'If enabled, the lost item fee charged to a borrower will be refunded when the lost item is returned.', NULL, 'YesNo');
391
INSERT INTO systempreferences (variable,value,explanation,options,type)  VALUES('TrackClicks','0','Track links clicked',NULL,'Integer');
392
(-)a/installer/data/mysql/updatedatabase.pl (+22 lines)
Lines 6181-6186 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
6181
    SetVersion ($DBversion);
6181
    SetVersion ($DBversion);
6182
}
6182
}
6183
6183
6184
$DBversion = "3.11.00.XXX";
6185
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
6186
    $dbh->do("CREATE TABLE linktracker (
6187
	  id int(11) NOT NULL AUTO_INCREMENT,
6188
	  biblionumber int(11) DEFAULT NULL,
6189
	  itemnumber int(11) DEFAULT NULL,
6190
	  borrowernumber int(11) DEFAULT NULL,
6191
	  url text,
6192
	  timeclicked datetime DEFAULT NULL,
6193
	  PRIMARY KEY (id),
6194
	  KEY bibidx (biblionumber),
6195
	  KEY itemidx (itemnumber),
6196
	  KEY borridx (borrowernumber),
6197
	  KEY dateidx (timeclicked)
6198
	) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
6199
    $dbh->do("
6200
  INSERT INTO systempreferences (variable,value,explanation,options,type)
6201
  VALUES('TrackClicks','0','Track links clicked',NULL,'Integer')");
6202
    print "Upgrade to $DBversion done (Adds feature Bug 8917, the ability to track links clicked)";
6203
    SetVersion ($DBversion);
6204
}
6205
6184
=head1 FUNCTIONS
6206
=head1 FUNCTIONS
6185
6207
6186
=head2 TableExists($table)
6208
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +8 lines)
Lines 498-503 OPAC: Link Here
498
            - pref: AnonymousPatron
498
            - pref: AnonymousPatron
499
              class: integer
499
              class: integer
500
            - as the Anonymous Patron (for anonymous suggestions and reading history)
500
            - as the Anonymous Patron (for anonymous suggestions and reading history)
501
        -
502
            - pref: TrackClicks
503
              default: 0
504
              choices:
505
                  anonymous: "Track anonymously"
506
                  track: "Track"
507
                  no: "Don't track"
508
            - links that patrons click on
501
509
502
    Shelf Browser:
510
    Shelf Browser:
503
        -
511
        -
504
- 

Return to bug 8917