View | Details | Raw Unified | Return to bug 9000
Collapse All | Expand All

(-)a/misc/cronjobs/rss/README (-102 lines)
Lines 1-102 Link Here
1
About:
2
rss.pl is meant to provide an extensible tool for creating RSS 0.91
3
formatted files suitable for syndication.  The script relies on two
4
external files for configuration information.  Rather than trying to
5
explain how this occurs, I'll show you using the provided lastAcquired
6
files.  There are currently three rss feeds bundled in this tarball
7
(lastAcquired, longestUnseen, and mostReserved), the config files for 
8
each of these should be modified to suit your local site.  A smallish 
9
Koha image (sm-koha-icon.jpg) is included as well.
10
11
Dependencies:
12
rss.pl depends on an installed Koha system, and uses the C4::Context
13
module it provides.
14
15
Details:
16
rss.pl is meant to be run from cron (probably once a day or so -- more
17
often at larger libraries depending on the report being generated).  It 
18
is invoked like this (in the case of lastAcquired):
19
20
 rss.pl /path/to/rssKoha/lastAcquired.conf 
21
22
The basic process is that rss reads the config file
23
(lastAcquired.conf) to determine RSS header information, the SQL query
24
used to generate the results, and the HTML::Template style used to
25
format the output.  Since you'll likely to want to create your own RSS
26
content, or at least modify the ones present here, let's review the
27
config file and the template file.
28
29
A config file is divided into three sections; channel, image, and
30
config.  A section begins with the name of the section occuring alone
31
on a line, and ends with the beginning of the next section (or the end
32
of the file).  Each of these sections contains series of configuration
33
options in the form:
34
35
name=content
36
37
The content section can contain spaces, but not newlines, special
38
characters, or html mark-up.  It's also important that there are no
39
blank lines within the config file.
40
41
Here's the lastAquired.conf by way of example: 
42
43
channel
44
title=Recent Koha Acquisitions
45
link=http://www.koha-community.org
46
desc=The 15 most recent acquisitions
47
lang=en
48
lastBuild=Fri, 09 May 2003 08:00:00
49
image
50
title=Koha, the worlds best Open Source Library System
51
url=http://www.koha-community.org/images/foo.jpg
52
link=http://www.koha-community.org
53
config
54
tmpl=lastAcquired.tmpl
55
output=lastAcquired.xml
56
query=select biblioitems.isbn as isbn, biblio.title as title, biblio.author as author from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.dateaccessioned is not NULL order by items.dateaccessioned desc
57
58
59
This data (and the data acquired from the query) are then used to fill
60
in the template.  Most of the template is boilerplate and should not
61
be edited.  The section within the <TMPL_LOOP NAME=ITEMS>
62
... </TMPL_LOOP> is the part which can be modified to create your own
63
RSS content.  
64
65
Here's the lastAcquired.tmpl file:
66
67
<?xml version="1.0" encoding="UTF-8"?>
68
69
<!DOCTYPE rss PUBLIC "-//Netscape Communications/DTD RSS 0.91/EN"
70
	  "http://my.netscape.com/publish/formats/rss-0.91.dtd">
71
72
<rss version="0.91">
73
74
<channel>
75
 <title><TMPL_VAR CHANNELTITLE></title>
76
 <link><TMPL_VAR CHANNELLINK></link>
77
 <description><TMPL_VAR CHANNELDESC></description>
78
 <language><TMPL_VAR CHANNELLANG></language>
79
 <lastBuildDate><TMPL_VAR CHANNELLASTBUILD></lastBuildDate>
80
81
 <image>
82
  <title><TMPL_VAR IMAGETITLE></title>
83
  <url><TMPL_VAR IMAGEURL></url>
84
  <link><TMPL_VAR IMAGELINK></link>
85
 </image>
86
87
<TMPL_LOOP NAME=ITEMS>
88
 <item>
89
  <title><TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR></title>
90
  <link>http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn=<TMPL_VAR ISBN></link>
91
92
 </item>
