include database and input into search fields
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 25 Apr 2009 11:43:46 +0000 (11:43 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 25 Apr 2009 11:43:46 +0000 (11:43 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1156 07558da8-63fa-0310-ba24-9fe276d99e06

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) {