include database and input into search fields
[webpac2] / lib / WebPAC / Output / SWISH.pm
index a09112e..2eef778 100644 (file)
@@ -8,6 +8,7 @@ use lib 'lib';
 use base qw/WebPAC::Common Class::Accessor/;
 __PACKAGE__->mk_accessors(qw(
        database
+       input
        type
 
        index_path
@@ -134,7 +135,7 @@ sub add {
 
        my $database = $self->database || $log->logconfess('no database in $self');
 
-       my $uri = $self->database . "/$id";
+       my $uri = $self->database . '/' . $self->input . "/$id";
        $log->debug("creating $uri");
 
        # filter all tags which have type defined
@@ -149,6 +150,8 @@ sub add {
 
        my $xml = qq{<xml>};
 
+       $xml .= "<$_>" . $self->$_ . "</$_>" foreach ( 'database', 'input' );
+
        my $data;
 
        foreach my $tag (@tags) {