Merge branch 'patroncards-wip' of git://git.foundations.edu/koha into community
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 20 Jan 2010 22:16:34 +0000 (23:16 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 20 Jan 2010 22:16:34 +0000 (23:16 +0100)
Conflicts solved:
Makefile.PL
installer/data/mysql/en/mandatory/sysprefs.sql
installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
installer/data/mysql/updatedatabase.pl
kohaversion.pl

1  2 
C4/Acquisition.pm
C4/Search.pm
Makefile.PL
admin/systempreferences.pl
installer/data/mysql/en/mandatory/sysprefs.sql
installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tmpl
kohaversion.pl

Simple merge
diff --cc C4/Search.pm
Simple merge
diff --cc Makefile.PL
@@@ -261,8 -261,7 +261,7 @@@ my $target_map = 
    './errors'                    => {target => 'INTRANET_CGI_DIR'},
    './koha-tmpl/intranet-tmpl'   => {target => 'INTRANET_TMPL_DIR', trimdir => -1},
    './koha-tmpl/opac-tmpl'       => {target => 'OPAC_TMPL_DIR', trimdir => -1},
-   './koha-tmpl/robots.txt'      => {target => 'OPAC_WWW_DIR', trimdir => -1},
 -  './kohaversion.pl'            => 'INTRANET_CGI_DIR',
 +  './kohaversion.pl'            => 'INTRANET_CGI_DIR', 
    './labels'                    => 'INTRANET_CGI_DIR',
    './mainpage.pl'               => 'INTRANET_CGI_DIR',
    './Makefile.PL'               => 'NONE',
Simple merge
@@@ -272,5 -271,7 +272,9 @@@ INSERT INTO systempreferences (variable
  INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowAllMessageDeletion','0','Allow any Library to delete any message','','YesNo');
  INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('ShowPatronImageInWebBasedSelfCheck', '0', 'If ON, displays patron image when a patron uses web-based self-checkout', '', 'YesNo');
  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('EnableOpacSearchHistory', '1', 'Enable or disable opac search history', 'YesNo','');
 +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('RoutingListAddReserves','1','If ON the patrons on routing lists are automatically added to holds on the issue.','','YesNo');
 +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ( 'OpacAddMastheadLibraryPulldown', '0', '', 'Adds a pulldown menu to select the library to search on the opac masthead.', 'YesNo' );
+ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACPatronDetails','1','If OFF the patron details tab in the OPAC is disabled.','','YesNo');
+ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFinesTab','1','If OFF the patron fines tab in the OPAC is disabled.','','YesNo');
+ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('RoutingListAddReserves','1','If ON the patrons on routing lists are automatically added to holds on the issue.','','YesNo');
+ INSERT INTO systempreferences VALUES ('ImageLimit',5,'','Limit images stored in the database by the Patron Card image manager to this number.','Integer');
@@@ -274,4 -273,6 +274,8 @@@ INSERT INTO `systempreferences` (variab
  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacSerialDefaultTab', 'serialcollection', 'Ce paramètre définit l''onglet par défaut pour l''affichage des périodiques dans l''OPAC.', 'holdings|serialcollection|subscriptions', 'Choice');
  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('RoutingListAddReserves','1','Si activé, des reservations sont automatiquement créées pour chaque lecteur de la liste de circulation d''un numéro de périodique','','YesNo');
  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SpecifyDueDate',1,'Autorise ou non le bibliothécaire à spécifier la date de retour dans le module circulation','','YesNo');
 -
 +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ( 'OpacAddMastheadLibraryPulldown', '0', '', 'Adds a pulldown menu to select the library to search on the opac masthead.', 'YesNo' );
+ INSERT INTO  systempreferences VALUES ('ImageLimit',5,'','Limiter le nombre d''images stockées en base pour la photo Lecteur à cette taille.','Integer');
++INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACPatronDetails','1','Si désactivé, l''affichage détaillé des données adhérents est désactivé à l''OPAC.','','YesNo');
++INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFinesTab','1','Si désactivé, l''onglet Amende est désactivé à l''OPAC.','','YesNo');
@@@ -2756,10 -2756,10 +2756,10 @@@ if (C4::Context->preference("Version") 
  
  $DBversion = "3.01.00.068";
  if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
-       $dbh->do("ALTER TABLE issuingrules ADD 
+       $dbh->do("ALTER TABLE issuingrules ADD
                        COLUMN `finedays` int(11) default NULL AFTER `fine`,
 -                      COLUMN `renewalsallowed` smallint(6) default NULL,
 -                      COLUMN `reservesallowed` smallint(6) default NULL,
 +                      ADD COLUMN `renewalsallowed` smallint(6) default NULL, 
 +                      ADD COLUMN `reservesallowed` smallint(6) default NULL;
                        ");
        my $sth = $dbh->prepare("SELECT itemtype, renewalsallowed FROM itemtypes");
      $sth->execute();
@@@ -3298,87 -3291,14 +3298,95 @@@ if (C4::Context->preference("Version") 
      SetVersion ($DBversion);
  }
  
 -$DBversion = '3.01.00.101';
 +$DBversion = "3.01.00.101";
 +if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
 +      $dbh->do(
 +        "INSERT INTO systempreferences 
 +           (variable, value, options, explanation, type)
 +         VALUES (
 +            'OverdueNoticeBcc', '', '', 
 +            'Email address to Bcc outgoing notices sent by email',
 +            'free')
 +         ");
 +      print "Upgrade to $DBversion done (added OverdueNoticeBcc system preferences)\n";
 +    SetVersion ($DBversion);
 +}
 +$DBversion = "3.01.00.102";
 +if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
 +      $dbh->do("INSERT INTO permissions (module_bit, code, description) VALUES (9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)')");
 +      print "Upgrade done (fixed spelling error in edit_catalogue permission)\n";
 +    SetVersion ($DBversion);
 +}
 +
 +$DBversion = "3.01.00.103";
 +if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
 +      $dbh->do("INSERT INTO permissions (module_bit, code, description) VALUES (13, 'moderate_tags', 'Moderate patron tags')");
 +      print "Upgrade done (adding patron permissions for tags tool)\n";
 +    SetVersion ($DBversion);
 +}
 +
 +$DBversion = "3.01.00.104";
 +if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
 +
 +    my ($maninv_count, $borrnotes_count);
 +    eval { $maninv_count = $dbh->do("SELECT 1 FROM authorised_values WHERE category='MANUAL_INV'"); };
 +    if ($maninv_count == 0) {
 +        $dbh->do("INSERT INTO authorised_values (category,authorised_value,lib) VALUES ('MANUAL_INV','Copier Fees','.25')");
 +    }
 +    eval { $borrnotes_count = $dbh->do("SELECT 1 FROM authorised_values WHERE category='BOR_NOTES'"); };
 +    if ($borrnotes_count == 0) {
 +        $dbh->do("INSERT INTO authorised_values (category,authorised_value,lib) VALUES ('BOR_NOTES','ADDR','Address Notes')");
 +    }
 +    
 +    $dbh->do("INSERT INTO authorised_values (category,authorised_value,lib) VALUES ('LOC','CART','Book Cart')");
 +    $dbh->do("INSERT INTO authorised_values (category,authorised_value,lib) VALUES ('LOC','PROC','Processing Center')");
 +
 +      print "Upgrade to $DBversion done ( add defaults to authorized values for MANUAL_INV and BOR_NOTES and add new default LOC authorized values for shelf to cart processing )\n";
 +      SetVersion ($DBversion);
 +}
 +
 +
 +$DBversion = "3.01.00.105";
 +if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
 +    $dbh->do("
 +      CREATE TABLE `collections` (
 +        `colId` int(11) NOT NULL auto_increment,
 +        `colTitle` varchar(100) NOT NULL default '',
 +        `colDesc` text NOT NULL,
 +        `colBranchcode` varchar(4) default NULL COMMENT 'branchcode for branch where item should be held.',
 +        PRIMARY KEY  (`colId`)
 +      ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 +    ");
 +       
 +    $dbh->do("
 +      CREATE TABLE `collections_tracking` (
 +        `ctId` int(11) NOT NULL auto_increment,
 +        `colId` int(11) NOT NULL default '0' COMMENT 'collections.colId',
 +        `itemnumber` int(11) NOT NULL default '0' COMMENT 'items.itemnumber',
 +        PRIMARY KEY  (`ctId`)
 +      ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 +    ");
 +    $dbh->do("
 +        INSERT INTO permissions (module_bit, code, description) 
 +        VALUES ( 13, 'rotating_collections', 'Manage Rotating collections')" );
 +      print "Upgrade to $DBversion done (added collection and collection_tracking tables for rotataing collection functionnality)\n";
 +    SetVersion ($DBversion);
 +}
 +$DBversion = "3.01.00.106";
 +if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
 +      $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ( 'OpacAddMastheadLibraryPulldown', '0', '', 'Adds a pulldown menu to select the library to search on the opac masthead.', 'YesNo' )");
 +      print "Upgrade done (added OpacAddMastheadLibraryPulldown system preferences)\n";
 +    SetVersion ($DBversion);
 +}
 +
++$DBversion = '3.01.00.107';
+ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+     my $upgrade_script = C4::Context->config("intranetdir") . "/installer/data/mysql/patroncards_upgrade.pl";
+     system("perl $upgrade_script");
+     print "Upgrade to $DBversion done (Migrated labels and patroncards tables and data to new schema.)\n";
+     SetVersion ($DBversion);
+ }
  =item DropAllForeignKeys($table)
  
    Drop all foreign keys of the table $table
@@@ -18,9 -18,9 +18,9 @@@
      <dt><a href="/cgi-bin/koha/tools/koha-news.pl">News</a></dt>
      <dd>Write news for the OPAC and staff interfaces</dd>
      <!-- /TMPL_IF -->
-       
      <!-- TMPL_IF NAME="CAN_user_tools_label_creator" -->
 -    <dt><a href="/cgi-bin/koha/labels/label-home.pl">Label Creator</a></dt>
 +    <dt><a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a></dt>
      <dd>Create printable labels and barcodes from catalog data</dd>
      <!-- /TMPL_IF -->
  
diff --cc kohaversion.pl
@@@ -10,7 -10,7 +10,7 @@@
  use strict;
  
  sub kohaversion {
-     our $VERSION = '3.01.00.106';
 -    our $VERSION = '3.01.00.101';
++    our $VERSION = '3.01.00.107';
      # version needs to be set this way
      # so that it can be picked up by Makefile.PL
      # during install