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

(-)a/installer/data/mysql/kohastructure.sql (+20 lines)
Lines 2936-2941 CREATE TABLE `quotes` ( Link Here
2936
  PRIMARY KEY (`id`)
2936
  PRIMARY KEY (`id`)
2937
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2937
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2938
2938
2939
--
2940
-- Table structure for table linktracker
2941
-- This stores clicks to external links
2942
--
2943
2944
DROP TABLE IF EXISTS linktracker;
2945
CREATE TABLE linktracker (
2946
   id int(11) NOT NULL AUTO_INCREMENT, -- primary key identifier
2947
   biblionumber int(11) DEFAULT NULL, -- biblionumber of the record the link is from
2948
   itemnumber int(11) DEFAULT NULL, -- itemnumber if applicable that the link was from
2949
   borrowernumber int(11) DEFAULT NULL, -- borrowernumber who clicked the link
2950
   url text, -- the link itself
2951
   timeclicked datetime DEFAULT NULL, -- the date and time the link was clicked
2952
   PRIMARY KEY (id),
2953
   KEY bibidx (biblionumber),
2954
   KEY itemidx (itemnumber),
2955
   KEY borridx (borrowernumber),
2956
   KEY dateidx (timeclicked)
2957
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2958
2939
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
2959
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
2940
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
2960
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
2941
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
2961
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 386-388 INSERT INTO systempreferences (variable,value,explanation,type) VALUES('OPACdidy Link Here
386
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('INTRAdidyoumean',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free');
386
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('INTRAdidyoumean',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free');
387
INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');
387
INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');
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('TrackClicks','0','Track links clicked',NULL,'Integer');
(-)a/installer/data/mysql/updatedatabase.pl (+22 lines)
Lines 6019-6024 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
6019
   SetVersion ($DBversion);
6019
   SetVersion ($DBversion);
6020
}
6020
}
6021
6021
6022
$DBversion = "XXX";
6023
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
6024
    $dbh->do("CREATE TABLE linktracker (
6025
	  id int(11) NOT NULL AUTO_INCREMENT,
6026
	  biblionumber int(11) DEFAULT NULL,
6027
	  itemnumber int(11) DEFAULT NULL,
6028
	  borrowernumber int(11) DEFAULT NULL,
6029
	  url text,
6030
	  timeclicked datetime DEFAULT NULL,
6031
	  PRIMARY KEY (id),
6032
	  KEY bibidx (biblionumber),
6033
	  KEY itemidx (itemnumber),
6034
	  KEY borridx (borrowernumber),
6035
	  KEY dateidx (timeclicked)
6036
	) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
6037
    $dbh->do("
6038
  INSERT INTO systempreferences (variable,value,explanation,options,type)
6039
  VALUES('TrackClicks','0','Track links clicked',NULL,'Integer')");
6040
    print "Upgrade to $DBversion done (Adds feature Bug 8917, the ability to track links clicked)";
6041
    SetVersion ($DBversion);
6042
}
6043
6022
=head1 FUNCTIONS
6044
=head1 FUNCTIONS
6023
6045
6024
=head2 TableExists($table)
6046
=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