From: Chris W. <la...@us...> - 2004-11-25 03:14:17
|
Update of /cvsroot/openinteract/OpenInteract2/extra_packages/delicious_tags/OpenInteract2/Observer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4789/OpenInteract2/Observer Modified Files: AddDeliciousTags.pm Log Message: changes up to 0.05 (fairly minor, just fixes) Index: AddDeliciousTags.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/extra_packages/delicious_tags/OpenInteract2/Observer/AddDeliciousTags.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AddDeliciousTags.pm 25 Nov 2004 02:24:24 -0000 1.2 --- AddDeliciousTags.pm 25 Nov 2004 03:14:04 -0000 1.3 *************** *** 14,18 **** sub update { my ( $class, $action, $observation ) = @_; ! return unless ( $observation eq 'post save' ); require OpenInteract2::DeliciousTaggableObject; --- 14,25 ---- sub update { my ( $class, $action, $observation ) = @_; ! $log ||= get_logger( LOG_APP ); ! $log->is_debug && ! $log->debug( "delicious tag observer caught: $observation" ); ! unless ( $observation =~ /^post (add|update)$/ ) { ! $log->is_debug && ! $log->debug( "Ignoring: not 'post add' or 'post update'" ); ! return; ! } require OpenInteract2::DeliciousTaggableObject; *************** *** 20,24 **** my $action_desc = join( '', '(from action/task: ', $action->name, '/', $action->task, ')' ); - $log ||= get_logger( LOG_APP ); my $object = $action->param( 'object' ) || $action->param( 'c_object' ); unless ( $object ) { --- 27,30 ---- *************** *** 33,36 **** --- 39,45 ---- return; } + my $object_desc = ref( $object ) . ': ' . $object->id; + $log->is_info && + $log->info( "Will add tags '$tag_listing' to '$object_desc'" ); my @all_tags = split /\s+/, $tag_listing; OpenInteract2::DeliciousTaggableObject::add_tags( $object, @all_tags ); *************** *** 65,69 **** =item * ! Only reacts to 'post save' observations; all others are ignored. =item * --- 74,80 ---- =item * ! Only reacts to 'post add' or 'post update' observations; all others ! are ignored. (By coincidence these are issued by the common ! actions...) =item * |