Update of /cvsroot/openinteract/OpenInteract2/extra_packages/delicious_tags/OpenInteract2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4789/OpenInteract2
Modified Files:
DeliciousTag.pm DeliciousTaggableObject.pm
Log Message:
changes up to 0.05 (fairly minor, just fixes)
Index: DeliciousTag.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/extra_packages/delicious_tags/OpenInteract2/DeliciousTag.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DeliciousTag.pm 25 Oct 2004 02:29:31 -0000 1.2
--- DeliciousTag.pm 25 Nov 2004 03:14:04 -0000 1.3
***************
*** 5,11 ****
--- 5,15 ----
use strict;
use DateTime;
+ use Log::Log4perl qw( get_logger );
+ use OpenInteract2::Constants qw( :log );
@OpenInteract2::DeliciousTag::ISA = qw( OpenInteract2::DeliciousTagPersist );
+ my ( $log );
+
# this should be wrapped in a transaction...
***************
*** 95,100 ****
sub fetch_tags_with_count_for_object {
my ( $class, $object_type, $object_id ) = @_;
! my $tags = $class->fetch_tags_for_object( $object_type, $object_id );
! return $class->_fetch_counts_for_tags( $tags );
}
--- 99,110 ----
sub fetch_tags_with_count_for_object {
my ( $class, $object_type, $object_id ) = @_;
! $log ||= get_logger( LOG_APP );
! my $tags = $class->fetch_tags_for_object( $object_type, $object_id ) || [];
! $log->is_info &&
! $log->info( "For [$object_type: $object_id] got ",
! "tags: ", join( ', ', @{ $tags } ) );
! return ( scalar @{ $tags } )
! ? $class->_fetch_counts_for_tags( $tags )
! : [];
}
***************
*** 153,157 ****
sub _create_or_clause_for_tags {
my ( $class, @tags ) = @_;
! return '(' . join( ' OR ', map { 'tag = ?' } @tags ) . ')';
}
--- 163,172 ----
sub _create_or_clause_for_tags {
my ( $class, @tags ) = @_;
! $log ||= get_logger( LOG_APP );
! my $clause = '(' . join( ' OR ', map { 'tag = ?' } grep { $_ } @tags ) . ')';
! $log->is_info &&
! $log->info( "Created WHERE clause '$clause' for ",
! "tags: ",join( ', ', @tags ) );
! return $clause;
}
Index: DeliciousTaggableObject.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/extra_packages/delicious_tags/OpenInteract2/DeliciousTaggableObject.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DeliciousTaggableObject.pm 25 Nov 2004 02:25:02 -0000 1.3
--- DeliciousTaggableObject.pm 25 Nov 2004 03:14:04 -0000 1.4
***************
*** 7,10 ****
--- 7,11 ----
sub c_add_tags {
my ( $class, $object_type, $object_id, $url, $name, @tags ) = @_;
+ require OpenInteract2::DeliciousTag;
return OpenInteract2::DeliciousTag
->add_tags( $object_type, $object_id, $url, $name, @tags );
***************
*** 13,16 ****
--- 14,18 ----
sub c_fetch_my_tags {
my ( $class, $object_type, $id ) = @_;
+ require OpenInteract2::DeliciousTag;
return OpenInteract2::DeliciousTag
->fetch_tags_for_object( $object_type, $id );
***************
*** 19,22 ****
--- 21,25 ----
sub c_fetch_my_tags_with_count {
my ( $class, $object_type, $id ) = @_;
+ require OpenInteract2::DeliciousTag;
return OpenInteract2::DeliciousTag
->fetch_tags_with_count_for_object( $object_type, $id );
***************
*** 25,28 ****
--- 28,32 ----
sub c_fetch_my_related_object_info {
my ( $class, $object_type, $id, @tags ) = @_;
+ require OpenInteract2::DeliciousTag;
my $related_tags = OpenInteract2::DeliciousTag
->fetch_related_tags( $object_type, $id, @tags );
|