[interchange-cvs] interchange - racke modified lib/Vend/Swish2.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Wed Jun 28 10:59:46 EDT 2006
User: racke
Date: 2006-06-28 14:59:46 GMT
Modified: lib/Vend Swish2.pm
Log:
date_format is now configurable
Revision Changes Path
1.9 +5 -3 interchange/lib/Vend/Swish2.pm
rev 1.9, prev_rev 1.8
Index: Swish2.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Swish2.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Swish2.pm 28 Jun 2006 12:07:24 -0000 1.8
+++ Swish2.pm 28 Jun 2006 14:59:46 -0000 1.9
@@ -1,6 +1,6 @@
# Vend::Swish2 - Search indexes with Swish-e's new SWISH::API
#
-# $Id: Swish2.pm,v 1.8 2006/06/28 12:07:24 racke Exp $
+# $Id: Swish2.pm,v 1.9 2006/06/28 14:59:46 racke Exp $
#
# Adapted from Vend::Swish by Brian Miller <brian at endpoint.com>
#
@@ -26,7 +26,7 @@
require Vend::Search;
@ISA = qw(Vend::Search);
-$VERSION = substr(q$Revision: 1.8 $, 10);
+$VERSION = substr(q$Revision: 1.9 $, 10);
use strict;
use SWISH::API;
@@ -226,6 +226,8 @@
}
my @out;
+ my $date_format = $Vend::Cfg->{Swish2}->{date_format} || '%Y-%m-%d %H:%M:%S';
+
while (my $result = $results->NextResult) {
my $out_ref = [];
foreach my $field (@{ $s->{'mv_field_names'} }) {
@@ -242,7 +244,7 @@
push @$out_ref, $text;
}
elsif ($field eq 'mod_date') {
- push @$out_ref, POSIX::strftime('%Y-%m-%d %H:%M:%S', localtime($result->Property( $fmap{$field} )));
+ push @$out_ref, POSIX::strftime($date_format, localtime($result->Property( $fmap{$field} )));
}
else {
push @$out_ref, $result->Property( $fmap{$field} );
More information about the interchange-cvs
mailing list