From c50cd65704e55048eb64085ea337d91c98de1cfd Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Wed, 27 Feb 2013 09:32:24 +1300 Subject: [PATCH] Bug 8917 : Fixing a bug bgkriegel spotted and removing tabs Signed-off-by: Bernardo Gonzalez Kriegel Signed-off-by: Jonathan Druart --- installer/data/mysql/updatedatabase.pl | 37 ++++++++++++++------------ opac/tracklinks.pl | 2 +- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index eb8ce80073..b28b75fbb3 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6446,24 +6446,27 @@ if ( CheckVersion($DBversion) ) { $DBversion = "3.11.00.XXX"; if ( CheckVersion($DBversion) ) { - $dbh->do("CREATE TABLE linktracker ( - id int(11) NOT NULL AUTO_INCREMENT, - biblionumber int(11) DEFAULT NULL, - itemnumber int(11) DEFAULT NULL, - borrowernumber int(11) DEFAULT NULL, - url text, - timeclicked datetime DEFAULT NULL, - PRIMARY KEY (id), - KEY bibidx (biblionumber), - KEY itemidx (itemnumber), - KEY borridx (borrowernumber), - KEY dateidx (timeclicked) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - $dbh->do(" + $dbh->do( + "CREATE TABLE linktracker ( + id int(11) NOT NULL AUTO_INCREMENT, + biblionumber int(11) DEFAULT NULL, + itemnumber int(11) DEFAULT NULL, + borrowernumber int(11) DEFAULT NULL, + url text, + timeclicked datetime DEFAULT NULL, + PRIMARY KEY (id), + KEY bibidx (biblionumber), + KEY itemidx (itemnumber), + KEY borridx (borrowernumber), + KEY dateidx (timeclicked) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8;" + ); + $dbh->do( " INSERT INTO systempreferences (variable,value,explanation,options,type) - VALUES('TrackClicks','0','Track links clicked',NULL,'Integer')"); - print "Upgrade to $DBversion done (Adds feature Bug 8917, the ability to track links clicked)"; - SetVersion ($DBversion); + VALUES('TrackClicks','0','Track links clicked',NULL,'Integer')" ); + print +"Upgrade to $DBversion done (Adds feature Bug 8917, the ability to track links clicked)"; + SetVersion($DBversion); } $DBversion = "3.11.00.024"; diff --git a/opac/tracklinks.pl b/opac/tracklinks.pl index cc1d5e3b4d..5c07cddee1 100755 --- a/opac/tracklinks.pl +++ b/opac/tracklinks.pl @@ -35,7 +35,7 @@ if ($uri) { # we have a uri and we want to track if ( $trackinglinks eq 'track' ) { my ( $user, $cookie, $sessionID, $flags ) = - checkauth( $cgi, 1, '', 'opac' ); + checkauth( $cgi, 1, {}, 'opac' ); my $userenv = C4::Context->userenv; if ( defined($userenv) -- 2.39.5