Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8511/lib/OpenInteract2
Modified Files:
SPOPS.pm
Log Message:
OIN-154: fix OI2::URL calls; add debugging
Index: SPOPS.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/SPOPS.pm,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** SPOPS.pm 17 Mar 2005 20:30:44 -0000 1.30
--- SPOPS.pm 18 Mar 2005 03:34:27 -0000 1.31
***************
*** 26,32 ****
--- 26,36 ----
sub object_description {
my ( $self ) = @_;
+ $log ||= get_logger( LOG_SPOPS );
+
my $config = $self->CONFIG;
my $object_type = $config->{object_name};
my $title_info = $config->{title} || $config->{name};
+ $log->is_debug &&
+ $log->debug( "Describing SPOPS object '$object_type' '$title_info'" );
my $title = '';
if ( exists $self->{ $title_info } ) {
***************
*** 41,46 ****
my $oid = $self->id;
my $id_field = $self->id_field;
my ( $url, $url_edit );
! my $inf = $config->{display};
my @url_param_values = ();
if ( $inf->{URL_PARAMS} ) {
--- 45,51 ----
my $oid = $self->id;
my $id_field = $self->id_field;
+ $log->is_debug && $log->debug( "Describe: '$oid' '$id_field'" );
my ( $url, $url_edit );
! my $inf = $config->{display} || {};
my @url_param_values = ();
if ( $inf->{URL_PARAMS} ) {
***************
*** 52,69 ****
if ( $inf->{ACTION} ) {
if ( $inf->{TASK} and @url_param_values ) {
! $url = $u->create( $inf->{ACTION}, $inf->{TASK},
! { URL_PARAMS => \@url_param_values } );
}
elsif ( $inf->{TASK} ) {
! $url = $u->create( $inf->{ACTION}, $inf->{TASK},
! { $id_field => $oid } );
}
if ( $inf->{TASK_EDIT} and @url_param_values ) {
! $url_edit = $u->create( $inf->{ACTION}, $inf->{TASK_EDIT},
! { URL_PARAMS => \@url_param_values } );
}
elsif ( $inf->{TASK_EDIT} ) {
! $url_edit = $u->create( $inf->{ACTION}, $inf->{TASK_EDIT},
! { $id_field => $oid } );
}
--- 57,82 ----
if ( $inf->{ACTION} ) {
if ( $inf->{TASK} and @url_param_values ) {
! $url = $u->create_from_action(
! $inf->{ACTION}, $inf->{TASK},
! { URL_PARAMS => \@url_param_values }
! );
}
elsif ( $inf->{TASK} ) {
! $url = $u->create_from_action(
! $inf->{ACTION}, $inf->{TASK},
! { $id_field => $oid }
! );
}
if ( $inf->{TASK_EDIT} and @url_param_values ) {
! $url_edit = $u->create_from_action(
! $inf->{ACTION}, $inf->{TASK_EDIT},
! { URL_PARAMS => \@url_param_values }
! );
}
elsif ( $inf->{TASK_EDIT} ) {
! $url_edit = $u->create_from_action(
! $inf->{ACTION}, $inf->{TASK_EDIT},
! { $id_field => $oid }
! );
}
***************
*** 84,92 ****
$object_date = $self->$date_field();
}
return {
class => ref $self,
object_id => $oid,
- security => $self->{tmp_security_level},
oid => $oid, # backwards compatibility
id_field => $id_field,
name => $object_type,
--- 97,107 ----
$object_date = $self->$date_field();
}
+ $log->is_debug &&
+ $log->debug( "Describe: '$url', '$url_edit', '$object_date'" );
return {
class => ref $self,
object_id => $oid,
oid => $oid, # backwards compatibility
+ security => $self->{tmp_security_level},
id_field => $id_field,
name => $object_type,
|