93
</TMPL_LOOP>
94
95
</channel>
96
</rss>
97
98
Credits:
99
Originally written by Pat Eyler (pate@eylerfamily.org), suggestions,
100
advice, and help came from 'Content Syndication with RSS', Chris
101
Cormack, Mike Hansen, Steve Tonnesen and a variety of folks on #koha at 
102
irc.katipo.co.nz.
(-)a/misc/cronjobs/rss/lastAcquired-1.0.conf (-14 lines)
Lines 1-14 Link Here
1
channel
2
title=Recent Acquisitions
3
link=http://www.koha-community.org
4
desc=The library's 15 most recent acquisitions
5
lang=en
6
image
7
title=Koha, the worlds best Open Source Library System
8
url=http://www.koha-community.org/images/foo.jpg
9
link=http://www.koha-community.org
10
description=Koha, the worlds best Open Source Library System
11
config
12
tmpl=lastAcquired-1.0.tmpl
13
output=lastAcquired-1.0.xml
14
query=select biblio.title as title, biblio.author as author, biblio.biblionumber, biblio.notes as notes, biblioitems.place as place, biblioitems.publishercode as publishercode, biblioitems.publicationyear as publicationyear, biblioitems.pages as pages, biblioitems.illus as illus, biblioitems.size as size from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.dateaccessioned is not NULL order by items.dateaccessioned desc
(-)a/misc/cronjobs/rss/lastAcquired-1.0.tmpl (-39 lines)
Lines 1-39 Link Here
1
<?xml version="1.0"?>
2
<rdf:RDF 
3
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4
 xmlns="http://purl.org/rss/1.0/"
5
 xmlns:dc="http://purl.org/dc/elements/1.1/"
6
>
7
  <channel rdf:about="<!-- TMPL_VAR NAME="CHANNELLINK" -->">
8
	<title><!-- TMPL_VAR NAME="CHANNELTITLE" --></title>
9
	<link><!-- TMPL_VAR NAME="CHANNELLINK" --></link>
10
	<description><!-- TMPL_VAR NAME="CHANNELDESC" --></description>
11
	<language><!-- TMPL_VAR NAME="CHANNELLANG" --></language>
12
	<lastBuildDate><!-- TMPL_VAR NAME="CHANNELLASTBUILD" --></lastBuildDate>
13
	 <image rdf:about="<!-- TMPL_VAR NAME="IMAGEURL" -->">
14
	  <title><!-- TMPL_VAR NAME="IMAGETITLE" --></title>
15
	  <url><!-- TMPL_VAR NAME="IMAGEURL" --></url>
16
	  <link><!-- TMPL_VAR NAME="IMAGELINK" --></link>
17
	 </image>
18
    <items>
19
      <rdf:Seq>
20
	  <!-- TMPL_LOOP NAME="ITEMS" -->
21
        <rdf:li resource="http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"/>
22
	 <!-- /TMPL_LOOP -->
23
      </rdf:Seq>
24
    </items>
25
</channel>
26
27
  <!-- TMPL_LOOP NAME="ITEMS" -->
28
  <item rdf:about="http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
29
  <title><!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR AUTHOR --><!-- /TMPL_IF --></title>
30
  <link>http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" --></link>
31
<description><![CDATA[<!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR NAME="AUTHOR" --><!-- /TMPL_IF -->
32
<br><!-- TMPL_VAR NAME="place" --> <!-- TMPL_VAR NAME="publishercode" --> <!-- TMPL_VAR NAME="publicationyear" -->
33
<br><!-- TMPL_VAR NAME="pages" --><!-- TMPL_VAR NAME="illus" --><!-- TMPL_VAR NAME="size" -->
34
<!-- TMPL_IF NAME="notes" --><br><br><!-- TMPL_VAR NAME="notes" --><!-- /TMPL_IF --><br>
35
<a href="http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">View Details</a> | <a href="http://opac.library.org.nz/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Reserve this Item</a><!-- TMPL_IF NAME="author" --> | <a href="http://opac.library.org.nz/cgi-bin/koha/opac-search.pl?marclist=biblio.author&amp;and_or=and&amp;excluding=&amp;operator=contains&amp;value=<!-- TMPL_VAR NAME="author" -->&amp;resultsperpage=20&amp;orderby=biblio.title&amp;op=do_search">More by this Author</a><!-- /TMPL_IF -->
36
]]></description>
37
 </item>
