From: Chris W. <la...@us...> - 2004-11-27 20:47:46
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26076/lib/OpenInteract2/Manage/Website Modified Files: ThemeInstall.pm Log Message: OIN-104: if there's no request return nothing for the security scopes; also ensure that the 'install_theme' management task works properly Index: ThemeInstall.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website/ThemeInstall.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ThemeInstall.pm 13 Jun 2004 18:19:54 -0000 1.10 --- ThemeInstall.pm 27 Nov 2004 20:47:22 -0000 1.11 *************** *** 51,60 **** my $themeball = $self->param( 'theme_data' ); my $theme_meta = shift @{ $themeball }; ! my $theme_data = $self->_map_fields( $theme_meta->{theme_fields}, ! shift @{ $themeball } ); my ( $theme ); eval { $theme = CTX->lookup_object( 'theme' )->new( $theme_data ); ! $theme->save }; if ( $@ ) { --- 51,65 ---- my $themeball = $self->param( 'theme_data' ); my $theme_meta = shift @{ $themeball }; ! my $theme_data = $self->_map_fields( ! $theme_meta->{theme_fields}, shift @{ $themeball } ! ); ! ! my $default_parent = CTX->lookup_default_object_id( 'theme' ); ! $theme_data->{parent} = $default_parent; ! my ( $theme ); eval { $theme = CTX->lookup_object( 'theme' )->new( $theme_data ); ! $theme->save; }; if ( $@ ) { *************** *** 67,72 **** my $props = 0; foreach my $prop_raw ( @{ $themeball } ) { ! my $prop_data = $self->_map_fields( $theme_meta->{theme_prop_fields}, ! $prop_raw ); my $prop = $themeprop_class->new( $prop_data ); $prop->{theme_id} = $theme_id; --- 72,78 ---- my $props = 0; foreach my $prop_raw ( @{ $themeball } ) { ! my $prop_data = $self->_map_fields( ! $theme_meta->{theme_prop_fields}, $prop_raw ! ); my $prop = $themeprop_class->new( $prop_data ); $prop->{theme_id} = $theme_id; *************** *** 75,79 **** } $self->_ok( $action, ! "Theme (ID: $theme_id) and $props properties saved ok" ); return; } --- 81,85 ---- } $self->_ok( $action, ! "New theme (ID: $theme_id) and $props properties saved ok" ); return; } |