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

(-)a/installer/data/mysql/kohastructure.sql (+20 lines)
Lines 2935-2940 CREATE TABLE `quotes` ( Link Here
2935
  PRIMARY KEY (`id`)
2935
  PRIMARY KEY (`id`)
2936
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2936
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2937
2937
2938
-- 
2939
-- Table structure for table linktracker
2940
-- This stores clicks to external links 
2941
-- 
2942
2943
DROP TABLE IF EXISTS linktracker;
2944
CREATE TABLE linktracker (
2945
   id int(11) NOT NULL AUTO_INCREMENT, -- primary key identifier
2946
   biblionumber int(11) DEFAULT NULL, -- biblionumber of the record the link is from
2947
   itemnumber int(11) DEFAULT NULL, -- itemnumber if applicable that the link was from
2948
   borrowernumber int(11) DEFAULT NULL, -- borrowernumber who clicked the link
2949
   url text, -- the link itself
2950
   timeclicked datetime DEFAULT NULL, -- the date and time the link was clicked 
2951
   PRIMARY KEY (id),
2952
   KEY bibidx (biblionumber),
2953
   KEY itemidx (itemnumber),
2954
   KEY borridx (borrowernumber),
2955
   KEY dateidx (timeclicked)
2956
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2957
2938
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
2958
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
2939
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
2959
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
2940
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
2960
/*!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 6011-6016 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
6011
    SetVersion ($DBversion);
6011
    SetVersion ($DBversion);
6012
}
6012
}
6013
6013
6014
$DBversion = "XXX";
6015
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
6016
    $dbh->do("CREATE TABLE linktracker (
6017
	  id int(11) NOT NULL AUTO_INCREMENT,
6018
	  biblionumber int(11) DEFAULT NULL,
6019
	  itemnumber int(11) DEFAULT NULL,
6020
	  borrowernumber int(11) DEFAULT NULL,
6021
	  url text,
6022
	  timeclicked datetime DEFAULT NULL,
6023
	  PRIMARY KEY (id),
6024
	  KEY bibidx (biblionumber),
6025
	  KEY itemidx (itemnumber),
6026
	  KEY borridx (borrowernumber),
6027
	  KEY dateidx (timeclicked)
6028
	) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
6029
    $dbh->do("
6030
  INSERT INTO systempreferences (variable,value,explanation,options,type) 
6031
  VALUES('TrackClicks','0','Track links clicked',NULL,'Integer')");
6032
    print "Upgrade to $DBversion done (Adds feature Bug 8917, the ability to track links clicked)";
6033
    SetVersion ($DBversion);
6034
}
6035
6014
=head1 FUNCTIONS
6036
=head1 FUNCTIONS
6015
6037
6016
=head2 TableExists($table)
6038
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +8 lines)
Lines 492-497 OPAC: Link Here
492
            - pref: AnonymousPatron
492
            - pref: AnonymousPatron
493
              class: integer
493
              class: integer
494
            - as the Anonymous Patron (for anonymous suggestions and reading history)
494
            - as the Anonymous Patron (for anonymous suggestions and reading history)
495
        -
496
            - pref: TrackClicks
497
              default: 0
498
              choices:
499
                  anonymous: "Track anonymously"
500
                  track: "Track"
501
                  no: "Don't track"
502
            - links that patrons click on
495
503
496
    Shelf Browser:
504
    Shelf Browser:
497
        -
505
        -
498
- 

Return to bug 8917