synch'ing 2.2 and head
[koha_gimpoz] / updater / updatedatabase
index fd8e587..247f1f0 100755 (executable)
@@ -12,7 +12,7 @@
 # - Would also be a good idea to offer to do a backup at this time...
 
 # NOTE:  If you do something more than once in here, make it table driven.
-
+use lib "/usr/koha200pre2/modules";
 use strict;
 
 # CPAN modules
@@ -256,7 +256,7 @@ my %requiretables = (
                                                datemodified date default NULL,
                                                origincode char(20) default NULL,
                                                PRIMARY KEY  (authid),
-                                               KEY origincode (origincode),
+                                               KEY origincode (origincode)
                                                ) ",
     auth_subfield_table => "(
                                                subfieldid bigint(20) unsigned NOT NULL auto_increment,
@@ -368,12 +368,27 @@ my %requiretables = (
                                                        PRIMARY KEY  (subscriptionid),
                                                        KEY biblionumber (biblionumber)
                                                )",
+    categorytable       => "(categorycode char(5) NOT NULL default '',
+                             description text default '',
+                             itemtypecodes text default '',
+                             PRIMARY KEY (categorycode)
+                            )",
+    subcategorytable       => "(subcategorycode char(5) NOT NULL default '',
+                             description text default '',
+                             itemtypecodes text default '',
+                             PRIMARY KEY (subcategorycode)
+                            )",
+    mediatypetable       => "(mediatypecode char(5) NOT NULL default '',
+                             description text default '',
+                             itemtypecodes text default '',
+                             PRIMARY KEY (mediatypecode)
+                            )",
 );
 
 my %requirefields = (
     biblio        => { 'abstract' => 'text' },
     deletedbiblio => { 'abstract' => 'text', 'marc' => 'blob' },
-    deleteditems => { 'marc' => 'blob', 'paidfor' => 'text' },
+    deleteditems => { 'marc' => 'blob', 'paidfor' => 'text', 'location' => 'varchar(80)'},
     biblioitems   => {
         'lccn' => 'char(25)',
         'url'  => 'varchar(255)',
@@ -535,6 +550,27 @@ my %tabledata = (
             flagdesc            => 'Update borrower charges',
             defaulton           => 0
         },
+        {
+            uniquefieldrequired => 'bit',
+            bit                 => 11,
+            flag                => 'acquisition',
+            flagdesc            => 'Acquisition and/or suggestion management',
+            defaulton           => 0
+        },
+        {
+            uniquefieldrequired => 'bit',
+            bit                 => 12,
+            flag                => 'management',
+            flagdesc            => 'Set library management parameters',
+            defaulton           => 0
+        },
+        {
+            uniquefieldrequired => 'bit',
+            bit                 => 13,
+            flag                => 'tools',
+            flagdesc            => 'Use tools (export, import, barcodes)',
+            defaulton           => 0
+        },        
     ],
     systempreferences => [
         {
@@ -732,24 +768,6 @@ my %tabledata = (
         },
         {
             uniquefieldrequired => 'variable',
-            variable            => 'ldapserver',
-           forceupdate         => { 'explanation' => 1,
-                                    'type' => 1 },
-            value               => '',
-            explanation => 'your ldap server',
-           type                => 'free'
-        },
-        {
-            uniquefieldrequired => 'variable',
-            variable            => 'ldapinfos',
-           forceupdate         => { 'explanation' => 1,
-                                    'type' => 1 },
-            value               => '',
-            explanation => 'ldap info. The ldap will be used in dn : uid=xxx, <ldapinfos>',
-           type                => 'free'
-        },
-        {
-            uniquefieldrequired => 'variable',
             variable            => 'printcirculationslips',
            forceupdate         => { 'explanation' => 1,
                                     'type' => 1 },
@@ -784,6 +802,104 @@ my %tabledata = (
             explanation => 'Set virtual shelves management ON or OFF',
            type                => 'YesNo'
         },
+        {
+            uniquefieldrequired => 'variable',
+            variable            => 'itemcallnumber',
+           forceupdate         => { 'explanation' => 1,
+                                    'type' => 1 },
+            value               => '676a',
+            explanation => 'The MARC field/subfield that is used to calculate the itemcallnumber (in UNIMARC : 676a for Dewey, 680a for Loc)',
+           type                => 'free'
+        },
+        {
+            uniquefieldrequired => 'variable',
+            variable            => 'BiblioDefaultView',
+            value               => 'normal',
+           forceupdate         => { 'explanation' => 1,
+                                    'type' => 1,
+                                    'options' => 1},
+            explanation         => 'Define the default view of a biblio. Can be either normal, marc or isbd',
+           type                => 'Choice',
+           options             => 'normal|marc|isbd'
+        },
+        {
+            uniquefieldrequired => 'variable',
+            variable            => 'opacstylesheet',
+            value               => '',
+           forceupdate         => { 'explanation' => 1,
+                                    'type' => 1},
+            explanation         => 'Enter a complete URL to use an alternate stylesheet in OPAC',
+           type                => 'free',
+        },
+        {
+            uniquefieldrequired => 'variable',
+            variable            => 'opacsmallimage',
+            value               => '',
+           forceupdate         => { 'explanation' => 1,
+                                    'type' => 1},
+            explanation         => 'Enter a complete URL to an image, will be on top/left instead of the Koha logo',
+           type                => 'free',
+        },
+        {
+            uniquefieldrequired => 'variable',
+            variable            => 'opaclargeimage',
+            value               => '',
+           forceupdate         => { 'explanation' => 1,
+                                    'type' => 1},
+            explanation         => 'Enter a complete URL to an image, will be on the main page, instead of the Koha logo',
+           type                => 'free',
+        },
+        {
+            uniquefieldrequired => 'variable',
+            variable            => 'delimiter',
+            value               => ';',
+           forceupdate         => { 'explanation' => 1,
+                                    'type' => 1},
+            explanation         => 'separator for reports exported to spreadsheet',
+           type                => 'free',
+        },
+        {
+            uniquefieldrequired => 'variable',
+            variable            => 'MIME',
+            value               => 'OPENOFFICE.ORG',
+            forceupdate                => { 'explanation' => 1,
+                                    'type' => 1,
+                                    'options' => 1},
+            explanation         => 'Define the default application for report exportations into files',
+               type            => 'Choice',
+               options         => 'EXCEL|OPENOFFICE.ORG'
+        },
+        {
+            uniquefieldrequired => 'variable',
+            variable            => 'Delimiter',
+            value               => ';',
+               forceupdate             => { 'explanation' => 1,
+                                    'type' => 1,
+                                    'options' => 1},
+            explanation         => 'Define the default separator character for report exportations into files',
+               type            => 'Choice',
+               options         => ';|tabulation|,|/|\|#'
+        },
+        {
+            uniquefieldrequired => 'variable',
+            variable            => 'SubscriptionHistory',
+            value               => ';',
+               forceupdate             => { 'explanation' => 1,
+                                    'type' => 1,
+                                    'options' => 1},
+            explanation         => 'Define the information level for serials history in OPAC',
+               type            => 'Choice',
+               options         => 'simplified|full'
+        },
+        {
+            uniquefieldrequired => 'variable',
+            variable            => 'hidelostitems',
+            value               => 'No',
+           forceupdate         => { 'explanation' => 1,
+                                    'type' => 1},
+            explanation         => 'show or hide "lost" items in OPAC.',
+           type                => 'YesNo',
+        },
     ],
 
 );
@@ -1369,6 +1485,47 @@ $sth->finish;
 exit;
 
 # $Log$
+# Revision 1.105  2005/06/20 14:36:44  tipaul
+# synch'ing 2.2 and head
+#
+# Revision 1.100.2.5  2005/06/06 15:23:36  tipaul
+# adding a systempref to choose either to show or hide "lost" items. Note that "lost items" can be related to an authorised value list, so does not necessary mean "item definetly lost". Even here, some libraries want to see lost items, and some don't want. This parameter will make everybody happy !
+#
+# Revision 1.100.2.4  2005/06/06 14:15:55  tipaul
+# adding 2 systemparameters to define an alternate image as logo in opac (the image on main page & on each top-left page)
+#
+# Revision 1.100.2.3  2005/06/02 21:05:34  hdl
+# adding variable SubscriptionHistory
+#
+# Revision 1.100.2.2  2005/03/29 15:41:43  tipaul
+# * new permissions : management & tools. You now have 2 new permissions :
+#      - management : means the user can manage library parameters, but NOT system parameters.
+#      - parameters : means the user can manage all parameters (including system parameters : marc structure, authorised values, system preferences. Was the only flag previously existing)
+#      - tools : means the user can import/export datas & edit barcodes.
+# note that for compatibility reasons, a user having "parameters" can access everything.
+# * new permission scheme. In every template new variables are available. They are written CAN_user_permission, with permission being one of the permission flag. templates can now show or hidde menu entries depending on user permissions. For example, a user with just circ permissions should have only the "circulation" button on home page. Templates are NOT updated in this version (except for system parameters, as proof of concept), they will be in the next ones. But the scheme is ready.
+#
+# Revision 1.100.2.1  2005/03/17 17:15:18  tipaul
+# defaulting opacstylesheet to '' instead of 'normal' (that is stupid)
+#
+# Revision 1.100  2004/12/10 16:11:32  tipaul
+# Improvement : adding a systempref to define default view in OPAC (either normal, MARC or ISBD). Created automatically during install or update. Check that you have a Koha >> parameters >> systempreferences >> BiblioDefaultView, Variable type : Choice, Variable options : normal|marc|isbd
+#
+# Revision 1.99  2004/12/02 17:17:00  tipaul
+# adding acquisition permission
+#
+# Revision 1.98  2004/11/26 20:26:49  tipaul
+# bugfix for auth_header creation
+#
+# Revision 1.97  2004/11/23 09:11:08  tipaul
+# adding itemcallnumber entry
+#
+# Revision 1.96  2004/11/16 13:03:45  tipaul
+# removing ldap systempref, it's now in C4/Auth_with_ldap.pm separate package
+#
+# Revision 1.95  2004/11/08 19:57:32  tipaul
+# bugfix
+#
 # Revision 1.94  2004/09/06 10:00:29  tipaul
 # adding a "location" field to the library.
 # This field is useful when the callnumber contains no information on the room where the item is stored.