You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(381) |
Nov
(176) |
Dec
(310) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(334) |
Feb
(96) |
Mar
(149) |
Apr
(214) |
May
(120) |
Jun
(56) |
Jul
(10) |
Aug
(273) |
Sep
(182) |
Oct
(56) |
Nov
(125) |
Dec
(22) |
2003 |
Jan
(63) |
Feb
(181) |
Mar
(498) |
Apr
(433) |
May
(39) |
Jun
(512) |
Jul
(276) |
Aug
(156) |
Sep
(101) |
Oct
(66) |
Nov
(24) |
Dec
(161) |
2004 |
Jan
(1) |
Feb
(377) |
Mar
(68) |
Apr
(26) |
May
(107) |
Jun
(333) |
Jul
(13) |
Aug
|
Sep
(76) |
Oct
(88) |
Nov
(170) |
Dec
(91) |
2005 |
Jan
(52) |
Feb
(239) |
Mar
(402) |
Apr
(15) |
May
(2) |
Jun
(1) |
Jul
(13) |
Aug
|
Sep
(71) |
Oct
(34) |
Nov
|
Dec
|
2006 |
Jan
(5) |
Feb
(5) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(7) |
Oct
(2) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Chris W. <la...@us...> - 2005-03-14 02:13:02
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_box In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8531 Modified Files: package.ini Changes Log Message: update the URL for the error browser Index: package.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/package.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** package.ini 1 Mar 2005 03:28:33 -0000 1.2 --- package.ini 14 Mar 2005 02:12:48 -0000 1.3 *************** *** 1,5 **** [package] name = base_box ! version = 2.19 author = Chris Winters <ch...@cw...> url = http://www.openinteract.org/ --- 1,5 ---- [package] name = base_box ! version = 2.20 author = Chris Winters <ch...@cw...> url = http://www.openinteract.org/ Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/Changes,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Changes 1 Mar 2005 03:28:33 -0000 1.20 --- Changes 14 Mar 2005 02:12:48 -0000 1.21 *************** *** 1,4 **** --- 1,8 ---- Revision history for OpenInteract package base_box. + 2.20 Sun Mar 13 21:09:20 EST 2005 + + Modify url for error browser. + 2.19 Mon Feb 28 20:33:57 EST 2005 |
From: Chris W. <la...@us...> - 2005-03-14 02:12:59
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_box/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8531/template Modified Files: admin_tools_box.tmpl Log Message: update the URL for the error browser Index: admin_tools_box.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/template/admin_tools_box.tmpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** admin_tools_box.tmpl 16 Feb 2004 21:57:04 -0000 1.6 --- admin_tools_box.tmpl 14 Mar 2005 02:12:47 -0000 1.7 *************** *** 1,25 **** [%- DEFAULT theme = OI.theme_properties; ! error_url = OI.make_url( ACTION = 'error' ); ! group_list_url = OI.make_url( ACTION = 'group', ! TASK = 'list' ); ! group_new_url = OI.make_url( ACTION = 'group', ! TASK = 'display_add' ); lookup_url = OI.make_url( ACTION = 'lookups' ); activity_url = OI.make_url( ACTION = 'objectactivity' ); ! page_url = OI.make_url( ACTION = 'page', ! TASK = 'actions' ); security_url = OI.make_url( ACTION = 'security' ); tmpl_list_url = OI.make_url( ACTION = 'template' ); ! tmpl_new_url = OI.make_url( ACTION = 'template', ! TASK = 'display_add'); ! docs_url = OI.make_url( ACTION = 'systemdoc', ! TASK = 'list' ); ! theme_list_url = OI.make_url( ACTION = 'theme', ! TASK = 'list' ); ! theme_new_url = OI.make_url( ACTION = 'theme', ! TASK = 'display_add' ); user_search_url= OI.make_url( ACTION = 'user' ); ! user_new_url = OI.make_url( ACTION = 'user', ! TASK = 'display_add' ); -%] [% theme.bullet %] [% MSG( 'admin_tools_box.label.error_browser', error_url ) %]<br> --- 1,17 ---- [%- DEFAULT theme = OI.theme_properties; ! error_url = OI.make_url( ACTION = 'error_browser' ); ! group_list_url = OI.make_url( ACTION = 'group', TASK = 'list' ); ! group_new_url = OI.make_url( ACTION = 'group', TASK = 'display_add' ); lookup_url = OI.make_url( ACTION = 'lookups' ); activity_url = OI.make_url( ACTION = 'objectactivity' ); ! page_url = OI.make_url( ACTION = 'page', TASK = 'actions' ); security_url = OI.make_url( ACTION = 'security' ); tmpl_list_url = OI.make_url( ACTION = 'template' ); ! tmpl_new_url = OI.make_url( ACTION = 'template', TASK = 'display_add'); ! docs_url = OI.make_url( ACTION = 'systemdoc', TASK = 'list' ); ! theme_list_url = OI.make_url( ACTION = 'theme', TASK = 'list' ); ! theme_new_url = OI.make_url( ACTION = 'theme', TASK = 'display_add' ); user_search_url= OI.make_url( ACTION = 'user' ); ! user_new_url = OI.make_url( ACTION = 'user', TASK = 'display_add' ); -%] [% theme.bullet %] [% MSG( 'admin_tools_box.label.error_browser', error_url ) %]<br> |
From: Chris W. <la...@us...> - 2005-03-13 18:39:40
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Setup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15804/Setup Modified Files: ReadLocalizedMessages.pm Log Message: OIN-143: files returned from get_message_files() are already fully-qualified Index: ReadLocalizedMessages.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Setup/ReadLocalizedMessages.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ReadLocalizedMessages.pm 2 Feb 2005 13:06:02 -0000 1.2 --- ReadLocalizedMessages.pm 13 Mar 2005 18:39:19 -0000 1.3 *************** *** 36,42 **** $log->debug( "Got message files from package $package_id: ", join( ', ', @{ $filenames } ) ); ! my @full_filenames = map { catfile( $package_dir, $_ ) } ! @{ $filenames }; ! $i18n_init->add_message_files( @full_filenames ); } my $classes = $i18n_init->run; --- 36,40 ---- $log->debug( "Got message files from package $package_id: ", join( ', ', @{ $filenames } ) ); ! $i18n_init->add_message_files( @{ $filenames } ); } my $classes = $i18n_init->run; |
From: Chris W. <la...@us...> - 2005-03-13 18:38:35
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15527/Manage/Website Modified Files: InstallPackage.pm Log Message: OIN-72: put off initializing the context until after we've instantiated our app class; otherwise we might instantiate the old one Index: InstallPackage.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website/InstallPackage.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** InstallPackage.pm 9 Mar 2005 20:26:24 -0000 1.17 --- InstallPackage.pm 13 Mar 2005 18:38:22 -0000 1.18 *************** *** 56,63 **** } ! sub setup_task { ! my ( $self ) = @_; ! $self->_setup_context( { skip => 'initialize temp lib' } ); ! } --- 56,60 ---- } ! sub setup_task {} *************** *** 67,71 **** my ( $self ) = @_; my %status = ( ! action => 'install package', ); if ( my $package_file = $self->param( 'package_file' ) ) { --- 64,68 ---- my ( $self ) = @_; my %status = ( ! action => 'install package', ); if ( my $package_file = $self->param( 'package_file' ) ) { *************** *** 85,88 **** --- 82,88 ---- package_file => $package_file }); + + $self->_setup_context(); + my $is_installed = $self->_check_package_exists( $package->name, $package->version, $status ); *************** *** 133,136 **** --- 133,140 ---- my $name = $app->name; my $version = $app->version; + + # put this off so we don't load older versions... + $self->_setup_context(); + my $is_installed = $self->_check_package_exists( $name, $version, $status ); |
From: Chris W. <la...@us...> - 2005-03-13 18:37:25
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/I18N In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15212/I18N Modified Files: Initializer.pm Log Message: OIN-143: add some tracing to reading gettext messages Index: Initializer.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/I18N/Initializer.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Initializer.pm 12 Mar 2005 18:37:18 -0000 1.12 --- Initializer.pm 13 Mar 2005 18:37:14 -0000 1.13 *************** *** 133,136 **** --- 133,138 ---- "localization files. Please install it."; } + $log->is_info && + $log->info( "Required Locale::Maketext::Lexicon::Gettext ok" ); } } *************** *** 205,211 **** open( GETTEXT, '<', $gettext_file ) || oi_error "Failed to open gettext file: $!"; ! my @content = <GETTEXT>; close( GETTEXT ); ! my $msg = Locale::Maketext::Lexicon::Gettext->parse( @content ); return %{ $msg } } --- 207,218 ---- open( GETTEXT, '<', $gettext_file ) || oi_error "Failed to open gettext file: $!"; ! my $msg = Locale::Maketext::Lexicon::Gettext->parse( <GETTEXT> ); close( GETTEXT ); ! if ( $log->is_debug ) { ! $log->debug( "Read following messages from '$gettext_file': " ); ! while ( my ( $key, $value ) = each %{ $msg } ) { ! $log->debug( " '$key' = '$value'" ); ! } ! } return %{ $msg } } |
From: Chris W. <la...@us...> - 2005-03-13 18:36:36
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14918 Modified Files: Package.pm Log Message: be sure to return a full path to the message files (as stated in docs) Index: Package.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Package.pm,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** Package.pm 12 Mar 2005 18:37:18 -0000 1.53 --- Package.pm 13 Mar 2005 18:36:24 -0000 1.54 *************** *** 293,302 **** unless ( scalar @{ $base_files } ) { my $files = $self->get_files; ! $base_files = [ grep { m!^msg/.*\.(mo|po|msg)$! } @{ $files } ]; } my $dir = $self->directory; my @full_message_files = map { catfile( $dir, $_ ) } @{ $base_files }; $self->_check_file_validity( \@full_message_files ); ! return $base_files; } --- 293,302 ---- unless ( scalar @{ $base_files } ) { my $files = $self->get_files; ! $base_files = [ grep /^msg\/.*\.(mo|po|msg)$/, @{ $files } ]; } my $dir = $self->directory; my @full_message_files = map { catfile( $dir, $_ ) } @{ $base_files }; $self->_check_file_validity( \@full_message_files ); ! return \@full_message_files; } *************** *** 1701,1705 **** L<OpenInteract2::Config::Package|OpenInteract2::Config::Package>), or this routine will pick up all files that match ! C<^msg/*\.(mo|po|msg)$>. Returns: arrayref of fully-qualified message files. --- 1701,1705 ---- L<OpenInteract2::Config::Package|OpenInteract2::Config::Package>), or this routine will pick up all files that match ! C<^msg/.*\.(mo|po|msg)$>. Returns: arrayref of fully-qualified message files. |
From: Chris W. <la...@us...> - 2005-03-13 18:35:15
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14617 Modified Files: App.pm Log Message: cosmetic Index: App.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/App.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** App.pm 9 Mar 2005 20:26:22 -0000 1.2 --- App.pm 13 Mar 2005 18:35:03 -0000 1.3 *************** *** 59,65 **** } ! OpenInteract2::Util->find_factory_subclasses( ! 'OpenInteract2::App', ! ); 1; --- 59,63 ---- } ! OpenInteract2::Util->find_factory_subclasses( 'OpenInteract2::App' ); 1; |
From: Chris W. <la...@us...> - 2005-03-13 06:41:44
|
Update of /cvsroot/openinteract/OpenInteract2/doc/Manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19440/doc/Manual Modified Files: API.pod Log Message: fix pod error Index: API.pod =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/doc/Manual/API.pod,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** API.pod 13 Mar 2005 05:47:16 -0000 1.2 --- API.pod 13 Mar 2005 06:41:33 -0000 1.3 *************** *** 91,94 **** --- 91,96 ---- =head2 General guidelines + =over 4 + =item * |
From: Chris W. <la...@us...> - 2005-03-13 06:22:53
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15617 Modified Files: Common.pm Log Message: OIN-97: small debugging change Index: Common.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action/Common.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Common.pm 25 Feb 2005 00:01:06 -0000 1.22 --- Common.pm 13 Mar 2005 06:22:40 -0000 1.23 *************** *** 162,169 **** $alt_id_field = $reverse_map{ $id_field } || $field_map->{ $id_field }; if ( $alt_id_field ) { - $log->is_debug && - $log->debug( "Using mapped ID field '$alt_id_field'" ); $id = $self->param( $alt_id_field ) || $request->param( $alt_id_field ); $self->param( c_id_field => $alt_id_field ); } --- 162,170 ---- $alt_id_field = $reverse_map{ $id_field } || $field_map->{ $id_field }; if ( $alt_id_field ) { $id = $self->param( $alt_id_field ) || $request->param( $alt_id_field ); + $log->is_debug && + $log->debug( "Using mapped ID field '$alt_id_field' ", + "got ID value '$id'" ); $self->param( c_id_field => $alt_id_field ); } |
From: Chris W. <la...@us...> - 2005-03-13 05:47:27
|
Update of /cvsroot/openinteract/OpenInteract2/doc/Manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8438 Modified Files: API.pod Log Message: OIN-46: add more content... Index: API.pod =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/doc/Manual/API.pod,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** API.pod 13 Mar 2005 05:35:30 -0000 1.1 --- API.pod 13 Mar 2005 05:47:16 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + [%- TAGS star -%] =head1 NAME *************** *** 46,50 **** just use the longer form. ! =head1 TEMPLATES =head2 General guidelines --- 47,91 ---- just use the longer form. ! =head1 TEMPLATES: TEMPLATE TOOLKIT ! ! =head2 Pointers ! ! The Template Toolkit is a great piece of software and is quite well ! documented. But there's a lot of documentation so it might be ! confusing on a starting point. A good one is the ! L<Template::Manual::Intro> document -- it gives you a good idea about ! using templates, templates as components, the different types of data ! you can pass into a template and more. ! ! Some other good documents are: L<Template::Manual::Syntax> and ! L<Template::Manual::Directives> to give you an idea of how to 'speak' ! and your available vocabulary. ! ! One more thing: you have a number of OI2-specific functions available ! in the OI2 plugin -- read L<OpenInteract2::TT2::Plugin> for what you ! can do with lots of examples. ! ! =head2 Including other templates ! ! The Template Toolkit is very flexible about bringing in other ! templates. You can use either C<INCLUDE> or C<PROCESS> to bring in ! another template and evaluate it, and those templates can bring in ! other templates too, and so on down the line. If you're not careful ! you can get a fairly complicated sequence of includes that makes ! debugging difficult -- for example, the templates to create a SELECT ! form element include: ! ! form_select ! form_select_intro ! form_select_option ! form_select_options_iterator ! form_select_options_list ! form_select_options_plain_list ! ! So a simple 'INCLUDE form_select' will bring in 'form_select_intro', ! and assuming you pass in an 'iterator' argument will call ! 'form_select_options_iterator' which will call 'form_select_option' ! multiple times to create the individual OPTION elements. Probably a ! little too complicated for a little-old dropdown box... =head2 General guidelines |
From: Chris W. <la...@us...> - 2005-03-13 05:35:55
|
Update of /cvsroot/openinteract/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5594 Modified Files: MANIFEST Log Message: OIN-46: add API guideline document Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/MANIFEST,v retrieving revision 1.122 retrieving revision 1.123 diff -C2 -d -r1.122 -r1.123 *** MANIFEST 9 Mar 2005 20:26:21 -0000 1.122 --- MANIFEST 13 Mar 2005 05:35:14 -0000 1.123 *************** *** 141,144 **** --- 141,145 ---- lib/OpenInteract2/Manual/AdminApache.pod lib/OpenInteract2/Manual/AdminDatabase.pod + lib/OpenInteract2/Manual/API.pod lib/OpenInteract2/Manual/Architecture.pod lib/OpenInteract2/Manual/Authentication.pod |
From: Chris W. <la...@us...> - 2005-03-13 05:35:40
|
Update of /cvsroot/openinteract/OpenInteract2/doc/Manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5594/doc/Manual Added Files: API.pod Log Message: OIN-46: add API guideline document --- NEW FILE: API.pod --- =head1 NAME OpenInteract2::Manual::API - API guidelines for OpenInteract2 =head1 SYNOPSIS This document will provide an overview of the different APIs in OpenInteract2 -- configuration, templating and interfaces, logging, coding, etc. -- and provide recommended uses. =head1 CONFIGURATION =head2 INI files everywhere Where possible OpenInteract2 uses configuration in a slightly customized INI format. You can learn details of this format in the module that does the parsing (L<OpenInteract2::Config::Ini>) but it's useful to put a few usage guidelines here. =head2 Defining lists Our custom INI format has different ways to define lists. You can just use the key multiple times: [mysection] key = value key = value2 key = value3 But since some configuration keys take a lot of values this can make for a very long configuration file. As an alternative you can use this syntax: [mysection] @,key = value, value2, value3 The leading '@,' means: B<@>: This is a list B<,>: ...and I'm using a ',' to delimit the values. This might be weird to some people so if people who are only vaguely familar with configuration files will be editing your data you might want to either add a note about what the leading '@' sequence means or just use the longer form. =head1 TEMPLATES =head2 General guidelines =item * All template files must have the *.tmpl suffix =item * Templates that are used for displaying data in a browser, should strive to adhere to the following W3C recommondations: XHTML 1.0, CSS1 and CSS2, WAI WCAG 1.0, Conformance level 2 (AA). This is just being a good web citizen. =back =head1 LOGGING =head2 Meaning of logging levels Our logging package (L<Log::Log4perl>) supports five levels. While each level has a name to provide some guidance about how to use it there are plenty of grey areas. Here are the levels and a few pointers: B<FATAL> Situations where the system/application cannot continue safely and must abort. Manual intervention is necessary to get things running again. Examples: database connection fails or cannot connect to other network resource (LDAP) B<ERROR> Actual errors that need to be looked into. The application should be able to continue running (albeit hobbled) despite having these errors -- otherwise they'd be fatal -- but they're serious enough to look into and diagnose later. Note that by default messages logged at this level get stored separately in the filesystem and displayed in the error browser. Examples: cannot store session, missing configuration data that's required for your application. B<WARN> Other problems you may encounter might not need to be later investigated but are still important to note. For situations that at some point later may lead to errors. Examples: cannot fetch or store data from a database but not due to application validation errors (foreign key violations, constraint violations); using default values in a configuration (e.g., the default mail server is 'localhost' but that's probably wrong). B<INFO> Coarse status messages. This is useful to see what path a request takes through an application but you don't necessarily want to see all the data, or even all the individual subroutines called. Examples: entry points into main subroutines; certain types of application-level errors: security violation, data constraint issues (user enters incorrect data into a form). B<DEBUG> Detailed status messages. Turning this on means the user wants to see everything. =head2 An efficiency note Leaving logging enabled can be an expensive proposition. But you can make it much less expensive by putting a check on your logging calls. So instead of: $log->debug( "Data structure so far: ", Data::Dumper::Dumper( \%big_hash ) ); you can use: $log->is_debug && $log->debug( "Data structure so far: ", Data::Dumper::Dumper( \%big_hash ) ); and the expensive-to-generate string will never get generated unless it has to. =head1 COPYRIGHT Copyright (c) 2005 Chris Winters. All rights reserved. =head1 AUTHORS Chris Winters E<lt>ch...@cw...E<gt> |
From: Chris W. <la...@us...> - 2005-03-13 05:08:37
|
Update of /cvsroot/openinteract/OpenInteract2/doc/Manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31691/Manual Modified Files: AdminApache.pod Log Message: OIN-53: update apache admin guide and inline all the examples Index: AdminApache.pod =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/doc/Manual/AdminApache.pod,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** AdminApache.pod 17 Feb 2004 04:30:11 -0000 1.13 --- AdminApache.pod 13 Mar 2005 05:08:19 -0000 1.14 *************** *** 10,18 **** information for configuring Apache. ! =head1 DESCRIPTION ! ! First: Apache and mod_perl really aren't difficult to setup. As long ! as you have a standard C compiler (GCC!) and a little patience, the ! keys to the future are yours! =head1 APACHE 1.x OVERVIEW --- 10,16 ---- information for configuring Apache. ! Apache and mod_perl really aren't difficult to setup. As long as you ! have a standard C compiler (GCC!) and a little patience it's really a ! piece of cake. =head1 APACHE 1.x OVERVIEW *************** *** 65,68 **** --- 63,75 ---- =item * + Since OI2 can run under a URL context you can segment your site to + different application servers. For instance, you can say that + everything under '/oi' goes back to your OI2 application server + running under mod_perl and everything under '/jsp' goes to a Tomcat + web container with your Java Server Pages. But to the user it's all + under one site -- nifty. + + =item * + The front-end proxy is able to feed data back to the client at whatever rate it needs without taking up many resources the entire *************** *** 93,113 **** =head1 BUILDING APACHE 1.x ! First, you need to get the C<mod_proxy_add_forward> module make ! available by Ask Bjoern Hansen. (See the resources at the end of the ! document.) ! Once you've retrieved the file, copy it into the C<src/modules/extra> ! directory of your Apache source code directory. An example of the ! 'activate-module' and 'enable-module' directives to put this module ! into your Apache is below in the as well as in the source code for ! C<mod_proxy_add_forward> itself. ! Once you've retrieved the extra module and copied it to the right ! place, you can create apache and mod_perl with the following ! steps. Note that this assumes you have not installed apache from ! source before and that you're installing to the directory ! C</usr/local/apache> -- modify as needed. ! [* INCLUDE examples/apache_compile_steps | indent 2 *] This is a very simple method for creating both a lightweight proxy --- 100,146 ---- =head1 BUILDING APACHE 1.x ! You can create apache and mod_perl with the following steps. Note that ! this assumes you have not installed apache from source before and that ! you're installing to the directory C</usr/local/apache> -- modify as ! needed. ! 1. $ tar -zxvf apache-1.3.33.tar.gz ! 2. $ tar -zxvf mod_perl-1.29.tar.gz ! ! 3. $ cd apache-1.3.33 ! ! 4. $ ./configure --prefix=/usr/local/apache \ ! --enable-module=rewrite --enable-module=proxy \ ! 5. $ make ! ! 6. $ make install ! (proxy server binary is now installed as /usr/local/apache/bin/httpd) ! ! 7. $ cd ../mod_perl-1.29 ! ! 8. $ perl Makefile.PL EVERYTHING=1 ! ! # Configure mod_perl with ../apache_1.3.33/src ? [y] ! 9. $ y ! ! # Shall I build httpd in ../apache_1.3.33/src for you? [y] ! 10. $ y ! ! 11. $ make ! ! 12. $ make test ! (note: if this fails due to an error with URI::URL, set the ! environment variable 'PERL_HTTP_URI_CLASS' to 'URI::URL', with ! something like: ! ! $ export PERL_HTTP_URI_CLASS=URI::URL ! ! 13. $ make install ! (mod_perl Perl modules are now installed) ! ! 14. $ cp ../apache-1.3.33/src/httpd /usr/local/apache/bin/httpd_modperl ! (mod_perl-enabled Apache is now installed) This is a very simple method for creating both a lightweight proxy *************** *** 123,127 **** =head1 CONFIGURING APACHE 1.x ! Use C<oi2_manage>! Use C<OI2_MANAGE>! The C<oi2_manage> script included with OpenInteract2 performs a number --- 156,160 ---- =head1 CONFIGURING APACHE 1.x ! =head2 oi2_manage and a running start The C<oi2_manage> script included with OpenInteract2 performs a number *************** *** 129,147 **** C<create_website> command along with the appropriate parameters, C<oi2_manage> will copy configuration files from the base installation ! to your website directory and customize them for your website. ! For instance, two of the files that are copied to your website's ! C<conf/> directory are C<httpd_static.conf> and C<httpd_modperl.conf>. ! (See the C<httpd_static.conf> and C<httpd_modperl.conf> files from the ! C<sample/apache/> directory in the distribution. The items marked with ! '[% %]' TT syntax are replaced in the customization process.) ! You will still need to edit a few parameters in them -- C<oi2_manage> ! is pretty smart, but it can't find out which IP address you want your ! website to listen to! -- but much of it is filled in for you. =head2 Static Configuration After you've run C<oi2_manage>, you will need to modify a few ! parameters in the static Apache configuration file. =over 4 --- 162,221 ---- C<create_website> command along with the appropriate parameters, C<oi2_manage> will copy configuration files from the base installation ! to your website directory and customize them for your website. This ! includes a set of files to get Apache running quite easily. ! Each Apache file defines a C<VirtualHost> and is meant to be ! C<Included> into a main server configuration. For instance, one of the ! files we generate is C<conf/httpd_modperl.conf>. Assuming you created ! your website in C</home/httpd/mysite.com> you'd add the following to ! your main mod_perl server configuration: ! ! Include /home/httpd/mysite.com/conf/httpd_modperl.conf ! ! and Apache will bring in the file at runtime. Of course, you can ! always copy-and-paste if that floats your boat, but you'll probably ! find that using C<Include> makes your life easier. ! ! There are four Apache 1.x configuration files created for you in the ! C<conf/> website directory: ! ! =over 4 ! ! =item * ! ! C<httpd_cgi_solo.conf> - If you want to run OI2 as a CGI script you ! can use this. (This configuration is B<NOT RECOMMENDED> because of ! performance but you might find it useful.) ! ! =item * ! ! C<httpd_modperl_solo.conf> - If you want to run OI2 in a ! mod_perl-enabled server without a front-end proxy, use this. ! ! =item * ! ! C<httpd_static.conf> - If you want to run OI2 with a proxy ! configuration, this is the C<VirtualHost> to use for the front-end. It ! proxies all requests except for static files back to a mod_perl ! server. ! ! =item * ! ! C<httpd_modperl.conf> - If you want to run OI2 with a proxy ! configuration, this is the C<VirtualHost> to use for the back-end ! inside a mod_perl server. ! ! =back ! ! All files are customized to your setup so you won't need to change any ! directory or file information. You will still need to edit a few ! parameters in them -- C<oi2_manage> is pretty smart, but it can't find ! out which IP address you want your website to listen to! =head2 Static Configuration After you've run C<oi2_manage>, you will need to modify a few ! parameters in the C<httpd_static.conf> if you're using the front-end ! proxy setup: =over 4 *************** *** 151,155 **** B<IP address>: Do a search-replace for '127.0.0.1' with the IP address you want the website to listen to. Note that if you're using named ! virtual hosts you should removethe C<Listen> directive. You will also need to specify the C<NameVirtualHost> directive in your main Apache configuration file. --- 225,229 ---- B<IP address>: Do a search-replace for '127.0.0.1' with the IP address you want the website to listen to. Note that if you're using named ! virtual hosts you should remove the C<Listen> directive. You will also need to specify the C<NameVirtualHost> directive in your main Apache configuration file. *************** *** 170,177 **** The default proxy configuration assumes that the only static files you ! will want to serve directly from the proxy server are images. This action is specified by this line: ! [* INCLUDE examples/apache_config_rewrite_images | indent 2 *] If you want to add other locations that will be entirely served --- 244,251 ---- The default proxy configuration assumes that the only static files you ! will want to serve directly from the proxy server are images. That action is specified by this line: ! RewriteRule ^/images - [L] If you want to add other locations that will be entirely served *************** *** 180,184 **** versions of forms for our customers to fill out, I could add: ! [* INCLUDE examples/apache_config_rewrite_extra_static | indent 2 *] And every URL beginning with C</forms> will be answered by the --- 254,258 ---- versions of forms for our customers to fill out, I could add: ! RewriteRule ^/forms - [L] And every URL beginning with C</forms> will be answered by the *************** *** 192,202 **** OpenInteract2 to perform a certain action when given the C</forms> URL. Unless the developer knows that the front-end server is answering ! all the C</forms> URLs, she will have a very frustrating time trying ! to figure out why her handler isn't responding. =head2 mod_perl Configuration After you've run C<oi2_manage>, you will need to modify a few ! parameters in the mod_perl Apache configuration file. =over 4 --- 266,278 ---- OpenInteract2 to perform a certain action when given the C</forms> URL. Unless the developer knows that the front-end server is answering ! all the C</forms> URLs she'll have a very frustrating time trying to ! figure out why her handler isn't responding. =head2 mod_perl Configuration After you've run C<oi2_manage>, you will need to modify a few ! parameters in the mod_perl Apache configuration file -- this holds ! whether you're modifying C<httpd_modperl_solo.conf> or ! C<httpd_modperl.conf>: =over 4 *************** *** 218,222 **** B<Port>: (optional) Do a search-replace for the default value of ! '8080' with whatever port you want to run the mod_perl server on =back --- 294,298 ---- B<Port>: (optional) Do a search-replace for the default value of ! '8080' with whatever port you want to run the mod_perl server on. =back *************** *** 228,233 **** =head2 Additional mod_perl Configuration ! Four separate items need to be customized in the ! C<conf/httpd_modperl.conf> file: B<First>, define the library paths for this website. Note that this is --- 304,309 ---- =head2 Additional mod_perl Configuration ! The files copied by C<oi2_manage> use the following items in ! C<conf/httpd_modperl.conf>: B<First>, define the library paths for this website. Note that this is *************** *** 236,249 **** Example: ! [* INCLUDE examples/apache_config_perl_lib | indent 2 *] ! ! B<Second>, you need to bring in your C<startup.pl>. (Information on ! what is done in the C<startup.pl> is found in the C<OpenInteracts ! Developer's Guide>.) ! [* INCLUDE examples/apache_config_startup_include | indent 2 *] ! TODO: Modify this to deal with being deployed under a separate ! directory. B<Third> and finally, we need to ensure that every request coming in --- 312,324 ---- Example: ! <Perl> ! use lib qw( /home/httpd/mysite.com ); ! </Perl> ! B<Second>, we need to bring in the C<startup.pl> -- this includes a ! few modules for us and initializes the L<OpenInteract2::Context> ! object once at server startup. ! PerlRequire /home/httpd/mysite.com/conf/startup.pl B<Third> and finally, we need to ensure that every request coming in *************** *** 252,256 **** do: ! [* INCLUDE examples/apache_config_root_location | indent 2 *] We can just say "Apache::OpenInteract2" in the httpd.conf file because --- 327,334 ---- do: ! <Location /> ! SetHandler perl-script ! PerlHandler Apache::OpenInteract2 ! </Location> We can just say "Apache::OpenInteract2" in the httpd.conf file because *************** *** 260,264 **** different URL context you can also use something like: ! [* INCLUDE examples/apache_config_deploy_location | indent 2 *] As long as you accompany it with a matching entry in the server --- 338,345 ---- different URL context you can also use something like: ! <Location /OI2> ! SetHandler perl-script ! PerlHandler Apache::OpenInteract2 ! </Location> As long as you accompany it with a matching entry in the server *************** *** 275,285 **** will appear to work. Very tricky. ! =back ! =head1 SEE ALSO ! B<mod_proxy_add_forward> ! http://develooper.com/code/mpaf/mod_proxy_add_forward.c B<mod_perl Guide> --- 356,372 ---- will appear to work. Very tricky. ! =item * ! If images don't show when accessing the Virtual Host you're setting ! up, it may be worth looking at the Apache default configuration. Some ! default configurations specify a global alias for the "/images" ! location, and if this is the case, you can easily override it by ! adding something like this to your VirtualHost config: ! Alias /images /path/to/your/installation/html/images ! =back ! ! =head1 SEE ALSO B<mod_perl Guide> |
From: Chris W. <la...@us...> - 2005-03-13 05:08:35
|
Update of /cvsroot/openinteract/OpenInteract2/doc/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31691/examples Removed Files: apache_compile_steps apache_config_deploy_location apache_config_perl_lib apache_config_rewrite_extra_static apache_config_rewrite_images apache_config_root_location apache_config_startup_include Log Message: OIN-53: update apache admin guide and inline all the examples --- apache_compile_steps DELETED --- --- apache_config_deploy_location DELETED --- --- apache_config_perl_lib DELETED --- --- apache_config_rewrite_extra_static DELETED --- --- apache_config_rewrite_images DELETED --- --- apache_config_root_location DELETED --- --- apache_config_startup_include DELETED --- |
From: Chris W. <la...@us...> - 2005-03-12 21:16:53
|
Update of /cvsroot/openinteract/OpenInteract2/doc/Manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14817 Modified Files: TutorialAdvanced.pod Log Message: OIN-92: finish up the rest of the declared sections Index: TutorialAdvanced.pod =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/doc/Manual/TutorialAdvanced.pod,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TutorialAdvanced.pod 4 Mar 2005 03:03:15 -0000 1.6 --- TutorialAdvanced.pod 12 Mar 2005 21:16:40 -0000 1.7 *************** *** 531,537 **** =head2 Define the class =head2 Add to declaration ! =head1 SPOPS: USING SECURITY =head1 MISC --- 531,659 ---- =head2 Define the class + SPOPS objects provide simple persistence behavior. But you may want + them to have other types of behavior as well. The recommended way of + doing this is to create your class and have it subclass the generated + SPOPS class. + + A typical use of this is to encapsulate common queries. Say you have a + 'recipe' object: + + [recipe] + class = OpenInteract2::Recipe + ... + + After using it for a while you find that you're one of your standard + queries is to find recipes with a particular ingredient posted in the + last month. It's executed from multiple actions so it makes sense to + have this query live in the same object that actually retrieves the + objects. To hold it you'd create something like this: + + package OpenInteract2::Recipe; + + use strict; + @OpenInteract2::Recipe::ISA = qw( OpenInteract2::RecipePersist ); + + sub by_ingredient_in_last_month { + my ( $class, $ingredient ) = @_; + my $where = qq{ + ingredient LIKE ? ' + AND date_part( 'epoch', CURRENT_DATETIME ) - date_part( 'epoch', posted_on ) <= 25920000 + }; + return $class->fetch_group({ + where => $where, + value => [ $ingredient ], + }); + } + + Hey, where did that C<OpenInteract2::RecipePersist> come from? + =head2 Add to declaration ! The last step is to change the name of your generated class. This is ! so people can use the name they'd expect to see ! ('OpenInteract2::Recipe' for a 'recipe' object). Changing this is simple: ! ! OLD: ! [recipe] ! class = OpenInteract2::Recipe ! ... ! ! NEW: ! [recipe] ! class = OpenInteract2::RecipePersist ! ... ! ! One other task: when we want to get the object class name from the ! context (using C<lookup_object()>) we don't want to get ! 'OpenInteract2::RecipePersist'. So we need to alias the class: ! ! [recipe] ! class = OpenInteract2::RecipePersist ! alias_class = OpenInteract2::Recipe ! ... ! ! So now when we get the class name like this we'll get the right thing: ! ! my $recipe_class = CTX->lookup_object( 'recipe' ); ! my $recent_recipes = ! $recipe_class->by_ingredient_in_last_month( 'ketchup' ); ! print "Stuff you've made recently:\n"; ! foreach my $recipe ( @{ $recent_recipes } ) { ! print " ", $recipe->name, "\n"; ! } ! ! =head2 Using security ! ! First: are you sure you need per-object security? Checking security ! can add significant overhead to object retrieval, so if your security ! requirements can be met by application security instead you should use ! it. ! ! So if you need it, adding security is as simple as setting 'is_secure' ! to 'yes' in your object configuration: ! ! [myobject] ! class = OpenInteract2::Myobject ! ... ! is_secure = yes ! ! This will add L<SPOPS::Secure> to your class's C<@ISA> and ! automatically ensure that users have READ security to retrieve an ! object and WRITE security to store or remove it. ! ! That leaves a gap: how do we know what the security should be to ! create an object? You cover this with the 'creation_security' ! configuration section. It looks like this: ! ! [myobject creation_security] ! user = WRITE ! group = site_admin_group:WRITE ! world = READ ! ! This means that we create a security object for the user who creates ! the object as WRITE, one for the 'site_admin_group' as WRITE, and one ! for the world as READ. You can skip a scope if you like -- if you only ! want users in the 'public' group to be able to see your object you'd ! use: ! ! [myobject creation_security] ! group = public_group:READ ! ! The 'site_admin_group' and 'public_group' used above is the name of ! any group found in your server configuration's 'default_objects' ! configuration section. That section typically looks like this: ! ! [default_objects] ! superuser = 1 ! supergroup = 1 ! theme = 1 ! public_group = 2 ! site_admin_group = 3 ! ! The 'groupname:PERMISSION' is a syntax enhancement: when the server ! starts up we lookup 'groupname' in 'default_objects' and substitute ! that group's ID. So with the above definitions when you create a new ! 'myobject' we'll also create a security object giving WRITE permission ! to group with ID 3. =head1 MISC |
From: Chris W. <la...@us...> - 2005-03-12 18:37:32
|
Update of /cvsroot/openinteract/OpenInteract2/doc/Manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4782/doc/Manual Modified Files: I18N.pod Log Message: OIN-143: be able to read localization messages from PO/MO files just like our custom .msg files Index: I18N.pod =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/doc/Manual/I18N.pod,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** I18N.pod 25 Feb 2005 05:40:17 -0000 1.12 --- I18N.pod 12 Mar 2005 18:37:17 -0000 1.13 *************** *** 221,232 **** myapp-en.msg # lang is 'en' ! myotherapp-es-MX.dat # ...'es-MX' ! messages_en-HK.msg # ...'en-HK' The following are not: english-messages.msg ! messages-en-part2.msg ! messagesen.msg If you create a message filename that does not conform to this --- 221,232 ---- myapp-en.msg # lang is 'en' ! myotherapp-es-MX.mo # ...'es-MX' ! messages_en_HK.po # ...'en_HK' The following are not: english-messages.msg ! messages-en-part2.mo ! messagesen.po If you create a message filename that does not conform to this *************** *** 234,238 **** localization reading process altogether. ! =head2 Message File Format The message file format is fairly simple: --- 234,264 ---- localization reading process altogether. ! You can check whether your application's message filenames are ! formatted properly with the 'check_package' task will alert you to ! malformed message filenames -- see ! L<OpenInteract2::Manage::Package::Check> or just run from your package ! development directory: ! ! $ oi2_manage check_package ! ! =head1 MESSAGE FILES ! ! =head2 Supported Formats: PO, MO and Custom ! ! OpenInteract2 supports reading localized messages from ! C<gettext>-formatted files (a.k.a, 'PO' or 'MO' files) as well as a ! custom format. All are treated in the same way -- once read in all ! messages get flattened into a single per-language namespace regardless ! of their source. ! ! To include localization files with your package just drop them into ! the 'msg/' subdirectory. OI2 will find them at server startup and read ! them all in. ! ! Note that if you use PO or MO files you'll need to have ! L<Locale::Maketext::Lexicon> installed. If you don't the server ! startup process will halt and tell you to install it. ! ! =head2 Custom Message File Format The message file format is fairly simple: *************** *** 308,312 **** The '\' B<must> be at the end of the line or the remainder of your message will get lost. (You may have whitespace between the '\' and ! the end of line, but that may not be the case forever.) =item 2. --- 334,338 ---- The '\' B<must> be at the end of the line or the remainder of your message will get lost. (You may have whitespace between the '\' and ! the end of line.) =item 2. *************** *** 334,338 **** db.error.process = While processing the statement [_1] the database \ ! returned an error [_2] In another language this might be something like the following --- 360,364 ---- db.error.process = While processing the statement [_1] the database \ ! returned an error [_2] In another language this might be something like the following *************** *** 340,344 **** db.error.process = La base de datos volvio un error [_2] mientras \ ! que procesaba la declaracion [_1] When we ask for the message we need to pass in two values which will --- 366,370 ---- db.error.process = La base de datos volvio un error [_2] mientras \ ! que procesaba la declaracion [_1] When we ask for the message we need to pass in two values which will *************** *** 513,516 **** --- 539,546 ---- L<Locale::Maketext|Locale::Maketext> + L<Locale::Maketext::Lexicon|Locale::Maketext::Lexicon> + + gettext: L<http://www.gnu.org/software/gettext/> + openinteract-dev mailing list: |
From: Chris W. <la...@us...> - 2005-03-12 18:37:32
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/I18N In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4782/lib/OpenInteract2/I18N Modified Files: Initializer.pm Log Message: OIN-143: be able to read localization messages from PO/MO files just like our custom .msg files Index: Initializer.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/I18N/Initializer.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Initializer.pm 2 Feb 2005 13:10:42 -0000 1.11 --- Initializer.pm 12 Mar 2005 18:37:18 -0000 1.12 *************** *** 22,26 **** } ! # This may be really naive... # should match: en | en-US | en_US --- 22,26 ---- } ! # This may be really naive, but it should work for po/mo/msg files # should match: en | en-US | en_US *************** *** 32,43 **** $log->debug( "Pulled language '$lang' from file '$filename'" ); return $lang; - } sub add_message_files { my ( $self, @files ) = @_; ! return unless ( scalar @files ); $log ||= get_logger( LOG_INIT ); ! $log->info( "Adding message files: ", join( ', ', @files ) ); push @{ $self->{_files} }, @files; return $self->{_files}; --- 32,56 ---- $log->debug( "Pulled language '$lang' from file '$filename'" ); return $lang; } + sub add_message_files { my ( $self, @files ) = @_; ! return $self->{_files} unless ( scalar @files ); $log ||= get_logger( LOG_INIT ); ! ! # ensure all files have an identifiable language ! foreach my $msg_file ( @files ) { ! my $lang = $self->is_valid_message_file( $msg_file ); ! unless ( $lang ) { ! $log->error( "File '$msg_file' does not have identifiable language" ); ! oi_error "Cannot identify language from message file ", ! "'$msg_file'. It must end with a language code ", ! "before the file extension. For example: ", ! "'myapp-en.msg', 'MyReallyBigApp-es-MX.dat'"; ! } ! } ! $log->is_debug && ! $log->debug( "Adding message files: ", join( ', ', @files ) ); push @{ $self->{_files} }, @files; return $self->{_files}; *************** *** 50,57 **** opendir( MSGDIR, $msg_dir ) || oi_error "Cannot read from global message directory '$msg_dir': $!"; ! my @msg_files = grep /\.msg$/, readdir( MSGDIR ); closedir( MSGDIR ); my @full_msg_files = map { catfile( $msg_dir, $_ ) } @msg_files ; ! $log->info( "Found global message files: ", join( ', ', @full_msg_files ) ); $self->add_message_files( @full_msg_files ); return \@full_msg_files; --- 63,72 ---- opendir( MSGDIR, $msg_dir ) || oi_error "Cannot read from global message directory '$msg_dir': $!"; ! my @msg_files = grep /\.(msg|mo|po)$/, readdir( MSGDIR ); closedir( MSGDIR ); my @full_msg_files = map { catfile( $msg_dir, $_ ) } @msg_files ; ! $log->is_debug && ! $log->debug( "Found global message files: ", ! join( ', ', @full_msg_files ) ); $self->add_message_files( @full_msg_files ); return \@full_msg_files; *************** *** 61,110 **** my ( $self ) = @_; $log ||= get_logger( LOG_INIT ); ! my %lang_msg = (); ! my %key_from = (); ! ! # Some initialization... ! $TEMPLATE ||= Template->new(); ! $BASE_CLASS = $self->_get_lang_template(); ! MSGFILE: foreach my $msg_file ( @{ $self->{_files} } ) { ! my $lang = $self->is_valid_message_file( $msg_file ); ! unless ( $lang ) { ! oi_error "Cannot identify language from message file ", ! "'$msg_file'. It must end with a language code ", ! "before the file extension. For example: ", ! "'myapp-en.msg', 'MyReallyBigApp-es-MX.dat'"; } ! $log->is_info && ! $log->info( "Reading messages from file '$msg_file'" ); ! ! # This may throw an exception, let it bubble up... ! my $messages = $self->_read_messages( $msg_file ); ! ! $lang_msg{ $lang } ||= {}; ! foreach my $msg_key ( keys %{ $messages } ) { ! if ( $lang_msg{ $lang }->{ $msg_key } ) { ! $log->error( "DUPLICATE MESSAGE KEY FOUND. Key '$msg_key' ", ! "from '$msg_file' was already found in message ", ! "file '$key_from{ $msg_key }' read in earlier. ", ! "Existing key will not be overwritten which ", ! "may cause odd application behavior." ); ! } ! else { ! $lang_msg{ $lang }->{ $msg_key } = $messages->{ $msg_key }; ! $key_from{ $msg_key } = $msg_file; ! } } } ! # Now all messages are read in, generate the classes my @generated_classes = (); ! foreach my $lang ( keys %lang_msg ) { my $generated_class = ! $self->_generate_language_class( $lang, $lang_msg{ $lang } ); push @generated_classes, $generated_class; } --- 76,118 ---- my ( $self ) = @_; $log ||= get_logger( LOG_INIT ); + unless ( ref $self->{_files} eq 'ARRAY' and @{ $self->{_files} } ) { + $log->warn( "Asked to generate localization classes but no ", + "localization message files assigned; weird..." ); + return []; + } ! $self->_check_for_gettext_files(); ! # %all_messages is: ! # ->lang->lang_key = msg ! # ->lang->SOURCE->lang_key = file with key ! # ...see _assign_file_messages() for where it gets filled ! my %all_messages = (); foreach my $msg_file ( @{ $self->{_files} } ) { ! $log->is_debug && ! $log->debug( "Reading messages from file '$msg_file'" ); ! my %file_messages = (); ! if ( $msg_file =~ /\.msg$/ ) { ! %file_messages = $self->_read_msg_file( $msg_file ); } ! elsif ( $msg_file =~ /\.(mo|po)$/ ) { ! %file_messages = $self->_read_gettext_file( $msg_file ); } + $self->_assign_file_messages( $msg_file, \%all_messages, \%file_messages ); } ! # ...message key sources aren't needed anymore so delete ! ! while ( my ( $lang, $lang_msg ) = each %all_messages ) { ! delete $lang_msg->{SOURCE}; ! } ! ! # Now all messages are read in and merged, generate the classes my @generated_classes = (); ! foreach my $lang ( keys %all_messages ) { my $generated_class = ! $self->_generate_language_class( $lang, $all_messages{ $lang } ); push @generated_classes, $generated_class; } *************** *** 116,135 **** # private methods below here ! sub _read_messages { ! my ( $self, $msg_file ) = @_; ! $log ||= get_logger( LOG_INIT ); ! $log->is_debug && ! $log->debug( "Reading messages from file '$msg_file'" ); ! open( MSG, '<', $msg_file ) ! || oi_error "Cannot read messages from '$msg_file': $!"; my %messages = (); my ( $current_key, $current_msg, $readmore ); while ( <MSG> ) { chomp; # Skip comments and blanks unless we're in a readmore block - next if ( ! $readmore and /^\s*\#/ ); next if ( ! $readmore and /^\s*$/ ); --- 124,170 ---- # private methods below here ! sub _check_for_gettext_files { ! my ( $self ) = @_; ! my $has_gettext = grep /\.(mo|po)$/, @{ $self->{_files} }; ! if ( $has_gettext ) { ! eval "require Locale::Maketext::Lexicon::Gettext"; ! if ( $@ ) { ! oi_error "Locale::Maketext::Lexicon is required to parse mo/po ", ! "localization files. Please install it."; ! } ! } ! } ! # merge messages from a file into all messages + sub _assign_file_messages { + my ( $self, $file, $all_messages, $file_messages ) = @_; + my $lang = $self->is_valid_message_file( $file ); + while ( my ( $key, $value ) = each %{ $file_messages } ) { + if ( $all_messages->{ $lang }{ $key } ) { + my $source = $all_messages->{ $lang }{SOURCE}{ $key }; + $log->warn( + "DUPLICATE MESSAGE KEY FOUND. Key '$key' from ", + "'$file' was already found in message file ", + "'$source' read in earlier. Existing key WILL NOT BE ", + "OVERWRITTEN, which may cause odd application behavior." ); + } + else { + $all_messages->{ $lang }{ $key } = $value; + $all_messages->{ $lang }{SOURCE}{ $key } = $file; + } + } + } + + sub _read_msg_file { + my ( $self, $msg_file ) = @_; my %messages = (); my ( $current_key, $current_msg, $readmore ); + open( MSG, '<', $msg_file ) + || oi_error "Cannot read messages from '$msg_file': $!"; while ( <MSG> ) { chomp; # Skip comments and blanks unless we're in a readmore block next if ( ! $readmore and /^\s*\#/ ); next if ( ! $readmore and /^\s*$/ ); *************** *** 137,145 **** my $line = $_; my $this_readmore = $line =~ s|\\\s*$||; - if ( $readmore ) { - - # lop off spaces at the beginning of continued lines so - # they're more easily distinguished $line =~ s/^\s+//; $current_msg .= $line; --- 172,179 ---- my $line = $_; my $this_readmore = $line =~ s|\\\s*$||; + # lop off spaces at the beginning of continued lines so + # they're more easily distinguished + if ( $readmore ) { $line =~ s/^\s+//; $current_msg .= $line; *************** *** 161,170 **** } close( MSG ); ! $log->is_debug && ! $log->debug( "Set '$current_key' = '$current_msg'" ); $messages{ $current_key } = $current_msg; ! return \%messages; } sub _generate_language_class { my ( $self, $lang, $messages ) = @_; --- 195,215 ---- } close( MSG ); ! $log->is_debug && $log->debug( "Set '$current_key' = '$current_msg'" ); $messages{ $current_key } = $current_msg; ! return %messages; ! } ! ! ! sub _read_gettext_file { ! my ( $self, $gettext_file ) = @_; ! open( GETTEXT, '<', $gettext_file ) ! || oi_error "Failed to open gettext file: $!"; ! my @content = <GETTEXT>; ! close( GETTEXT ); ! my $msg = Locale::Maketext::Lexicon::Gettext->parse( @content ); ! return %{ $msg } } + sub _generate_language_class { my ( $self, $lang, $messages ) = @_; *************** *** 206,209 **** --- 251,258 ---- "'$lang' with base class '$base_class'" ); my ( $gen_class ); + + $TEMPLATE ||= Template->new(); + $BASE_CLASS ||= $self->_get_lang_template(); + $TEMPLATE->process( \$BASE_CLASS, \%params, \$gen_class ) || oi_error "Failed to process maketext subclass template: ", *************** *** 269,272 **** --- 318,350 ---- variable L<%Lexicon> which C<L::M> uses to work its magic. + The message files may be in one of three formats: + + =over 4 + + =item * + + B<.msg> - Custom key/value pair format with interpolated variables + indicated by C<[_1]> , C<[_2]>, etc. as supported by + L<Locale::Maketext>. End-of-line continuations ('\') are also + supported -- see L<OpenInteract2::Manual::I18N> for formatting + details. + + =item * + + B<.po> - Plaintext format used by gettext. This format is documented + elsewhere (see L<SEE ALSO>) and parsed by L<Locale::Maketext::Lexicon>. + + =item * + + B<.mo> - Compiled gettext files. This format is documented elsewhere + (see L<SEE ALSO>) and parsed by L<Locale::Maketext::Lexicon>. + + =back + + Message files can also be mixed and matched, even within a package. So + if you've got one translator who likes to use gettext tools you can + include them alongside people who are fine with the OI2 message + format. + =head1 CLASS METHODS *************** *** 285,300 **** myapp-en.msg ! myotherapp-en-MX.dat ! messages_en-HK.msg The following are not: english-messages.msg ! messages-en-part2.msg ! messagesen.msg Currently we assume the base language identifier is two characters (e.g., 'en', 'jp', 'ru') and the extension (e.g., 'US', 'CA', 'MX') ! can by any number of characters. This may be wildly naive. =head1 OBJECT METHODS --- 363,379 ---- myapp-en.msg ! myotherapp-en_MX.po ! messages_en-HK.mo The following are not: english-messages.msg ! messages-en-part2.po ! messagesen.mo Currently we assume the base language identifier is two characters (e.g., 'en', 'jp', 'ru') and the extension (e.g., 'US', 'CA', 'MX') ! can by any number of characters. This may be wildly naive and may ! change. =head1 OBJECT METHODS *************** *** 305,308 **** --- 384,390 ---- files to process. It does not process these files until C<run()>. + If any file in C<@fully_qualified_files> does not have a valid + language we throw an exception. + B<locate_global_message_files()> *************** *** 317,324 **** Reads messages from all files added via C<add_message_files()> and ! generates language-specific subclasses for all messages found. (Once the subclasses are created the system does not know from where the messages come since all messages are flattened into a per-language ! data structure.) So the following: file: msg-en.msg --- 399,406 ---- Reads messages from all files added via C<add_message_files()> and ! generates language-specific subclasses for all messages found. Once the subclasses are created the system does not know from where the messages come since all messages are flattened into a per-language ! data structure. So the following: file: msg-en.msg *************** *** 328,332 **** foo.label.main ! file: other_msg-en.msg keys: baz.title --- 410,414 ---- foo.label.main ! file: other_msg-en.mo keys: baz.title *************** *** 334,338 **** baz.conclusion ! file: another_msg-en.msg bar.title bar.intro --- 416,420 ---- baz.conclusion ! file: another_msg-en.po bar.title bar.intro *************** *** 362,367 **** =item * ! Cannot discern a language from the given filename. See ! C<is_valid_message_file()> for more. =item * --- 444,449 ---- =item * ! If you have any gettext files (mo/po extension) and do not have ! L<Locale::Maketext::Lexicon>. =item * *************** *** 377,383 **** Note that a duplicate key (that is, a key defined in multiple message files) will not generate an exception. Instead it will generate a ! logging message with an 'error' level. ! See more about the format used for the message files in L<OpenInteract2::Manual::I18N>. --- 459,465 ---- Note that a duplicate key (that is, a key defined in multiple message files) will not generate an exception. Instead it will generate a ! logging message with an 'warn' level. ! See more about the format used for the custom message files in L<OpenInteract2::Manual::I18N>. *************** *** 386,389 **** --- 468,477 ---- =head1 SEE ALSO + L<Locale::Maketext> + + L<Locale::Maketext::Lexicon> + + gettext: L<http://www.gnu.org/software/gettext/> + L<OpenInteract2::I18N> *************** *** 392,397 **** L<OpenInteract2::Setup::ReadLocalizedMessages> - L<Locale::Maketext> - =head1 COPYRIGHT --- 480,483 ---- *************** *** 404,405 **** --- 490,492 ---- Chris Winters E<lt>ch...@cw...E<gt> + |
From: Chris W. <la...@us...> - 2005-03-12 18:37:32
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4782/lib/OpenInteract2 Modified Files: Package.pm Log Message: OIN-143: be able to read localization messages from PO/MO files just like our custom .msg files Index: Package.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Package.pm,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** Package.pm 9 Mar 2005 20:26:22 -0000 1.52 --- Package.pm 12 Mar 2005 18:37:18 -0000 1.53 *************** *** 293,297 **** unless ( scalar @{ $base_files } ) { my $files = $self->get_files; ! $base_files = [ grep { m|^msg/.*\.msg$| } @{ $files } ]; } my $dir = $self->directory; --- 293,297 ---- unless ( scalar @{ $base_files } ) { my $files = $self->get_files; ! $base_files = [ grep { m!^msg/.*\.(mo|po|msg)$! } @{ $files } ]; } my $dir = $self->directory; *************** *** 1215,1222 **** my $action = 'Check localization filename'; foreach my $message_file ( @{ $message_files } ) { ! my $full_file = $self->find_file( $message_file ); ! $log->is_debug && $log->debug( "Checking message file '$full_file'" ); my $lang = OpenInteract2::I18N::Initializer ! ->is_valid_message_file( $full_file ); my $msg = ( $lang ) ? "Extracted language '$lang' from '$message_file'" --- 1215,1221 ---- my $action = 'Check localization filename'; foreach my $message_file ( @{ $message_files } ) { ! $log->is_debug && $log->debug( "Checking message file '$message_file'" ); my $lang = OpenInteract2::I18N::Initializer ! ->is_valid_message_file( $message_file ); my $msg = ( $lang ) ? "Extracted language '$lang' from '$message_file'" *************** *** 1680,1684 **** this routine will pick up all files that match C<^conf/spops.*\.ini$>. ! Returns: arrayref of relative SPOPS configuration files. B<get_action_files()> --- 1679,1683 ---- this routine will pick up all files that match C<^conf/spops.*\.ini$>. ! Returns: arrayref of fully-qualified SPOPS configuration files. B<get_action_files()> *************** *** 1693,1697 **** C<^conf/action.*\.ini$>. ! Returns: arrayref of relative action configuration files. B<get_message_files()> --- 1692,1696 ---- C<^conf/action.*\.ini$>. ! Returns: arrayref of fully-qualified configuration files. B<get_message_files()> *************** *** 1702,1708 **** L<OpenInteract2::Config::Package|OpenInteract2::Config::Package>), or this routine will pick up all files that match ! C<^msg/*\.msg$>. ! Returns: arrayref of relative message files. B<get_changes()> --- 1701,1707 ---- L<OpenInteract2::Config::Package|OpenInteract2::Config::Package>), or this routine will pick up all files that match ! C<^msg/*\.(mo|po|msg)$>. ! Returns: arrayref of fully-qualified message files. B<get_changes()> |
From: Chris W. <la...@us...> - 2005-03-12 05:09:50
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8291/OpenInteract2 Modified Files: Action.pm Log Message: OIN-133: warning fixes Index: Action.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action.pm,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** Action.pm 4 Mar 2005 02:51:44 -0000 1.71 --- Action.pm 12 Mar 2005 05:09:39 -0000 1.72 *************** *** 715,719 **** return; } ! my $expire_time = $expire->{ $self->task } || $expire->{ CACHE_ALL_KEY() }; $log->is_debug && $log->debug( "Action/task ", $self->name, "/", $self->task, " ", --- 715,719 ---- return; } ! my $expire_time = $expire->{ $self->task } || $expire->{ CACHE_ALL_KEY() } || ''; $log->is_debug && $log->debug( "Action/task ", $self->name, "/", $self->task, " ", |
From: Chris W. <la...@us...> - 2005-03-12 05:09:49
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Controller In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8291/OpenInteract2/Controller Modified Files: MainTemplate.pm Log Message: OIN-133: warning fixes Index: MainTemplate.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Controller/MainTemplate.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MainTemplate.pm 2 Jun 2004 20:13:25 -0000 1.7 --- MainTemplate.pm 12 Mar 2005 05:09:39 -0000 1.8 *************** *** 33,39 **** my $action = $self->initial_action; ! $log->is_debug && ! $log->debug( "Executing top-level action '", $action->name, "' ", ! "with task '", $action->task, "'" ); my $content = eval { $action->execute }; --- 33,43 ---- my $action = $self->initial_action; ! if ( $log->is_debug ) { ! my $task = $action->task || ''; ! $log->debug( ! sprintf( "Executing top-level action '%s' with task '%s'", ! $action->name, $task ) ! ); ! } my $content = eval { $action->execute }; |
From: Chris W. <la...@us...> - 2005-03-12 05:09:05
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_page/OpenInteract2/Action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8114/base_page/OpenInteract2/Action Modified Files: Page.pm Log Message: OIN-133: warning fixes Index: Page.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_page/OpenInteract2/Action/Page.pm,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Page.pm 11 Mar 2005 05:37:31 -0000 1.25 --- Page.pm 12 Mar 2005 05:08:42 -0000 1.26 *************** *** 640,647 **** $log ||= get_logger( LOG_APP ); $log->is_debug && $log->debug( "Edit status of page: ", ! "[edit: ", $self->param( 'edit' ), "] ", ! "[new object: ", $self->param( 'is_new_object' ), "]" ); my $page_class = CTX->lookup_object( 'page' ); my $page = $self->param( 'c_object' ) || $self->param( 'page' ); --- 640,649 ---- $log ||= get_logger( LOG_APP ); + my $request = CTX->request; + my $do_edit = $self->param( 'edit' ) || $request->param( 'edit' ) || ''; + my $is_new = $self->param( 'is_new_object' ) || ''; $log->is_debug && $log->debug( "Edit status of page: ", ! "[edit: $do_edit] [new object: $is_new]" ); my $page_class = CTX->lookup_object( 'page' ); my $page = $self->param( 'c_object' ) || $self->param( 'page' ); *************** *** 681,686 **** # to display yet - my $do_edit = $self->param( 'edit' ) - || CTX->request->param( 'edit' ); unless ( $page or $do_edit ) { CTX->response->content_type( 'text/html' ); --- 683,686 ---- |
From: Salve J. N. <sj...@us...> - 2005-03-11 11:00:41
|
Update of /cvsroot/openinteract/OpenInteract2/sample/website/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12745/sample/website/template Modified Files: label_form_radio_row Log Message: OIN-150: Removed a HTML label that wasn't supposed to be committed (sorry) Index: label_form_radio_row =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/website/template/label_form_radio_row,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** label_form_radio_row 11 Mar 2005 10:46:21 -0000 1.3 --- label_form_radio_row 11 Mar 2005 11:00:12 -0000 1.4 *************** *** 11,15 **** [%- INCLUDE data_cell_begin() -%] [% FOREACH value = list -%] ! [%- INCLUDE form_radio %]<label for="[% "radio-$name-$value" %]">[% value %]</label>[% UNLESS loop.last %] | [% END -%] [% END -%] </td></tr> --- 11,15 ---- [%- INCLUDE data_cell_begin() -%] [% FOREACH value = list -%] ! [%- INCLUDE form_radio %] [% value %][% UNLESS loop.last %] | [% END -%] [% END -%] </td></tr> |
From: Salve J. N. <sj...@us...> - 2005-03-11 10:46:33
|
Update of /cvsroot/openinteract/OpenInteract2/sample/website/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9081/sample/website/template Modified Files: label_form_text_row label_form_login_row label_form_textarea_row label_form_checkbox_row label_form_select_row label_form_date_row label_form_radio_row label_form_upload_row Log Message: OIN-150: Change templates to use "action_messages" instead of "action_errors" Index: label_form_text_row =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/website/template/label_form_text_row,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** label_form_text_row 17 Jul 2003 04:24:36 -0000 1.2 --- label_form_text_row 11 Mar 2005 10:46:21 -0000 1.3 *************** *** 11,16 **** [%- INCLUDE data_cell_begin %][% INCLUDE form_text %] </td></tr> ! [% IF action_errors.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_errors.$name ) -%] ! [% END -%] \ No newline at end of file --- 11,16 ---- [%- INCLUDE data_cell_begin %][% INCLUDE form_text %] </td></tr> ! [% IF action_messages.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_messages.$name ) -%] ! [% END -%] Index: label_form_login_row =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/website/template/label_form_login_row,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** label_form_login_row 20 Aug 2003 13:35:49 -0000 1.2 --- label_form_login_row 11 Mar 2005 10:46:21 -0000 1.3 *************** *** 7,11 **** [%- DEFAULT label = 'Users'; DEFAULT colspan = 2; ! IF action_errors.$name; color = '#ffffe0'; END; -%] --- 7,11 ---- [%- DEFAULT label = 'Users'; DEFAULT colspan = 2; ! IF action_messages.$name; color = '#ffffe0'; END; -%] *************** *** 14,16 **** [%- INCLUDE form_login() -%] [% field_label -%] ! </td></tr> \ No newline at end of file --- 14,16 ---- [%- INCLUDE form_login() -%] [% field_label -%] ! </td></tr> Index: label_form_textarea_row =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/website/template/label_form_textarea_row,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** label_form_textarea_row 20 Aug 2003 13:35:49 -0000 1.2 --- label_form_textarea_row 11 Mar 2005 10:46:21 -0000 1.3 *************** *** 7,11 **** [%- DEFAULT colspan = 1; ! IF action_errors.$name; color = '#ffffe0'; END; -%] --- 7,11 ---- [%- DEFAULT colspan = 1; ! IF action_messages.$name; color = '#ffffe0'; END; -%] *************** *** 19,24 **** </td> </tr> ! [% IF action_errors.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_errors.$name ) -%] ! [% END -%] \ No newline at end of file --- 19,24 ---- </td> </tr> ! [% IF action_messages.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_messages.$name ) -%] ! [% END -%] Index: label_form_checkbox_row =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/website/template/label_form_checkbox_row,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** label_form_checkbox_row 17 Jul 2003 04:24:36 -0000 1.2 --- label_form_checkbox_row 11 Mar 2005 10:46:21 -0000 1.3 *************** *** 6,10 **** [%- DEFAULT colspan = 2; ! IF action_errors.$name; color = '#ffffe0'; END; -%] --- 6,10 ---- [%- DEFAULT colspan = 2; ! IF action_messages.$name; color = '#ffffe0'; END; -%] *************** *** 12,17 **** [%- INCLUDE data_cell_begin -%][% INCLUDE form_checkbox %] </td></tr> ! [% IF action_errors.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_errors.$name ) -%] ! [% END -%] \ No newline at end of file --- 12,17 ---- [%- INCLUDE data_cell_begin -%][% INCLUDE form_checkbox %] </td></tr> ! [% IF action_messages.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_messages.$name ) -%] ! [% END -%] Index: label_form_select_row =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/website/template/label_form_select_row,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** label_form_select_row 20 Aug 2003 13:35:49 -0000 1.2 --- label_form_select_row 11 Mar 2005 10:46:21 -0000 1.3 *************** *** 6,10 **** [%- DEFAULT colspan = 2; ! IF action_errors.$name; color = '#ffffe0'; END; -%] --- 6,10 ---- [%- DEFAULT colspan = 2; ! IF action_messages.$name; color = '#ffffe0'; END; -%] *************** *** 12,17 **** [%- INCLUDE data_cell_begin -%][% INCLUDE form_select -%] </td></tr> ! [% IF action_errors.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_errors.$name ) -%] ! [% END -%] \ No newline at end of file --- 12,17 ---- [%- INCLUDE data_cell_begin -%][% INCLUDE form_select -%] </td></tr> ! [% IF action_messages.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_messages.$name ) -%] ! [% END -%] Index: label_form_date_row =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/website/template/label_form_date_row,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** label_form_date_row 20 Aug 2003 13:35:49 -0000 1.2 --- label_form_date_row 11 Mar 2005 10:46:21 -0000 1.3 *************** *** 5,9 **** [%- DEFAULT colspan = 2; ! IF action_errors.$name; color = '#ffffe0'; END; -%] --- 5,9 ---- [%- DEFAULT colspan = 2; ! IF action_messages.$name; color = '#ffffe0'; END; -%] *************** *** 14,19 **** [% field_label -%] </td></tr> ! [% IF action_errors.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_errors.$name ) -%] ! [% END -%] \ No newline at end of file --- 14,19 ---- [% field_label -%] </td></tr> ! [% IF action_messages.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_messages.$name ) -%] ! [% END -%] Index: label_form_radio_row =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/website/template/label_form_radio_row,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** label_form_radio_row 20 Aug 2003 13:35:49 -0000 1.2 --- label_form_radio_row 11 Mar 2005 10:46:21 -0000 1.3 *************** *** 5,9 **** [%- DEFAULT colspan = 2; ! IF action_errors.$name; color = '#ffffe0'; END; -%] --- 5,9 ---- [%- DEFAULT colspan = 2; ! IF action_messages.$name; color = '#ffffe0'; END; -%] *************** *** 11,19 **** [%- INCLUDE data_cell_begin() -%] [% FOREACH value = list -%] ! [%- INCLUDE form_radio %] [% value %][% UNLESS loop.last %] | [% END -%] [% END -%] </td></tr> ! [% IF action_errors.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_errors.$name ) -%] ! [% END -%] \ No newline at end of file --- 11,19 ---- [%- INCLUDE data_cell_begin() -%] [% FOREACH value = list -%] ! [%- INCLUDE form_radio %]<label for="[% "radio-$name-$value" %]">[% value %]</label>[% UNLESS loop.last %] | [% END -%] [% END -%] </td></tr> ! [% IF action_messages.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_messages.$name ) -%] ! [% END -%] Index: label_form_upload_row =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/website/template/label_form_upload_row,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** label_form_upload_row 4 Sep 2003 03:53:17 -0000 1.1 --- label_form_upload_row 11 Mar 2005 10:46:21 -0000 1.2 *************** *** 5,9 **** [%- DEFAULT colspan = 2; ! IF action_errors.$name; color = '#ffffe0'; END; -%] --- 5,9 ---- [%- DEFAULT colspan = 2; ! IF action_messages.$name; color = '#ffffe0'; END; -%] *************** *** 11,16 **** [%- INCLUDE data_cell_begin %][% INCLUDE form_upload %] </td></tr> ! [% IF action_errors.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_errors.$name ) -%] ! [% END -%] \ No newline at end of file --- 11,16 ---- [%- INCLUDE data_cell_begin %][% INCLUDE form_upload %] </td></tr> ! [% IF action_messages.$name -%] [% INCLUDE label_error_row_extra( color = color, ! message = action_messages.$name ) -%] ! [% END -%] |
From: Chris W. <la...@us...> - 2005-03-11 05:37:45
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_page In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv959 Modified Files: package.ini MANIFEST Changes Log Message: OIN-87: check to see if a page will overlap with an existing action before saving it (prevents orphaned pages) Index: package.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_page/package.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** package.ini 1 Mar 2005 03:28:36 -0000 1.2 --- package.ini 11 Mar 2005 05:37:31 -0000 1.3 *************** *** 1,5 **** [package] name = base_page ! version = 2.30 author = Chris Winters <ch...@cw...> url = http://www.openinteract.org/ --- 1,5 ---- [package] name = base_page ! version = 2.31 author = Chris Winters <ch...@cw...> url = http://www.openinteract.org/ Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_page/MANIFEST,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MANIFEST 1 Mar 2005 03:28:36 -0000 1.8 --- MANIFEST 11 Mar 2005 05:37:31 -0000 1.9 *************** *** 50,53 **** --- 50,54 ---- html/images/icons/transfer.gif html/images/icons/unknown.gif + msg/base_page_messages-en.msg OpenInteract2/ContentType.pm OpenInteract2/Page.pm Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_page/Changes,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Changes 1 Mar 2005 03:28:36 -0000 1.29 --- Changes 11 Mar 2005 05:37:31 -0000 1.30 *************** *** 1,4 **** --- 1,10 ---- Revision history for OpenInteract package base_page. + 2.31 Fri Mar 11 00:31:28 EST 2005 + + OIN-87: Check to see if a page existing within an + already-existing location (claimed by another action) before + saving. + 2.30 Mon Feb 28 20:33:57 EST 2005 |
From: Chris W. <la...@us...> - 2005-03-11 05:37:43
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_page/OpenInteract2/Action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv959/OpenInteract2/Action Modified Files: Page.pm Log Message: OIN-87: check to see if a page will overlap with an existing action before saving it (prevents orphaned pages) Index: Page.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_page/OpenInteract2/Action/Page.pm,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Page.pm 10 Jan 2005 15:14:23 -0000 1.24 --- Page.pm 11 Mar 2005 05:37:31 -0000 1.25 *************** *** 539,542 **** --- 539,550 ---- $log->debug( "Location after clean '$page->{location}'" ); + # Ensure this page is viewable + if ( $page_class->does_url_exist_as_action( $page->{location} ) ) { + $self->add_error_key( 'base_page.error.location_is_used', $page->{location} ); + my $redo_task = ( $self->param( 'c_task' ) eq 'add' ) + ? 'display_add' : 'display_form'; + die $self->execute({ task => $redo_task }); + } + $page->{expires_on} ||= DateTime->now + DEFAULT_EXPIRE; $page->{mime_type} ||= 'text/html'; |