diff --git a/C4/Members.pm b/C4/Members.pm index a0769ca025..a878a9cdfe 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -62,7 +62,6 @@ BEGIN { &GetPendingIssues &GetAllIssues - &get_institutions &getzipnamecity &getidcity @@ -122,7 +121,6 @@ BEGIN { push @EXPORT, qw( &AddMember &AddMember_Opac - &add_member_orgs &MoveMemberToDeleted &ExtendMemberSubscriptionTo ); @@ -1668,51 +1666,6 @@ sub GetAge{ return $age; } # sub get_age -=head2 get_institutions - - $insitutions = get_institutions(); - -Just returns a list of all the borrowers of type I, borrownumber and name - -=cut - -#' -sub get_institutions { - my $dbh = C4::Context->dbh(); - my $sth = - $dbh->prepare( -"SELECT borrowernumber,surname FROM borrowers WHERE categorycode=? ORDER BY surname" - ); - $sth->execute('I'); - my %orgs; - while ( my $data = $sth->fetchrow_hashref() ) { - $orgs{ $data->{'borrowernumber'} } = $data; - } - return ( \%orgs ); - -} # sub get_institutions - -=head2 add_member_orgs - - add_member_orgs($borrowernumber,$borrowernumbers); - -Takes a borrowernumber and a list of other borrowernumbers and inserts them into the borrowers_to_borrowers table - -=cut - -#' -sub add_member_orgs { - my ( $borrowernumber, $otherborrowers ) = @_; - my $dbh = C4::Context->dbh(); - my $query = - "INSERT INTO borrowers_to_borrowers (borrower1,borrower2) VALUES (?,?)"; - my $sth = $dbh->prepare($query); - foreach my $otherborrowernumber (@$otherborrowers) { - $sth->execute( $borrowernumber, $otherborrowernumber ); - } - -} # sub add_member_orgs - =head2 GetCities $cityarrayref = GetCities(); diff --git a/circ/circulation.pl b/circ/circulation.pl index 8af776f18e..cdc40e38f5 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -133,7 +133,6 @@ my $stickyduedate = $query->param('stickyduedate') || $session->param('stickydu my $duedatespec = $query->param('duedatespec') || $session->param('stickyduedate'); my $issueconfirmed = $query->param('issueconfirmed'); my $cancelreserve = $query->param('cancelreserve'); -my $organisation = $query->param('organisations'); my $print = $query->param('print') || q{}; my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice my $charges = $query->param('charges') || q{}; @@ -658,25 +657,6 @@ if ( $borrower->{'category_type'} eq 'C') { $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1; } -my $CGIorganisations; -my $member_of_institution; -if ( C4::Context->preference("memberofinstitution") ) { - my $organisations = get_institutions(); - my @orgs; - my %org_labels; - foreach my $organisation ( keys %$organisations ) { - push @orgs, $organisation; - $org_labels{$organisation} = $organisations->{$organisation}->{'surname'}; - } - $member_of_institution = 1; - $CGIorganisations = CGI::popup_menu( - -id => 'organisations', - -name => 'organisations', - -labels => \%org_labels, - -values => \@orgs, - ); -} - my $lib_messages_loop = GetMessages( $borrowernumber, 'L', $branch ); if($lib_messages_loop){ $template->param(flagged => 1 ); } @@ -747,8 +727,6 @@ $template->param( relprevissues => \@relprevissues, displayrelissues => $displayrelissues, inprocess => $inprocess, - memberofinstution => $member_of_institution, - CGIorganisations => $CGIorganisations, is_child => ($borrower->{'category_type'} eq 'C'), circview => 1, soundon => C4::Context->preference("SoundOn"), diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 66c2017186..661910b3f2 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -182,7 +182,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('maxoutstanding','5','','maximum amount withstanding to be able make holds','Integer'), ('maxRecordsForFacets','20',NULL,NULL,'Integer'), ('maxreserves','50','','Define maximum number of holds a patron can place','Integer'), -('memberofinstitution','0',NULL,'If ON, patrons can be linked to institutions','YesNo'), ('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'), ('NewItemsDefaultLocation','','','If set, all new items will have a location of the given Location Code ( Authorized Value type LOC )',''), ('noissuescharge','5','','Define maximum amount withstanding before check outs are blocked','Integer'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 0768a88f23..c74ccb0622 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8036,6 +8036,14 @@ if(CheckVersion($DBversion)) { print "Upgrade to $DBversion done (Bug 3445: Add indexes to action_logs table)\n"; SetVersion($DBversion); } +$DBversion = "3.15.00.XXX"; +if (CheckVersion($DBversion)) { + $dbh->do(q| + DELETE FROM systempreferences WHERE variable= "memberofinstitution" + |); + print "Upgrade to $DBversion done (Bug 11751: Remove memberofinstitytion system preference)\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref index 74d14af677..41d6392d77 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -79,12 +79,6 @@ Patrons: class: currency - '[% local_currency %].' - Empty value means no limit. Single item caps are specified in the circulation rules matrix. - - - - pref: memberofinstitution - choices: - yes: Do - no: "Don't" - - allow patrons to be linked to institutions (which must be set up as Institution patrons). - - Login passwords for staff and patrons must be at least - pref: minPasswordLength diff --git a/members/memberentry.pl b/members/memberentry.pl index 429768af82..a25e3dedb6 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -400,11 +400,6 @@ if ((!$nok) and $nodouble and ($op eq 'insert' or $op eq 'save')){ } } - if ($data{'organisations'}){ - # need to add the members organisations - my @orgs=split(/\|/,$data{'organisations'}); - add_member_orgs($borrowernumber,\@orgs); - } if (C4::Context->preference('ExtendedPatronAttributes') and $input->param('setting_extended_patron_attributes')) { C4::Members::Attributes::SetBorrowerAttributes($borrowernumber, $extended_patron_attributes); } @@ -619,28 +614,6 @@ if($no_categories){ $template->param(no_categories => 1); } $template->param(no_add => $no_add); -my $CGIorganisations; -my $member_of_institution; -if (C4::Context->preference("memberofinstitution")){ - my $organisations=get_institutions(); - my @orgs; - my %org_labels; - foreach my $organisation (keys %$organisations) { - push @orgs,$organisation; - $org_labels{$organisation}=$organisations->{$organisation}->{'surname'}; - } - $member_of_institution=1; - - $CGIorganisations = CGI::scrolling_list( -id => 'organisations', - -name => 'organisations', - -labels => \%org_labels, - -values => \@orgs, - -size => 5, - -multiple => 'true' - - ); -} - # -------------------------------------------------------------------------------------------------------- my $CGIsort = buildCGIsort("Bsort1","sort1",$data{'sort1'}); @@ -728,8 +701,6 @@ $template->param( category_type =>$category_type, modify => $modify, nok => $nok,#flag to konw if an error - memberofinstution => $member_of_institution, - CGIorganisations => $CGIorganisations, NoUpdateLogin => $NoUpdateLogin );