Bug 11876 [Follow-up] Add a diff view to staged MARC Records
[koha.git] / opac / opac-tags.pl
index 3cf1f53..6c402a5 100755 (executable)
@@ -58,7 +58,7 @@ sub ajax_auth_cgi {     # returns CGI object
        my $needed_flags = shift;
        my %cookies = fetch CGI::Cookie;
        my $input = CGI->new;
-       my $sessid = $cookies{'CGISESSID'}->value || $input->param('CGISESSID');
+    my $sessid = $cookies{'CGISESSID'}->value;
        my ($auth_status, $auth_sessid) = check_cookie_auth($sessid, $needed_flags);
        $debug and
        print STDERR "($auth_status, $auth_sessid) = check_cookie_auth($sessid," . Dumper($needed_flags) . ")\n";
@@ -109,11 +109,11 @@ if ($is_ajax) {
        $debug and print STDERR "op: $loggedinuser\n";
 } else {
        ($template, $loggedinuser, $cookie) = get_template_and_user({
-               template_name   => "opac-tags.tmpl",
-               query           => $query,
-               type            => "opac",
-               authnotrequired => ($add_op ? 0 : 1),   # auth required to add tags
-               debug           => 1,
+        template_name   => "opac-tags.tt",
+        query           => $query,
+        type            => "opac",
+        authnotrequired => ($add_op ? 0 : 1), # auth required to add tags
+        debug           => 1,
        });
 }
 
@@ -228,8 +228,10 @@ if ($loggedinuser) {
        $my_tags = get_tag_rows({borrowernumber=>$loggedinuser});
        foreach (@$my_tags) {
                my $biblio = GetBiblioData($_->{biblionumber});
-               $_->{bib_summary} = $biblio->{title}; 
-               ($biblio->{author}) and $_->{bib_summary} .= " by " . $biblio->{author};
+        my $record = &GetMarcBiblio( $_->{biblionumber} );
+        $_->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $_->{biblionumber} ) );
+        $_->{title} = $biblio->{title};
+        $_->{author} = $biblio->{author};
                my $date = $_->{date_created} || '';
                $date =~ /\s+(\d{2}\:\d{2}\:\d{2})/;
                $_->{time_created_display} = $1;