[Koha-cvs] koha/updater updatedatabase [rel_3_0]
Antoine Farnault
antoine at koha-fr.org
Mon Nov 20 17:59:10 CET 2006
CVSROOT: /sources/koha
Module name: koha
Branch: rel_3_0
Changes by: Antoine Farnault <toins> 06/11/20 16:59:09
Modified files:
updater : updatedatabase
Log message:
adding a userflags: 'editauthorities'.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/updater/updatedatabase?cvsroot=koha&only_with_tag=rel_3_0&r1=1.157.2.21&r2=1.157.2.22
Patches:
Index: updatedatabase
===================================================================
RCS file: /sources/koha/koha/updater/updatedatabase,v
retrieving revision 1.157.2.21
retrieving revision 1.157.2.22
diff -u -b -r1.157.2.21 -r1.157.2.22
--- updatedatabase 17 Nov 2006 10:53:04 -0000 1.157.2.21
+++ updatedatabase 20 Nov 2006 16:59:09 -0000 1.157.2.22
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: updatedatabase,v 1.157.2.21 2006/11/17 10:53:04 hdl Exp $
+# $Id: updatedatabase,v 1.157.2.22 2006/11/20 16:59:09 toins Exp $
# Database Updater
# This script checks for required updates to the database.
@@ -355,7 +355,15 @@
type => 'Free',
},
],
-
+ userflags => [
+ {
+ uniquefieldrequired => 'bit',
+ bit => '14',
+ flag => 'editauthorities',
+ flagdesc => 'allow to edit authorities',
+ defaulton => '0',
+ },
+ ],
);
my %fielddefinitions = (
@@ -1560,6 +1568,7 @@
print "\n" unless $silent;
$fieldlist =~ s/,$//;
$placeholders =~ s/,$//;
+ print "insert into $table ($fieldlist) values ($placeholders)";
my $sth =
$dbh->prepare(
"insert into $table ($fieldlist) values ($placeholders)");
@@ -1689,8 +1698,8 @@
while ( ( $column, $type, $null, $key, $default, $extra ) = $sth->fetchrow ){
$marcdone=1 if ($type eq 'longtext' && $column eq 'marcxml') ;
}
-#unless ($marcdone) {
-unless (1) { # to disable this block just to test.
+unless ($marcdone) {
+#unless (1) { # to disable this block just to test.
print "moving MARC record to biblioitems table\n";
# changing marc field type
$dbh->do('ALTER TABLE `biblioitems` CHANGE `marc` `marc` BLOB NULL DEFAULT NULL ');
@@ -1936,6 +1945,9 @@
exit;
# $Log: updatedatabase,v $
+# Revision 1.157.2.22 2006/11/20 16:59:09 toins
+# adding a userflags: 'editauthorities'.
+#
# Revision 1.157.2.21 2006/11/17 10:53:04 hdl
# Changing
# - subscription detail :
More information about the Koha-cvs
mailing list