38
<!-- /TMPL_LOOP -->
39
</rdf:RDF>
(-)a/misc/cronjobs/rss/lastAcquired-2.0.conf (-16 lines)
Lines 1-16 Link Here
1
channel
2
title=Recent Acquisitions
3
link=http://www.koha-community.org
4
desc=The library's 15 most recent acquisitions
5
lang=en
6
image
7
title=Koha, the worlds best Open Source Library System
8
url=http://www.koha-community.org/images/foo.jpg
9
link=http://www.koha-community.org
10
description=Koha, the worlds best Open Source Library System
11
width=88
12
height=31
13
config
14
tmpl=lastAcquired-2.0.tmpl
15
output=lastAcquired-2.0.xml
16
query=select biblio.title as title, biblio.author as author, biblio.biblionumber, biblio.notes as notes, biblioitems.place as place, biblioitems.publishercode as publishercode, biblioitems.publicationyear as publicationyear, biblioitems.pages as pages, biblioitems.illus as illus, biblioitems.size as size from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.dateaccessioned is not NULL order by items.dateaccessioned desc
(-)a/misc/cronjobs/rss/lastAcquired-2.0.tmpl (-34 lines)
Lines 1-34 Link Here
1
<?xml version="1.0"?>
2
<rss version="2.0">
3
	<channel>
4
		<title><!-- TMPL_VAR NAME="CHANNELTITLE" --></title>
5
		<link><!-- TMPL_VAR NAME="CHANNELLINK" --></link>
6
		<description><!-- TMPL_VAR NAME="CHANNELDESC" --></description>
7
		<language><!-- TMPL_VAR NAME="CHANNELLANG" --></language>
8
		<lastBuildDate><!-- TMPL_VAR NAME="CHANNELLASTBUILD" --></lastBuildDate>
9
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
10
		<generator>Koha</generator>
11
		<image>
12
			<title><!-- TMPL_VAR NAME="IMAGETITLE" --></title>
13
			<url><!-- TMPL_VAR NAME="IMAGEURL" --></url>
14
			<link><!-- TMPL_VAR NAME="IMAGELINK" --></link>
15
			<width><!-- TMPL_VAR NAME="IMAGEWIDTH" --></width>
16
			<height><!-- TMPL_VAR NAME="IMAGEHEIGHT" --></height>
17
			<description><!-- TMPL_VAR NAME="IMAGEDESCRIPTION" --></description>
18
		</image>
19
20
<!-- TMPL_LOOP NAME="ITEMS" -->
21
 <item>
22
  <title><!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR NAME="AUTHOR" --><!-- /TMPL_IF --></title>
23
  <link>http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" --></link>
24
<description><![CDATA[<!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR NAME="AUTHOR" --><!-- /TMPL_IF -->
25
<br><!-- TMPL_IF NAME="publishercode" --><!-- TMPL_VAR NAME="place" --> <!-- TMPL_VAR NAME="publishercode" --> <!-- TMPL_VAR NAME="publicationyear" --><br><!-- /TMPL_IF -->
26
<!-- TMPL_IF NAME="pages" --><!-- TMPL_VAR NAME="pages" --><!-- TMPL_VAR NAME="illus" --><!-- TMPL_VAR NAME="size" --><!-- /TMPL_IF -->
27
<!-- TMPL_IF NAME="notes" --><p><!-- TMPL_VAR NAME="notes" --></p><!-- /TMPL_IF --><br>
28
<a href="http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">View Details</a> | <a href="http://opac.library.org.nz/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Reserve this Item</a><!-- TMPL_IF NAME="author" --> | <a href="http://opac.library.org.nz/cgi-bin/koha/opac-search.pl?marclist=biblio.author&amp;and_or=and&amp;excluding=&amp;operator=contains&amp;value=<!-- TMPL_VAR NAME="author" -->&amp;resultsperpage=20&amp;orderby=biblio.title&amp;op=do_search">More by this Author</a><!-- /TMPL_IF -->
29
]]></description>
30
 </item>
31
<!-- /TMPL_LOOP -->
32
33
</channel>
34
</rss>
(-)a/misc/cronjobs/rss/lastAcquired.conf (-15 lines)
Lines 1-15 Link Here
1
channel
2
title=Recent Koha Acquisitions
3
link=http://www.koha-community.org
4
desc=The 15 most recent acquisitions
5
lang=en
6
lastBuild=Fri, 09 May 2003 08:00:00
7
image
8
title=Koha, the world's best Open Source Library System
9
url=http://www.koha-community.org/images/foo.jpg
10
link=http://www.koha-community.org
11
config
12
tmpl=lastAcquired.tmpl
13
output=lastAcquired.xml
14
query=select biblio.title as title, biblio.author as author, biblio.biblionumber from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.dateaccessioned is not NULL order by items.dateaccessioned desc
15
(-)a/misc/cronjobs/rss/lastAcquired.tmpl (-30 lines)
Lines 1-30 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
<!DOCTYPE rss PUBLIC "-//Netscape Communications/DTD RSS 0.91/EN"
4
	  "http://my.netscape.com/publish/formats/rss-0.91.dtd">
