Bug 6966 Holds Help
[koha_gimpoz] / catalogue / showmarc.pl
index 18c1b45..bd557e9 100755 (executable)
@@ -1,13 +1,11 @@
 #!/usr/bin/perl
 
-# $Id: showmarc.pl,v 1.1.2.1 2007/06/18 21:57:23 rangi Exp $
-
-
-# Koha library project  www.koha.org
+# Koha library project  www.koha-community.org
 
 # Licensed under the GPL
 
 # Copyright 2007 Liblime
+# Parts copyright 2010 BibLibre
 #
 # This file is part of Koha.
 #
 # 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., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
+# 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.
 
 use strict;
+#use warnings; FIXME - Bug 2505
 
 # standard or CPAN modules used
 use CGI qw(:standard);
@@ -39,8 +38,6 @@ use C4::ImportBatch;
 use XML::LibXSLT;
 use XML::LibXML;
 
-my $userid = $ENV{'REMOTE_USER'};
-
 my $input       = new CGI;
 my $biblionumber = $input->param('id');
 my $importid           =       $input->param('importid');
@@ -52,7 +49,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $input,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired   => { acquisition => 1  },
+        flagsrequired   => { catalogue => 1  },
         debug           => 1,
     }
 );
@@ -70,7 +67,7 @@ if($importid) {
 if($view eq 'card') {
 $xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord;
 
-my $xslfile = C4::Context->config('intranetdir')."/koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl";
+my $xslfile = C4::Context->config('intrahtdocs')."/prog/en/xslt/compact.xsl";
 my $parser = XML::LibXML->new();
 my $xslt = XML::LibXSLT->new();
 my $source = $parser->parse_string($xmlrecord);
@@ -80,6 +77,7 @@ my $results = $stylesheet->transform($source);
 my $newxmlrecord = $stylesheet->output_string($results);
 #warn $newxmlrecord;
 print "Content-type: text/html\n\n";
+utf8::encode($newxmlrecord);
 print $newxmlrecord;
 
 } else {