|
From: Chris W. <la...@us...> - 2001-10-24 23:08:04
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_page/OpenInteract/Handler
In directory usw-pr-cvs1:/tmp/cvs-serv22705/OpenInteract/Handler
Modified Files:
Page.pm
Log Message:
more updates (stability! functionality!)
Index: Page.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_page/OpenInteract/Handler/Page.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Page.pm 2001/10/24 20:55:37 1.3
--- Page.pm 2001/10/24 23:04:14 1.4
***************
*** 9,18 ****
use SPOPS::Secure qw( :level );
! @OpenInteract::Handler::BasePage::ISA = qw( OpenInteract::CommonHandler SPOPS::Secure );
! $OpenInteract::Handler::BasePage::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
! $OpenInteract::Handler::BasePage::author = 'ch...@cw...';
! $OpenInteract::Handler::BasePage::default_method = 'show';
! @OpenInteract::Handler::BasePage::forbidden_methods = ();
! %OpenInteract::Handler::BasePage::security = (
DEFAULT_SECURITY_KEY() => SEC_LEVEL_WRITE,
show => SEC_LEVEL_NONE, notify => SEC_LEVEL_READ,
--- 9,18 ----
use SPOPS::Secure qw( :level );
! @OpenInteract::Handler::Page::ISA = qw( OpenInteract::CommonHandler SPOPS::Secure );
! $OpenInteract::Handler::Page::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
! $OpenInteract::Handler::Page::author = 'ch...@cw...';
! $OpenInteract::Handler::Page::default_method = 'show';
! @OpenInteract::Handler::Page::forbidden_methods = ();
! %OpenInteract::Handler::Page::security = (
DEFAULT_SECURITY_KEY() => SEC_LEVEL_WRITE,
show => SEC_LEVEL_NONE, notify => SEC_LEVEL_READ,
***************
*** 41,45 ****
sub MY_EDIT_DISPLAY_TASK { return 'show' }
sub MY_EDIT_FIELDS { return qw( location title author keywords
! boxes main_template notes ) }
sub MY_EDIT_FIELDS_TOGGLED { return qw( is_active is_file template_parse ) }
sub MY_EDIT_FIELDS_DATE { return qw( active_on expires_on ) }
--- 41,45 ----
sub MY_EDIT_DISPLAY_TASK { return 'show' }
sub MY_EDIT_FIELDS { return qw( location title author keywords
! boxes main_template notes content ) }
sub MY_EDIT_FIELDS_TOGGLED { return qw( is_active is_file template_parse ) }
sub MY_EDIT_FIELDS_DATE { return qw( active_on expires_on ) }
***************
*** 97,101 ****
$R->{page}{title} = 'Document Listing';
return $R->template->handler( {}, $params,
! { name => 'page::page_directory_list' } );
}
--- 97,101 ----
$R->{page}{title} = 'Document Listing';
return $R->template->handler( {}, $params,
! { name => 'base_page::page_directory_list' } );
}
***************
*** 191,198 ****
$page->{is_file} ||= 'yes' if ( $page->CONFIG->{default_storage} eq 'file' );
$params->{page} = $page;
! $text_params = { name => 'page::page_form' };
$R->{page}{title} = 'Edit a Document';
}
else {
unless ( $class->_is_active( $page ) ) {
$R->DEBUG && $R->scrib( 1, "Page is not currently active; return error" );
--- 191,199 ----
$page->{is_file} ||= 'yes' if ( $page->CONFIG->{default_storage} eq 'file' );
$params->{page} = $page;
! $text_params = { name => 'base_page::page_form' };
$R->{page}{title} = 'Edit a Document';
}
else {
+ $R->DEBUG && $R->scrib( 1, "Display ($page->{location}) as normal HTML" );
unless ( $class->_is_active( $page ) ) {
$R->DEBUG && $R->scrib( 1, "Page is not currently active; return error" );
***************
*** 212,216 ****
# _split_pages() for more info
! $text_params = $class->_split_pages( $page );
$class->_add_object_boxes( $page, $p );
}
--- 213,217 ----
# _split_pages() for more info
! $text_params = { text => $class->_split_pages( $page ) };
$class->_add_object_boxes( $page, $p );
}
***************
*** 225,229 ****
! sub _is_page_displayable {
my ( $class, $page ) = @_;
return 1 unless ( $page->{mime_type} );
--- 226,230 ----
! sub _is_displayable {
my ( $class, $page ) = @_;
return 1 unless ( $page->{mime_type} );
***************
*** 307,311 ****
$error_type = SPOPS::Error->get->{type};
}
! return $page if ( $page );
}
return undef unless ( $error_type );
--- 308,315 ----
$error_type = SPOPS::Error->get->{type};
}
! if ( $page ) {
! $R->DEBUG && $R->scrib( 1, "Found matching location: ($page->{location})" );
! return $page;
! }
}
return undef unless ( $error_type );
***************
*** 341,347 ****
</font></p>
PCOUNT
! return { text => $this_page };
}
! return { text => $page->{content} };
}
--- 345,351 ----
</font></p>
PCOUNT
! return \$this_page;
}
! return \$page->{content};
}
|