5
6
<rss version="0.91">
7
8
<channel>
9
 <title><TMPL_VAR CHANNELTITLE></title>
10
 <link><TMPL_VAR CHANNELLINK></link>
11
 <description><TMPL_VAR CHANNELDESC></description>
12
 <language><TMPL_VAR CHANNELLANG></language>
13
 <lastBuildDate><TMPL_VAR CHANNELLASTBUILD></lastBuildDate>
14
15
 <image>
16
  <title><TMPL_VAR IMAGETITLE></title>
17
  <url><TMPL_VAR IMAGEURL></url>
18
  <link><TMPL_VAR IMAGELINK></link>
19
 </image>
20
21
<TMPL_LOOP NAME=ITEMS>
22
 <item>
23
  <title><TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR></title>
24
  <link>http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<TMPL_VAR NAME="biblionumber"></link>
25
26
 </item>
27
</TMPL_LOOP>
28
29
</channel>
30
</rss>
(-)a/misc/cronjobs/rss/longestUnseen.conf (-14 lines)
Lines 1-14 Link Here
1
channel
2
title=Longest Unseen Koha Items
3
link=http://www.koha-community.org
4
desc=The 15 least recently seen items
5
lang=en
6
image
7
title=Koha, the worlds best Open Source Library System
8
url=http://www.koha-community.org/images/foo.jpg
9
link=http://www.koha-community.org
10
config
11
tmpl=longestUnseen.tmpl
12
output=longestUnseen.xml
13
query=select biblioitems.isbn as isbn, biblio.title as title, biblio.author as author from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.datelastseen is not NULL and items.datelastseen != items.datelastborrowed order by items.datelastseen
14
(-)a/misc/cronjobs/rss/longestUnseen.tmpl (-30 lines)
Lines 1-30 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
<!DOCTYPE rss PUBLIC "-//Netscape Communications/DTD RSS 0.91/EN"
4
	  "http://my.netscape.com/publish/formats/rss-0.91.dtd">
5
6
<rss version="0.91">
7
8
<channel>
9
 <title><TMPL_VAR CHANNELTITLE></title>
10
 <link><TMPL_VAR CHANNELLINK></link>
11
 <description><TMPL_VAR CHANNELDESC></description>
12
 <language><TMPL_VAR CHANNELLANG></language>
13
 <lastBuildDate><TMPL_VAR CHANNELLASTBUILD></lastBuildDate>
14
15
 <image>
16
  <title><TMPL_VAR IMAGETITLE></title>
17
  <url><TMPL_VAR IMAGEURL></url>
18
  <link><TMPL_VAR IMAGELINK></link>
19
 </image>
20
21
<TMPL_LOOP NAME=ITEMS>
22
 <item>
23
  <title><TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR></title>
24
  <link>http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn=<TMPL_VAR ISBN></link>
25
26
 </item>
27
</TMPL_LOOP>
28
29
</channel>
30
</rss>
(-)a/misc/cronjobs/rss/mostReserved.conf (-14 lines)
Lines 1-14 Link Here
1
channel
2
title=Most Reserved Items
3
link=http://www.koha-community.org
4
desc=The 15 most reserved items
5
lang=en
6
image
7
title=Koha, the worlds best Open Source Library System
8
url=http://www.koha-community.org/images/foo.jpg
9
link=http://www.koha-community.org
10
config
11
tmpl=mostReserved.tmpl
12
output=mostReserved.xml
13
query=select biblioitems.isbn as isbn, biblio.title as title, biblio.author as author from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.reserves is not NULL order by items.reserves desc
14
(-)a/misc/cronjobs/rss/mostReserved.tmpl (-30 lines)
Lines 1-30 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
<!DOCTYPE rss PUBLIC "-//Netscape Communications/DTD RSS 0.91/EN"
4
	  "http://my.netscape.com/publish/formats/rss-0.91.dtd">
5
6
<rss version="0.91">
7
8
<channel>
9
 <title><TMPL_VAR CHANNELTITLE></title>
10
 <link><TMPL_VAR CHANNELLINK></link>
11
 <description><TMPL_VAR CHANNELDESC></description>
12
 <language><TMPL_VAR CHANNELLANG></language>
