Skip to content

Instantly share code, notes, and snippets.

View ranginui's full-sized avatar

Chris Cormack ranginui

View GitHub Profile

Keybase proof

I hereby claim:

  • I am ranginui on github.
  • I am ranginui (https://keybase.io/ranginui) on keybase.
  • I have a public key whose fingerprint is 0485 F988 D1AD F2A6 F42A 3F98 6E53 F8D5 5811 8B35

To claim this, I am signing this object:

@ranginui
ranginui / gist:1562444
Created January 4, 2012 22:09
Koha::Hugs
package Koha::Hugs;
use strict;
use warnings;
use base qw(Class::Accessor);
__PACKAGE__->mk_accessors( qw(hug) );
sub new {
$DBversion = '3.03.00.xxx';
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
my $sth = $dbh->prepare("SHOW INDEX FROM items WHERE KEY_NAME = 'itemsstocknumberidx'");
$sth->execute();
if (my $index = $sth->fetchrow_hashref()){
$dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;");
}
else {
dbh->do("ALTER TABLE `items` DROP INDEX `itemstocknumberidx`;");
}
my @subfieldlist;
SUBS:
for my $sub ($tag->{subfield}){
my %rec;
$rec{$sub->{code}} = $sub->{content};
push @subfieldlist,%rec;
}
my $tagnum = sprintf "%03d",$tag->{number};
my $field = MARC::Field->new($tagnum,
$tag->{indicator1},
#!/bin/bash -x
#
# Script for use with jenkins to test Koha
make clean
source install_misc/environment_Makefile.PL || exit 1
perl Makefile.PL
# Actually build the project
make || exit 3