Bug 22534: (RM follow-up) Remove errant hidden file
[srvgit] / members / housebound.pl
index 0e52085..0584685 100755 (executable)
@@ -4,18 +4,18 @@
 #
 # This file is part of Koha.
 #
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 3 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
 #
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 =head1 housebound.pl
 
@@ -28,7 +28,6 @@ use Modern::Perl;
 use CGI;
 use C4::Auth;
 use C4::Context;
-use C4::Members::Attributes qw(GetBorrowerAttributes);
 use C4::Output;
 use DateTime;
 use Koha::DateUtils;
@@ -57,14 +56,13 @@ my $visit_id = $input->param('visit_id') // q{};
 
 # Get patron
 my $borrowernumber = $input->param('borrowernumber');
-my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
+my $logged_in_user = Koha::Patrons->find( $loggedinuser );
 my $patron = Koha::Patrons->find($borrowernumber);
 output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
 
 # Get supporting cast
-my ( $branch, $category, $houseboundprofile, $visit );
+my ( $houseboundprofile, $visit );
 if ( $patron ) { # FIXME This test is not needed - output_and_exit_if_error handles it
-    $category = Koha::Patron::Categories->new->find($patron->categorycode);
     $houseboundprofile = $patron->housebound_profile;
 }
 if ( $visit_id ) {
@@ -158,16 +156,6 @@ $method = 'update_or_create' if ( !$houseboundprofile );
 # Ensure template has all patron details.
 $template->param( patron => $patron );
 
-# Load extended patron attributes if necessary (taken from members/files.pl).
-if ( C4::Context->preference('ExtendedPatronAttributes') and $patron ) {
-    my $attributes = GetBorrowerAttributes($patron->borrowernumber);
-    $template->param(
-        ExtendedPatronAttributes => 1,
-        extendedattributes => $attributes
-    );
-}
-
-$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' || $category->category_type eq 'I' );
 $template->param(
     housebound_profile => $houseboundprofile,
     visit              => $houseboundvisit,