13
 <lastBuildDate><TMPL_VAR CHANNELLASTBUILD></lastBuildDate>
14
15
 <image>
16
  <title><TMPL_VAR IMAGETITLE></title>
17
  <url><TMPL_VAR IMAGEURL></url>
18
  <link><TMPL_VAR IMAGELINK></link>
19
 </image>
20
21
<TMPL_LOOP NAME=ITEMS>
22
 <item>
23
  <title><TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR></title>
24
  <link>http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn=<TMPL_VAR ISBN></link>
25
26
 </item>
27
</TMPL_LOOP>
28
29
</channel>
30
</rss>
(-)a/misc/cronjobs/rss/rss.pl (-112 lines)
Lines 1-112 Link Here
1
#!/usr/bin/perl
2
3
# This script can be used to generate rss 0.91 files for syndication.
4
5
# it should be run from cron like:
6
#
7
#    rss.pl config.conf
8
#
9
10
# Copyright 2003 Katipo Communications
11
#
12
# This file is part of Koha.
13
#
14
# Koha is free software; you can redistribute it and/or modify it under the
15
# terms of the GNU General Public License as published by the Free Software
16
# Foundation; either version 2 of the License, or (at your option) any later
17
# version.
18
#
19
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
20
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
21
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
22
#
23
# You should have received a copy of the GNU General Public License along
24
# with Koha; if not, write to the Free Software Foundation, Inc.,
25
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26
27
use strict;
28
use warnings;
29
30
use HTML::Template::Pro;
31
use C4::Context;
32
use Time::Local;
33
use POSIX;
34
35
my $dbh     = C4::Context->dbh;
36
my $file    = $ARGV[0];
37
my %config  = getConf("config");
38
my $outFile = $config{"output"};
39
my $feed    = HTML::Template::Pro->new( filename => $config{"tmpl"} );
40
41
my %channel = getConf("channel");
42
$feed->param( CHANNELTITLE     => $channel{'title'} );
43
$feed->param( CHANNELLINK      => $channel{'link'} );
44
$feed->param( CHANNELDESC      => $channel{'desc'} );
45
$feed->param( CHANNELLANG      => $channel{'lang'} );
46
$feed->param( CHANNELLASTBUILD => getDate() );
47
48
my %image = getConf("image");
49
$feed->param( IMAGETITLE       => $image{'title'} );
50
$feed->param( IMAGEURL         => $image{'url'} );
51
$feed->param( IMAGELINK        => $image{'link'} );
52
$feed->param( IMAGEDESCRIPTION => $image{'description'} );
53
$feed->param( IMAGEWIDTH       => $image{'width'} );
54
$feed->param( IMAGEHEIGHT      => $image{'height'} );
55
56
#
57
# handle the items
58
#
59
$feed->param( ITEMS => getItems( $config{'query'} ) );
60
61
open( FILE, ">$outFile" ) or die "can't open $outFile";
62
print FILE $feed->output();
63
close FILE;
64
65
sub getDate {
66
67
    #    my $date = localtime(timelocal(localtime));
68
    my $date = strftime( "%a, %d %b %Y %T %Z", localtime );
69
    return $date;
70
}
71
72
sub getConf {
73
    my $section = shift;
74
    my %return;
75
    my $inSection = 0;
76
77
    open( FILE, $file ) or die "can't open $file";
78
    while (<FILE>) {
79
        if ($inSection) {
80
            my @line = split( /=/, $_, 2 );
81
            unless ( $line[1] ) {
82
                $inSection = 0;
83
            } else {
84
                my ( $key, $value ) = @line;
85
                chomp $value;
86
                $return{$key} = $value;
87
            }
88
        } else {
89
            if ( $_ eq "$section\n" ) { $inSection = 1 }
90
        }
91
    }
92
    close FILE;
93
    return %return;
94
}
95
96
sub getItems {
97
    my $query = shift;
98
    $query .= " limit 15";
99
    my $sth = $dbh->prepare($query);
100
    $sth->execute;
101
    my @return;
102
    while ( my $data = $sth->fetchrow_hashref ) {
103
        foreach my $key ( keys %$data ) {
104
            my $value = $data->{$key};
105
            $value = '' unless defined $value;
106
            $value =~ s/\&/\&amp;/g and $data->{$key} = $value;
107
        }
108
        push @return, $data;
109
    }
110
    $sth->finish;
111
    return \@return;
112
}

Return to bug 9000