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...> - 2001-11-04 17:42:53
|
Update of /cvsroot/openinteract/SPOPS/t
In directory usw-pr-cvs1:/tmp/cvs-serv3886
Modified Files:
30_dbi.t
Log Message:
modified to use the new DBI-specific configuration routines
Index: 30_dbi.t
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/t/30_dbi.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** 30_dbi.t 2001/08/20 21:06:12 1.2
--- 30_dbi.t 2001/11/04 17:42:50 1.3
***************
*** 13,64 ****
use constant TEST_TABLE_NAME => 'spops_test';
- my %DRIVERS = (
- Pg => 'SPOPS::DBI::Pg',
- Sybase => 'SPOPS::DBI::Sybase',
- ASAny => 'SPOPS::DBI::Sybase',
- mysql => 'SPOPS::DBI::MySQL',
- );
-
{
- # Read in the config file and make sure we're supposed to run
! do "t/config.pl";
! my $config = _read_config_file();
! $config->{DBI_test} ||= 'n';
! if ( $config->{DBI_test} ne 'y' ) {
! print "1..0\n";
! print "Skipping test on this platform\n";
! exit;
! }
require Test::More;
Test::More->import( tests => NUM_TESTS );
my $driver_name = $config->{DBI_driver};
-
- # If DBD::ASAny, ensure it's the right version
-
- if ( $driver_name eq 'ASAny' ) {
- eval { require DBD::ASAny };
- if ( $@ ) {
- die "Cannot require DBD::ASAny module. Do you have it installed? (Error: $@)\n";
- }
-
- # get around annoying (!) -w declaration that var is only used once...
- my $dumb_ver = $DBD::ASAny::VERSION;
-
- # See that the right version is installed. 1.09 has been tested
- # and found ok. (Assuming higher versions will also be ok.)
! if ( $DBD::ASAny::VERSION < 1.09 ) {
! die <<ASANY;
! -- The DBD::ASAny driver prior version 1.09 did not support the {TYPE}
! attribute Please upgrade the driver before using SPOPS. If you do not
! do so, SPOPS will not work properly!
!
! Skipping text on this platform
! ASANY
! }
! }
# Ensure we can get to SPOPS::Initialize
--- 13,30 ----
use constant TEST_TABLE_NAME => 'spops_test';
{
! # Grab our DBI routines and be sure we're supposed to run.
+ do "t/dbi_config.pl";
+
+ my $config = test_dbi_run();
+
require Test::More;
Test::More->import( tests => NUM_TESTS );
my $driver_name = $config->{DBI_driver};
! my $spops_dbi_driver = check_dbd_compliance( $config, $driver_name );
# Ensure we can get to SPOPS::Initialize
***************
*** 72,76 ****
tester => {
class => 'DBITest',
! isa => [ $DRIVERS{ $config->{DBI_driver} }, 'SPOPS::DBI' ],
field => [ qw/ spops_id spops_name spops_goop spops_num / ],
id_field => 'spops_id',
--- 38,42 ----
tester => {
class => 'DBITest',
! isa => [ $spops_dbi_driver, 'SPOPS::DBI' ],
field => [ qw/ spops_id spops_name spops_goop spops_num / ],
id_field => 'spops_id',
***************
*** 85,145 ****
ok( $class_init_list->[0] eq 'DBITest', 'Initialize class' );
-
- # If the driver is *known* not to process {TYPE} info, we tell the
- # test class to include the type info in its configuration
-
- my %no_TYPE_dbd_drivers = ();
- if ( $no_TYPE_dbd_drivers{ $driver_name } ) {
- warn "\nDBD Driver $driver_name does not support {TYPE} information\n",
- "Installing manual types for test.\n";
- _assign_types();
- }
-
- my %dbd_driver_actions = ( Sybase => \&_sybase_setup );
- if ( ref $dbd_driver_actions{ $driver_name } eq 'CODE' ) {
- $dbd_driver_actions{ $driver_name }->( $config );
- }
-
- # First connect to the database
-
- my $db = DBI->connect( $config->{DBI_dsn},
- $config->{DBI_user},
- $config->{DBI_password} );
- unless ( $db ) {
- die "Cannot connect to database using parameters given. Please\n",
- "edit 'spops_test.conf' with correct information if you'd like\n",
- "to perform the tests. (Error: ", DBI->errstr, ")\n";
- }
! $db->{AutoCommit} = 1;
! $db->{ChopBlanks} = 1;
! $db->{RaiseError} = 1;
! $db->{PrintError} = 0;
!
! # This is standard, plain vanilla SQL; I don't want to have to do a
! # vendor-specific testing suite (argh!) -- although we could just
! # create sql files and read them in. Adapting the
! # OpenInteract::SQLInstall for strict SPOPS use might be
! # interesting...
!
! my $table_sql = <<SQL;
! CREATE TABLE @{[ TEST_TABLE_NAME ]} (
! spops_id int not null primary key,
! spops_name char(20) null,
! spops_goop char(20) not null,
! spops_num int default 2
! )
! SQL
! {
! my ( $sth );
! eval {
! $sth = $db->prepare( $table_sql );
! $sth->execute;
! };
! if ( $@ ) {
! die "Halting DBI tests -- Cannot create table in DBI database! Error: $@\n";
! }
! }
# Create an object
--- 51,59 ----
ok( $class_init_list->[0] eq 'DBITest', 'Initialize class' );
! # Create a database handle and create our testing table
! my $db = get_db_handle( $config );
! create_table( $db, 'simple', TEST_TABLE_NAME );
# Create an object
***************
*** 236,240 ****
}
! cleanup( $db );
# Future testing ideas:
--- 150,154 ----
}
! cleanup( $db, TEST_TABLE_NAME );
# Future testing ideas:
***************
*** 246,271 ****
}
-
- sub cleanup {
- my ( $db ) = @_;
- my $clean_sql = 'DROP TABLE ' . TEST_TABLE_NAME;
- eval { $db->do( $clean_sql ) };
- if ( $@ ) {
- warn "All tests passed ok, but we cannot remove the table (", TEST_TABLE_NAME, "). Error: $@\n";
- }
- $db->disconnect;
- }
-
-
- sub _sybase_setup {
- my $config = shift;
- $ENV{SYBASE} = $config->{ENV_SYBASE} if ( $config->{ENV_SYBASE} );
- }
-
-
- sub _assign_types {
- DBITest->CONFIG->{dbi_type_info} = { spops_id => 'num',
- spops_name => 'char',
- spops_goop => 'char',
- spops_num => 'num' };
- }
--- 160,161 ----
|
|
From: Chris W. <la...@us...> - 2001-11-04 17:42:30
|
Update of /cvsroot/openinteract/SPOPS/t
In directory usw-pr-cvs1:/tmp/cvs-serv3798
Added Files:
dbi_config.pl
Log Message:
added DBI-specific routines for creating a DB handle, testing whether
the driver is up to SPOPS, etc.
--- NEW FILE: dbi_config.pl ---
#!/usr/bin/perl
use strict;
use DBI;
my %DRIVERS = (
Pg => 'SPOPS::DBI::Pg',
Sybase => 'SPOPS::DBI::Sybase',
ASAny => 'SPOPS::DBI::Sybase',
mysql => 'SPOPS::DBI::MySQL',
);
my %DRIVER_ACTIONS = ( Sybase => \&_sybase_setup );
my %DRIVER_NO_TYPE = ();
my $SIMPLE_TABLE = <<'SIMPLESQL';
CREATE TABLE %s (
spops_id int not null primary key,
spops_name char(20) null,
spops_goop char(20) not null,
spops_num int default 2
)
SIMPLESQL
my $MULTI_TABLE = <<'MULTISQL';
CREATE TABLE %s (
spops_time int not null,
spops_user int not null,
spops_name char(20) null,
spops_goop char(2) not null,
spops_num int default 2,
primary key( spops_time, spops_user )
)
MULTISQL
# Read in the config file and make sure we're supposed to run; if we
# are, return the configuration
sub test_dbi_run {
do "t/config.pl";
my $config = _read_config_file();
$config->{DBI_test} ||= 'n';
if ( $config->{DBI_test} ne 'y' ) {
print "1..0\n";
print "Skipping test on this platform\n";
exit;
}
return $config;
}
sub get_db_handle {
my ( $config ) = @_;
my $db = DBI->connect( $config->{DBI_dsn},
$config->{DBI_user},
$config->{DBI_password} );
unless ( $db ) {
die "Cannot connect to database using parameters given. Please\n",
"edit 'spops_test.conf' with correct information if you'd like\n",
"to perform the tests. (Error: ", DBI->errstr, ")\n";
}
$db->{AutoCommit} = 1;
$db->{ChopBlanks} = 1;
$db->{RaiseError} = 1;
$db->{PrintError} = 0;
return $db;
}
sub create_table {
my ( $db, $type, $name ) = @_;
my ( $table_raw );
$table_raw = $SIMPLE_TABLE if ( $type eq 'simple' );
$table_raw = $MULTI_TABLE if ( $type eq 'multi' );
my $table_sql = sprintf( $table_raw, $name );
eval { $db->do( $table_sql ) };
if ( $@ ) {
die "Halting DBI tests -- Cannot create table ($name) in DBI database! Error: $@\n";
}
return $name;
}
sub cleanup {
my ( $db, $table_name ) = @_;
my $clean_sql = "DROP TABLE $table_name";
eval { $db->do( $clean_sql ) };
if ( $@ ) {
warn "All tests passed ok, but we cannot run ($clean_sql). Error: $@\n";
}
$db->disconnect;
}
sub sybase_setup {
my ( $config ) = @_;
$ENV{SYBASE} = $config->{ENV_SYBASE} if ( $config->{ENV_SYBASE} );
}
sub assign_manual_types {
my ( $class ) = @_;
$class->CONFIG->{dbi_type_info} = { spops_id => 'num',
spops_name => 'char',
spops_goop => 'char',
spops_num => 'num' };
}
# Ensure we can use the installed version of the DBD picked. Currently
# we only need to test for DBD::ASAny
sub check_dbd_compliance {
my ( $config, $driver_name ) = @_;
if ( $driver_name eq 'ASAny' ) {
eval { require DBD::ASAny };
if ( $@ ) {
die "Cannot require DBD::ASAny module. Are you sure that you have ",
"it installed? (Error: $@)\n";
}
# get around annoying (!) -w declaration that var is only used
# once...
my $dumb_ver = $DBD::ASAny::VERSION;
# See that the right version is installed. 1.09 has been
# tested and found ok. (Assuming higher versions will also be
# ok.)
if ( $DBD::ASAny::VERSION < 1.09 ) {
die <<ASANY;
-- The DBD::ASAny driver prior version 1.09 did not support the {TYPE}
attribute Please upgrade the driver before using SPOPS. If you do not
do so, SPOPS will not work properly!
Skipping text on this platform
ASANY
}
}
# If the driver is *known* not to process {TYPE} info, we tell the
# test class to include the type info in its configuration
if ( $DRIVER_NO_TYPE{ $driver_name } ) {
warn "\nDBD Driver $driver_name does not support {TYPE} information\n",
"Installing manual types for test.\n";
assign_manual_types( 'DBITest' );
}
if ( ref $DRIVER_ACTIONS{ $driver_name } eq 'CODE' ) {
$DRIVER_ACTIONS{ $driver_name }->( $config );
}
return $DRIVERS{ $config->{DBI_driver} };
}
|
|
From: Chris W. <la...@us...> - 2001-11-02 17:58:33
|
Update of /cvsroot/openinteract/OpenInteract/conf
In directory usw-pr-cvs1:/tmp/cvs-serv12046
Modified Files:
sample-Stash.pm
Log Message:
small changes
Index: sample-Stash.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/conf/sample-Stash.pm,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** sample-Stash.pm 2001/02/02 06:18:34 1.1.1.1
--- sample-Stash.pm 2001/11/02 17:58:30 1.2
***************
*** 1,4 ****
--- 1,6 ----
package OpenInteract::SampleStash;
+ # $Id$
+
use strict;
***************
*** 6,38 ****
$OpenInteract::SampleStash::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
! my $DEBUG = 1;
my %ITEMS = ();
# Specify the items that will survive the purge by clean_stash(),
# which is typically called at the end of every request.
- my %KEEP = ( cache => 1, 'ipc-cache' => 1, config => 1,
- template_object => 1, error_handlers => 1 );
! sub get_stash {
! my $class = shift;
! my $item = shift;
! return $ITEMS{ lc $item };
! }
! sub set_stash {
! my $class = shift;
! my $item = shift;
! my $obj = shift;
! return $ITEMS{ lc $item } = $obj;
! }
sub clean_stash {
! my $class = shift;
! foreach my $item ( keys %ITEMS ) {
! next if $KEEP{ $item };
! delete $ITEMS{ $item };
! }
}
!
1;
--- 8,31 ----
$OpenInteract::SampleStash::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
! # This is where we do the stashing
!
my %ITEMS = ();
# Specify the items that will survive the purge by clean_stash(),
# which is typically called at the end of every request.
! my %KEEP = map { $_ => 1 }
! qw( cache ipc-cache config template_object error_handlers );
! sub get_stash { return $ITEMS{ lc $_[1] } }
!
! sub set_stash { return $ITEMS{ lc $_[1] } = $_[2] }
sub clean_stash {
! foreach my $item ( keys %ITEMS ) {
! delete $ITEMS{ $item } unless ( $KEEP{ $item } );
! }
}
!
1;
***************
*** 41,46 ****
=head1 NAME
! OpenInteract::SampleStash - Default stash class and an example of what
! one looks like
=head1 SYNOPSIS
--- 34,38 ----
=head1 NAME
! OpenInteract::SampleStash - Default stash class and an example of what one looks like
=head1 SYNOPSIS
***************
*** 51,54 ****
--- 43,49 ----
=head1 DESCRIPTION
+
+ Note: This class template is used when generating a new website via
+ 'oi_manage' and is not meant to be used directly.
The existence of the 'stash class' is necessitated by the fact that we
|
|
From: Chris W. <la...@us...> - 2001-11-02 15:24:34
|
Update of /cvsroot/openinteract/OpenInteract/template
In directory usw-pr-cvs1:/tmp/cvs-serv3203
Modified Files:
error_message status_message
Log Message:
rename the variables to people can still use PROCESS and not worry
about side effects
Index: error_message
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/template/error_message,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** error_message 2001/10/13 05:00:23 1.1
--- error_message 2001/11/02 15:24:31 1.2
***************
*** 2,9 ****
[%- DEFAULT theme = OI.theme_properties;
! DEFAULT bgcolor = theme.error_bgcolor;
! DEFAULT width = theme.error_width;
! DEFAULT font_color = theme.error_font_color;
! DEFAULT border_color = theme.error_border_color -%]
<!-- BEGIN of error display -->
--- 2,9 ----
[%- DEFAULT theme = OI.theme_properties;
! SET error_width = width || theme.error_width;
! SET error_font_color = font_color || theme.error_font_color;
! SET error_border = border_color || theme.error_border_color;
! SET error_bgcolor = bgcolor ||theme.error_bgcolor; -%]
<!-- BEGIN of error display -->
***************
*** 11,24 ****
<div align="center">
! [%- PROCESS table_bordered_begin( table_width = width ) %]
<tr><td align="center">
! <font color="[% font_color %]" size="+1"><b>Error</b></font>
</td></tr>
<tr><td>
! <font color="[% font_color %]">[% error_msg %]</font>
</td></tr>
! [% PROCESS table_bordered_end() %]
</div>
--- 11,26 ----
<div align="center">
! [%- INCLUDE table_bordered_begin( table_width = error_width,
! border_color = error_border,
! bgcolor = error_bgcolor ) -%]
<tr><td align="center">
! <font color="[% error_font_color %]" size="+1"><b>Error</b></font>
</td></tr>
<tr><td>
! <font color="[% error_font_color %]">[% error_msg %]</font>
</td></tr>
! [% PROCESS table_bordered_end -%]
</div>
Index: status_message
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/template/status_message,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** status_message 2001/10/13 05:06:34 1.2
--- status_message 2001/11/02 15:24:31 1.3
***************
*** 1,9 ****
[%- IF status_msg -%]
! [%- DEFAULT theme = OI.theme_properties;
! DEFAULT width = '50%';
! DEFAULT bgcolor = theme.even_color;
! DEFAULT border_color = theme.border_color;
! DEFAULT font_color = '#000000'; -%]
<!-- BEGIN status display -->
--- 1,9 ----
[%- IF status_msg -%]
! [%- DEFAULT theme = OI.theme_properties;
! SET status_width = width || '50%';
! SET status_font_color = font_color || '#000000';
! SET status_border = border_color || theme.border_color;
! SET status_bgcolor = bgcolor ||theme.even_bgcolor; -%]
<!-- BEGIN status display -->
***************
*** 11,26 ****
<div align="center">
! [%- PROCESS table_bordered_begin( table_width = width,
! bgcolor = theme.even_color,
! border_color = border_color ) -%]
<tr><td align="center">
! <font color="[% font_color %]" size="+1"><b>Status</b></font>
</td></tr>
<tr><td>
! <font color="[% font_color %]">[% status_msg %]</font>
</td></tr>
! [%- PROCESS table_bordered_end() -%]
</div>
--- 11,26 ----
<div align="center">
! [%- INCLUDE table_bordered_begin( table_width = status_width,
! bgcolor = status_bgcolor,
! border_color = status_border ) -%]
<tr><td align="center">
! <font color="[% status_font_color %]" size="+1"><b>Status</b></font>
</td></tr>
<tr><td>
! <font color="[% status_font_color %]">[% status_msg %]</font>
</td></tr>
! [%- PROCESS table_bordered_end -%]
</div>
|
|
From: Chris W. <la...@us...> - 2001-11-01 05:40:53
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_box In directory usw-pr-cvs1:/tmp/cvs-serv15355 Modified Files: Changes package.conf Log Message: $name::$pkg -> $pkg::$name in box handler Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_box/Changes,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Changes 2001/10/29 05:09:12 1.25 --- Changes 2001/11/01 05:40:51 1.26 *************** *** 1,4 **** --- 1,9 ---- Revision history for OpenInteract package base_box. + 0.38 Thu Nov 1 00:57:09 EST 2001 + + Small fix in box handler to ensure that the base box shell + template is specified correctly. + 0.37 Mon Oct 29 00:24:48 EST 2001 Index: package.conf =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_box/package.conf,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** package.conf 2001/10/29 05:09:12 1.24 --- package.conf 2001/11/01 05:40:51 1.25 *************** *** 1,4 **** name base_box ! version 0.37 author Chris Winters <ch...@cw...> url http://www.openinteract.org/ --- 1,4 ---- name base_box ! version 0.38 author Chris Winters <ch...@cw...> url http://www.openinteract.org/ |
|
From: Chris W. <la...@us...> - 2001-11-01 05:40:53
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_box/OpenInteract/Handler
In directory usw-pr-cvs1:/tmp/cvs-serv15355/OpenInteract/Handler
Modified Files:
Box.pm
Log Message:
$name::$pkg -> $pkg::$name in box handler
Index: Box.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_box/OpenInteract/Handler/Box.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** Box.pm 2001/10/24 19:56:38 1.13
--- Box.pm 2001/11/01 05:40:51 1.14
***************
*** 154,158 ****
}
$box_template_package ||= 'base_box';
! $box_template_fullname ||= "$box_template_name\:\:$box_template_package";
$R->DEBUG && $R->scrib( 2, "Using box shell template $box_template_fullname" );
--- 154,158 ----
}
$box_template_package ||= 'base_box';
! $box_template_fullname ||= "$box_template_package\:\:$box_template_name";
$R->DEBUG && $R->scrib( 2, "Using box shell template $box_template_fullname" );
|
|
From: Chris W. <la...@us...> - 2001-11-01 05:37:25
|
Update of /cvsroot/openinteract/OpenInteract/OpenInteract/SPOPS
In directory usw-pr-cvs1:/tmp/cvs-serv14763/SPOPS
Modified Files:
DBI.pm
Log Message:
modify the output of field discovery errors
Index: DBI.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract/SPOPS/DBI.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** DBI.pm 2001/10/29 03:14:09 1.10
--- DBI.pm 2001/11/01 05:37:22 1.11
***************
*** 57,61 ****
$sth->execute;
};
! return ( NOTIFY, "Cannot discover fields: $@" ) if ( $@ );
$CONFIG->{field} = $sth->{NAME};
return ( OK, undef );
--- 57,61 ----
$sth->execute;
};
! return ( NOTIFY, "Cannot discover fields\n -> $sql\n -> $@" ) if ( $@ );
$CONFIG->{field} = $sth->{NAME};
return ( OK, undef );
|
|
From: Chris W. <la...@us...> - 2001-11-01 05:25:05
|
Update of /cvsroot/openinteract/OpenInteract/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv12701
Modified Files:
CommonHandler.pm
Log Message:
ensure that searches returning no results work ok
Index: CommonHandler.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract/CommonHandler.pm,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** CommonHandler.pm 2001/10/24 16:22:20 1.26
--- CommonHandler.pm 2001/11/01 05:24:57 1.27
***************
*** 80,102 ****
else {
$R->DEBUG && $R->scrib( 1, "Running search for the first time" );
! my $iterator = $class->_search_build_and_run({ is_paged => 1 });
! $results->save( $iterator );
! $R->DEBUG && $R->scrib( 1, "Search ID ($results->{search_id})" );
! $class->_search_save_id( $results->{search_id} );
}
! $params{page_number_field} = $class->MY_SEARCH_RESULTS_PAGE_FIELD;
! $params{current_page} = $apr->param( $params{page_number_field} ) || 1;
! my $hits_per_page = $class->MY_SEARCH_RESULTS_PAGE_SIZE;
! my ( $min, $max ) = $results->find_page_boundaries(
! $params{current_page}, $hits_per_page );
! $params{iterator} = $results->retrieve({ min => $min, max => $max,
! return => 'iterator' });
! $params{total_pages} = $results->find_total_page_count( $hits_per_page );
! $params{total_hits} = $results->{num_records};
! $params{search_id} = $results->{search_id};
! $params{search_results_key} = $class->MY_SEARCH_RESULTS_KEY;
! $R->DEBUG && $R->scrib( 1, "Search info: min: ($min); max: ($max)",
! "records ($results->{num_records})" );
}
--- 80,106 ----
else {
$R->DEBUG && $R->scrib( 1, "Running search for the first time" );
! my $iterator = eval { $class->_search_build_and_run({ is_paged => 1 }) };
! if ( $iterator and ! $@ ) {
! $results->save( $iterator );
! $R->DEBUG && $R->scrib( 1, "Search ID ($results->{search_id})" );
! $class->_search_save_id( $results->{search_id} );
! }
}
! if ( $results->{search_id} ) {
! $params{page_number_field} = $class->MY_SEARCH_RESULTS_PAGE_FIELD;
! $params{current_page} = $apr->param( $params{page_number_field} ) || 1;
! my $hits_per_page = $class->MY_SEARCH_RESULTS_PAGE_SIZE;
! my ( $min, $max ) = $results->find_page_boundaries(
! $params{current_page}, $hits_per_page );
! $params{iterator} = $results->retrieve({ min => $min, max => $max,
! return => 'iterator' });
! $params{total_pages} = $results->find_total_page_count( $hits_per_page );
! $params{total_hits} = $results->{num_records};
! $params{search_id} = $results->{search_id};
! $params{search_results_key} = $class->MY_SEARCH_RESULTS_KEY;
! $R->DEBUG && $R->scrib( 1, "Search info: min: ($min); max: ($max)",
! "records ($results->{num_records})" );
! }
}
***************
*** 105,109 ****
else {
! $params{iterator} = $class->_search_build_and_run;
}
--- 109,116 ----
else {
! $params{iterator} = eval { $class->_search_build_and_run };
! if ( $@ ) {
! $R->scrib( 0, "Got error from running search: $@" );
! }
}
***************
*** 183,186 ****
--- 190,194 ----
"WHERE: $where\n",
"VALUES: ", join( ',', @{ $values } ) );
+ die "Search failed ($SPOPS::Error::system_msg)\n";
}
|
|
From: Chris W. <la...@us...> - 2001-10-31 22:00:12
|
Update of /cvsroot/openinteract/OpenInteract/pkg/results_manage In directory usw-pr-cvs1:/tmp/cvs-serv1464 Modified Files: Changes package.conf Log Message: ensure that bad searches or searches that do not find anything don't mess everything up Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/results_manage/Changes,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Changes 2001/10/11 03:17:27 1.7 --- Changes 2001/10/31 22:00:08 1.8 *************** *** 1,4 **** --- 1,8 ---- Revision history for OpenInteract package results_manage. + 0.06 Wed Oct 31 16:37:07 EST 2001 + + Ensure we can deal with finding no results. + 0.05 Wed Oct 10 16:53:31 EDT 2001 Index: package.conf =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/results_manage/package.conf,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** package.conf 2001/10/11 03:17:27 1.4 --- package.conf 2001/10/31 22:00:09 1.5 *************** *** 1,4 **** name results_manage ! version 0.05 author Chris Winters url http://www.openinteract.org/ --- 1,4 ---- name results_manage ! version 0.06 author Chris Winters url http://www.openinteract.org/ |
|
From: Chris W. <la...@us...> - 2001-10-31 22:00:12
|
Update of /cvsroot/openinteract/OpenInteract/pkg/results_manage/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv1464/OpenInteract
Modified Files:
ResultsManage.pm
Log Message:
ensure that bad searches or searches that do not find anything don't
mess everything up
Index: ResultsManage.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/results_manage/OpenInteract/ResultsManage.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ResultsManage.pm 2001/10/11 03:17:27 1.9
--- ResultsManage.pm 2001/10/31 22:00:09 1.10
***************
*** 49,52 ****
--- 49,64 ----
my ( $self, $to_save, $p ) = @_;
my $R = OpenInteract::Request->instance;
+
+ my ( $is_empty );
+
+ $is_empty++ unless( $to_save );
+ $is_empty++ if ( ref $to_save eq 'ARRAY' and ! scalar @{ $to_save } );
+ $is_empty++ if ( UNIVERSAL::isa( $to_save, 'SPOPS::Iterator' ) and ! $to_save->has_next );
+
+ if ( $is_empty ) {
+ $R->scrib( 0, "Bailing out of saving search results -- nothing to save!" );
+ return undef;
+ }
+
$R->DEBUG && $R->scrib( 1, "Trying to save search results." );
|
|
From: Chris W. <la...@us...> - 2001-10-31 14:27:21
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_group/template
In directory usw-pr-cvs1:/tmp/cvs-serv8637/template
Modified Files:
group_detail.tmpl group_form.tmpl group_list.tmpl
Log Message:
update templates to use widgets
Index: group_detail.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_group/template/group_detail.tmpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** group_detail.tmpl 2001/08/13 16:10:14 1.2
--- group_detail.tmpl 2001/10/31 14:27:18 1.3
***************
*** 1,50 ****
! [%- th = OI.theme_properties -%]
! [% OI.comp( 'showerror', error_msg = error_msg ) %]
<div align="center">
<h2 align="center">Group Detail</h2>
<p>This screen allows you to view details about a group.</p>
-
- <table border="0" bgcolor="#000000" width="50%"
- cellpadding="2" cellspacing="0">
- <tr><td>
! <table border="0" width="100%" bgcolor="[% th.bgcolor %]"
! cellpadding="5" cellspacing="0" >
! <tr valign="top" align="center" bgcolor="[% th.head_bgcolor %]">
! <td colspan="2"><font color="[% th.head_font_color %]" size="+1">
! <b>Review Group Detail</b>
! </font></td>
! </tr>
!
! <tr align="top" bgcolor="[% th.even_color %]">
! <td align="right"><b>Group Name</b></td>
! <td><font size="-1">[% group.name %]</font></td>
! </tr>
! <tr align="top" bgcolor="[% th.odd_color %]">
! <td align="right"><b>Notes</b></td>
! <td><font size="-1">[% group.notes %]</font> </td>
! </tr>
! <tr bgcolor="[% th.even_color %]">
! <td align="right"><b>Member Users</b></td>
! <td><font size="-1">
! [% FOREACH user = mem_user_list %]
! [% th.bullet %] <a href="/User/show/?user_id=[% user.id %]">[% user.name %]</a><br>
[% END %]
! </font></td>
! </tr>
!
! <tr align="top" bgcolor="[% th.head_bgcolor %]">
! <td colspan="2"> </td>
! </tr>
! </table>
! </td></tr>
! </table>
</div>
--- 1,33 ----
! [%- DEFAULT theme = OI.theme_properties -%]
<div align="center">
+ [%- PROCESS error_message -%]
+ [%- PROCESS status_message -%]
+
<h2 align="center">Group Detail</h2>
<p>This screen allows you to view details about a group.</p>
! [% INCLUDE table_bordered_begin -%]
! [%- count = 0 -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_text_row( label = 'Group Name',
! text = group.name ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_text_row( label = 'Notes',
! text = group.notes ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_row_begin( label = 'Members' ) -%]
! <td>[% FOREACH user = mem_user_list -%]
! [%- user_url = OI.make_url( base = '/User/show/', user_id = user.id ) -%]
! [%- theme.bullet %] <a href="">[% user.name %]</a><br>
[% END %]
! </td></tr>
! [% INCLUDE table_bordered_end -%]
</div>
Index: group_form.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_group/template/group_form.tmpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** group_form.tmpl 2001/08/13 16:10:14 1.3
--- group_form.tmpl 2001/10/31 14:27:18 1.4
***************
*** 1,89 ****
! [%- th = OI.theme_properties -%]
! [% OI.comp( 'showerror', error_msg = error_msg ) %]
<div align="center">
! <h2 align="center">Group Editing</h2>
<p>This screen allows you to add a new group or edit an existing one.</p>
<form name="group" action="[% main_script %]/edit/"
! method="post" onsubmit="return data_check( this )">
!
! <table border="0" bgcolor="#000000" width="50%"
! cellpadding="2" cellspacing="0">
! <tr><td>
! <table border="0" width="100%" bgcolor="[% th.bgcolor %]"
! cellpadding="5" cellspacing="0">
! <tr valign="top" align="center" bgcolor="[% th.head_bgcolor %]">
! <td colspan="2"><font color="[% th.head_font_color %]" size="+1">
! <b>[% IF group.group_id %]Edit a Group[% ELSE %]Create a New Group[% END %]</b>
! </font></td>
! </tr>
!
! <tr align="top" bgcolor="[% th.even_color %]">
! <td align="right"><b>Group Name</b> [% th.required %]</td>
! <td><input type="text" size="10" maxlength="20" name="name" value="[% group.name %]"></td>
! </tr>
! <tr align="top" bgcolor="[% th.odd_color %]">
! <td align="right"><b>Notes</b></td>
! <td>
! <textarea name="notes" cols="40" rows="3"
! wrap="virtual">[% group.notes %]</textarea>
! </td>
! </tr>
! <tr bgcolor="[% th.even_color %]">
! <td colspan="2" align="center">
! <b>Assign Users</b>
! </td>
! </tr>
! <tr bgcolor="[% th.even_color %]">
! <td colspan="2" align="center">
! [% OI.comp( 'to_group', form_name = 'group', from_element = 'population',
to_element = 'member', mem_list_hold = member_field,
pop_list = all_user_list, mem_list = mem_user_list,
! label_from = 'All Users', label_to = 'Members' ) %]
! </td>
! </tr>
!
! <tr align="top" bgcolor="[% th.head_bgcolor %]">
! <td colspan="2" align="right"><input type="submit" value="Modify"></td>
! </tr>
! </table>
!
! </td></tr>
! </table>
!
! <input type="hidden" name="group_id" value="[% group.group_id %]">
! </form>
!
! </div>
!
! <script lanaguage="Javascript">
! var default_value_fields = new Array( 'name' );
! var field_titles = new Object;
! field_titles[ 'name' ] = 'Group Name';
! function data_check ( form ) {
! var i;
! // Check to see that all .value fields have info
! for ( i = 0; i < default_value_fields.length; i++ ) {
! var field = default_value_fields[ i ];
! var value = form[ field ].value;
! if ( value == '' || value == null ) {
! alert( 'Please enter information in ' + field_titles[ field ] + '. Form not submitted.' );
! return false;
! }
! }
! return tally_added_items();
! }
! </script>
\ No newline at end of file
--- 1,56 ----
! [%- DEFAULT theme = OI.theme_properties -%]
<div align="center">
! [%- PROCESS error_message -%]
! [%- PROCESS status_message -%]
!
! [%- action = ( group.id ) ? 'Edit a' : 'Create a New' -%]
!
! <h2 align="center">[% action %] Group</h2>
<p>This screen allows you to add a new group or edit an existing one.</p>
<form name="group" action="[% main_script %]/edit/"
! method="post" onsubmit="return tally_added_items()">
! [% INCLUDE table_bordered_begin -%]
! [%- count = 0;
! valign = 'top'; -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'Group Name', is_required = 1,
! size = 10, maxlength = 20,
! name = 'name', value = group.name ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_textarea_row( label = 'Notes', name = 'notes',
! rows = 3, cols = 30, wrap = 'virtual',
! value = group.notes ) -%]
! [%- count = count + 1 -%]
! <tr bgcolor="[% PROCESS row_color %]">
! <td colspan="2" align="center">
! [% INCLUDE show_label( label = 'Assign Users' ) %]
! </td>
! </tr>
! <tr bgcolor="[% PROCESS row_color %]">
! <td colspan="2" align="center">
! [% PROCESS to_group( form_name = 'group', from_element = 'population',
to_element = 'member', mem_list_hold = member_field,
pop_list = all_user_list, mem_list = mem_user_list,
! label_from = 'All Users', label_to = 'Members' ) -%]
! </td>
! </tr>
! [%- count = count + 1 -%]
! [% INCLUDE form_submit_row( value = 'Modify' ) -%]
! [%- INCLUDE table_bordered_end -%]
! [% INCLUDE form_hidden( name = 'group_id', value = group.id ) -%]
! </form>
! </div>
\ No newline at end of file
Index: group_list.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_group/template/group_list.tmpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** group_list.tmpl 2001/08/13 16:10:14 1.2
--- group_list.tmpl 2001/10/31 14:27:18 1.3
***************
*** 1,49 ****
! [%- th = OI.theme_properties -%]
! [% OI.comp( 'showerror', error_msg = error_msg ) %]
!
<div align="center">
<h2 align="center">Group Listing</h2>
! <p>Listed below are all the groups currently in the system. You can
! get further detail about each one or perform other actions on them.</p>
! [% IF group_list.size %]
! <table border="0" bgcolor="#000000" cellspacing="0" cellpadding="2">
! <tr><td>
! <table border="0" width="100%" bgcolor="[% th.bgcolor %]" cellpadding="5" cellspacing="0">
! <tr bgcolor="[% th.head_bgcolor %]" align="center">
! <td><font color="[% th.head_font_color %]" size="+1">Name</font></td>
! <td><font color="[% th.head_font_color %]" size="+1">Description</font></td>
! <td><font color="[% th.head_font_color %]" size="+1">Actions</font></td>
! </tr>
! [% count = 0 %]
! [% FOREACH group = group_list %]
! [% row_color = th.odd_color %]
! [% SET row_color = th.even_color IF count mod 2 == 0 %]
! <tr bgcolor="[% row_color %]">
! <td><font size="-1">[% group.name %]</font></td>
! <td><font size="-1">[% group.notes %]</font> </td>
! <td><font size="-1">
! <a href="/Group/show/?group_id=[% group.group_id %]">Detail</a><br>
! <a href="/Group/remove/?group_id=[% group.group_id %]">Remove</a><br>
! </font></td>
</tr>
- [% count = count + 1 %]
[% END %]
! <tr bgcolor="[% th.head_bgcolor %]"><td colspan="3"> </td></tr>
! </table>
! </td></tr>
! </table>
</div>
- [% ELSE %]
-
- <p>There are currently no groups in the system that you have security access to view.</p>
-
- [% END %]
\ No newline at end of file
--- 1,43 ----
! [%- DEFAULT theme = OI.theme_properties -%]
<div align="center">
+ [%- PROCESS error_message -%]
+ [%- PROCESS status_message -%]
+
<h2 align="center">Group Listing</h2>
! <p>Listed below are all the groups currently in the system.
! You can get further detail about each one or perform other
! actions on them.</p>
! [% IF group_list.size == 0 -%]
! <p>There are currently no groups in the system that you have security
! access to view.</p>
! [% ELSE -%]
! [% INCLUDE table_bordered_begin -%]
!
! [% INCLUDE header_row( labels = [ 'Name', 'Description', 'Actions' ] ) -%]
!
! [% FOREACH group = group_list -%]
! [%- show_url = OI.make_url( base = '/Group/show/',
! group_id= group.id ) -%]
! [%- remove_url = OI.make_url( base = '/Group/remove/',
! group_id= group.id ) -%]
! <tr bgcolor="[% PROCESS row_color( count = loop.count ) %]" valign="top">
! <td>[% group.name %]</td>
! <td>[% group.notes %] </td>
! <td><a href="[% show_url %]">Detail</a>
! [% IF group.tmp_security_level >= OI.security_level.write -%]
! <a href="[% remove_url %]">Remove</a>[% END -%]
! </td>
</tr>
[% END %]
! [% INCLUDE table_bordered_end -%]
! [% END %]
</div>
|
|
From: Chris W. <la...@us...> - 2001-10-31 14:26:34
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_group In directory usw-pr-cvs1:/tmp/cvs-serv8448 Modified Files: Changes package.conf Log Message: meta Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_group/Changes,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Changes 2001/09/14 03:22:46 1.16 --- Changes 2001/10/31 14:26:30 1.17 *************** *** 1,4 **** --- 1,8 ---- Revision history for OpenInteract package base_group. + 1.27 Wed Oct 31 09:35:39 EST 2001 + + Updated templates to use widgets. + 1.26 Thu Sep 13 23:33:25 EDT 2001 Index: package.conf =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_group/package.conf,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** package.conf 2001/09/14 03:22:46 1.15 --- package.conf 2001/10/31 14:26:30 1.16 *************** *** 1,4 **** name base_group ! version 1.26 author Chris Winters (ch...@cw...) url http://www.openinteract.org/ --- 1,4 ---- name base_group ! version 1.27 author Chris Winters (ch...@cw...) url http://www.openinteract.org/ |
|
From: Chris W. <la...@us...> - 2001-10-31 14:05:16
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_user/template
In directory usw-pr-cvs1:/tmp/cvs-serv3967/template
Modified Files:
new_user_form.tmpl
Log Message:
make the new user form look a little nicer
Index: new_user_form.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/template/new_user_form.tmpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** new_user_form.tmpl 2001/10/31 13:58:01 1.3
--- new_user_form.tmpl 2001/10/31 14:05:13 1.4
***************
*** 4,8 ****
<form name="newuser" action="/NewUser/edit/" method="post">
! [% INCLUDE table_bordered_begin -%]
<tr bgcolor="[% theme.head_bgcolor %]">
--- 4,8 ----
<form name="newuser" action="/NewUser/edit/" method="post">
! [% INCLUDE table_bordered_begin( table_width = '75%' ) -%]
<tr bgcolor="[% theme.head_bgcolor %]">
***************
*** 14,23 ****
<tr><td align="left" colspan="2">
<p>Creating a new account is easy! We only need two things:<br>
! [% theme.bullet %] the OI.login you'd like to use<br>
[% theme.bullet %] a working email address
<p>Once you fill out these items below and the username is not
already taken, you'll be emailed your username and a
! system-generated password. You can then OI.login using the password
sent to you. Once logged in, you can change your password to
whatever you like.
--- 14,23 ----
<tr><td align="left" colspan="2">
<p>Creating a new account is easy! We only need two things:<br>
! [% theme.bullet %] the login you'd like to use<br>
[% theme.bullet %] a working email address
<p>Once you fill out these items below and the username is not
already taken, you'll be emailed your username and a
! system-generated password. You can then login using the password
sent to you. Once logged in, you can change your password to
whatever you like.
***************
*** 33,43 ****
[% END -%]
[% INCLUDE label_form_text_row( label = 'Desired Login',
- color = theme.bgcolor,
name = 'requested_login',
value = requested_login ) -%]
[% INCLUDE label_form_text_row( label = 'Working email address',
- color = theme.bgcolor,
name = 'working_email',
value = working_email ) -%]
--- 33,42 ----
[% END -%]
+ [%- count = 1 -%]
[% INCLUDE label_form_text_row( label = 'Desired Login',
name = 'requested_login',
value = requested_login ) -%]
[% INCLUDE label_form_text_row( label = 'Working email address',
name = 'working_email',
value = working_email ) -%]
|
|
From: Chris W. <la...@us...> - 2001-10-31 13:58:40
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_user In directory usw-pr-cvs1:/tmp/cvs-serv1882 Modified Files: Changes MANIFEST package.conf Log Message: meta Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/Changes,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Changes 2001/10/25 15:29:10 1.26 --- Changes 2001/10/31 13:58:37 1.27 *************** *** 1,4 **** --- 1,14 ---- Revision history for OpenInteract package base_user. + 1.42 Wed Oct 31 09:09:08 EST 2001 + + Minor fixes + + 1.41 Wed Oct 31 09:01:05 EST 2001 + + Modified all templates to use the template widgets; modify all + /User methods to return a status so people actually know what + happened. + 1.40 Tue Oct 23 13:20:57 EDT 2001 Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/MANIFEST,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MANIFEST 2001/08/28 18:54:05 1.3 --- MANIFEST 2001/10/31 13:58:37 1.4 *************** *** 29,30 **** --- 29,32 ---- template/user_search_form.meta template/user_search_form.tmpl + template/user_search_results.meta + template/user_search_results.tmpl Index: package.conf =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/package.conf,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** package.conf 2001/10/25 15:29:10 1.26 --- package.conf 2001/10/31 13:58:37 1.27 *************** *** 1,4 **** name base_user ! version 1.40 author Chris Winters (ch...@cw...) url http://www.openinteract.org/ --- 1,4 ---- name base_user ! version 1.42 author Chris Winters (ch...@cw...) url http://www.openinteract.org/ |
|
From: Chris W. <la...@us...> - 2001-10-31 13:58:27
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_user/OpenInteract/Handler
In directory usw-pr-cvs1:/tmp/cvs-serv1820/OpenInteract/Handler
Modified Files:
NewUser.pm User.pm
Log Message:
various modifications to handlers -- show status whenever possible
Index: NewUser.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/OpenInteract/Handler/NewUser.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** NewUser.pm 2001/09/14 20:52:31 1.4
--- NewUser.pm 2001/10/31 13:58:24 1.5
***************
*** 15,31 ****
@OpenInteract::Handler::NewUser::forbidden_methods = ();
! my $MAIN_SCRIPT = '/NewUser';
! my $REMOVAL_TIME = 60 * 60 * 24; # 1 day
sub show {
my ( $class, $p ) = @_;
my $R = OpenInteract::Request->instance;
! $p->{main_script} = $MAIN_SCRIPT;
! $R->{page}{title} = 'Create a new User Account!';
return $R->template->handler( {}, $p,
! { db => 'new_user_form',
! package => 'base_user' } );
}
sub edit {
my ( $class, $p ) = @_;
--- 15,31 ----
@OpenInteract::Handler::NewUser::forbidden_methods = ();
! use constant MAIN_SCRIPT => '/NewUser';
! use constant REMOVAL_TIME => 60 * 60 * 24; # 1 day
sub show {
my ( $class, $p ) = @_;
my $R = OpenInteract::Request->instance;
! $p->{main_script} = MAIN_SCRIPT;
! $R->{page}{title} = 'Create a New User Account';
return $R->template->handler( {}, $p,
! { name => 'base_user::new_user_form' } );
}
+
sub edit {
my ( $class, $p ) = @_;
***************
*** 37,41 ****
unless ( $email and Email::Valid->address( $email ) ) {
! $R->throw({ code => 421,
type => 'email',
system_msg => "Invalid email address: $email",
--- 37,41 ----
unless ( $email and Email::Valid->address( $email ) ) {
! $R->throw({ code => 421,
type => 'email',
system_msg => "Invalid email address: $email",
***************
*** 50,59 ****
unless( $login ) {
my $error_msg = 'You cannot create an account without entering a login!';
! return $class->show( { error_msg => $error_msg, working_email => $email } );
}
# Next, see if the username exists
! my $user = eval { $R->user->fetch_by_login_name( $login,
{ skip_security => 1,
return_single => 1 } ) };
--- 50,60 ----
unless( $login ) {
my $error_msg = 'You cannot create an account without entering a login!';
! return $class->show( { error_msg => $error_msg,
! working_email => $email } );
}
# Next, see if the username exists
! my $user = eval { $R->user->fetch_by_login_name( $login,
{ skip_security => 1,
return_single => 1 } ) };
***************
*** 74,83 ****
$new_user->{login_name} = $login;
$new_user->{email} = $email;
! $new_user->{theme_id} = $R->CONFIG->{default_objects}{theme};
my $password = $R->user->generate_random_code( 12, 'mixed' );
if ( $R->CONFIG->{login}{crypt_password} ) {
$new_user->{password} = $R->user->crypt_it( $password );
}
! $new_user->{removal_date} = $R->user->now( { time => $R->{time} + $REMOVAL_TIME } );
eval { $new_user->save };
--- 75,84 ----
$new_user->{login_name} = $login;
$new_user->{email} = $email;
! $new_user->{theme_id} = $R->CONFIG->{default_objects}{theme};
my $password = $R->user->generate_random_code( 12, 'mixed' );
if ( $R->CONFIG->{login}{crypt_password} ) {
$new_user->{password} = $R->user->crypt_it( $password );
}
! $new_user->{removal_date} = $R->user->now( { time => $R->{time} + REMOVAL_TIME } );
eval { $new_user->save };
***************
*** 89,93 ****
$OpenInteract::Error::extra->{email} = $email;
$R->throw({ code => 321 });
! my $error_msg = 'Could not create user in database. Error has been logged and administrator contacted.';
return $class->show({ error_msg => $error_msg });
}
--- 90,95 ----
$OpenInteract::Error::extra->{email} = $email;
$R->throw({ code => 321 });
! my $error_msg = 'Could not create user in database. Error has ' .
! 'been logged and administrator contacted.';
return $class->show({ error_msg => $error_msg });
}
***************
*** 95,101 ****
# Ensure that the user can read/write his/her own record!
! eval { $R->user->set_item_security({ class => $R->user,
object_id => $new_user->{user_id},
! scope => SEC_SCOPE_USER,
scope_id => $new_user->{user_id},
level => SEC_LEVEL_WRITE }) };
--- 97,103 ----
# Ensure that the user can read/write his/her own record!
! eval { $R->user->set_item_security({ class => $R->user,
object_id => $new_user->{user_id},
! scope => SEC_SCOPE_USER,
scope_id => $new_user->{user_id},
level => SEC_LEVEL_WRITE }) };
***************
*** 111,115 ****
else {
! $new_user->log_action_enter( 'create', $new_user->{user_id}, $new_user->{user_id} );
}
--- 113,119 ----
else {
! $new_user->log_action_enter( 'create',
! $new_user->{user_id},
! $new_user->{user_id} );
}
***************
*** 135,141 ****
NOTIFY
! eval { OpenInteract::Utility->send_email({ message => $msg,
! to => $email,
! subject => "Account information for $R->{server_name}" }) };
if ( $@ ) {
$R->scrib( 0, "Cannot send email! ", Dumper( OpenInteract::Error->get ) );
--- 139,146 ----
NOTIFY
! eval { OpenInteract::Utility->send_email({
! message => $msg,
! to => $email,
! subject => "Account information for $R->{server_name}" }) };
if ( $@ ) {
$R->scrib( 0, "Cannot send email! ", Dumper( OpenInteract::Error->get ) );
***************
*** 152,155 ****
--- 157,162 ----
}
+ 1;
+
__END__
***************
*** 178,189 ****
=head1 METHODS
! =over 4
!
! =item B<show>
Displays the form for creating a new account, plus any error messsages
that might occur when processing the request (in I<edit()>).
! =item B<edit>
Creates the user account and notifies the user with the temporary
--- 185,194 ----
=head1 METHODS
! B<show>
Displays the form for creating a new account, plus any error messsages
that might occur when processing the request (in I<edit()>).
! B<edit>
Creates the user account and notifies the user with the temporary
***************
*** 191,201 ****
hours if he/she does not login.
- =back
-
- =head1 NOTES
-
=head1 TO DO
=head1 BUGS
=head1 COPYRIGHT
--- 196,206 ----
hours if he/she does not login.
=head1 TO DO
+ Nothing known.
+
=head1 BUGS
+
+ None known
=head1 COPYRIGHT
Index: User.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/OpenInteract/Handler/User.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** User.pm 2001/09/14 12:22:34 1.6
--- User.pm 2001/10/31 13:58:24 1.7
***************
*** 8,39 ****
use SPOPS::Secure qw( :level :scope );
! @OpenInteract::Handler::User::ISA = qw( OpenInteract::Handler::GenericDispatcher SPOPS::Secure );
$OpenInteract::Handler::User::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
$OpenInteract::Handler::User::author = 'ch...@cw...';
$OpenInteract::Handler::User::default_method = 'search_form';
! @OpenInteract::Handler::User::forbidden_methods = qw(
! _search_params _search_params_ldap _search_params_dbi );
! %OpenInteract::Handler::User::security = (
! DEFAULT_SECURITY_KEY() => SEC_LEVEL_READ,
! edit => SEC_LEVEL_WRITE,
! remove => SEC_LEVEL_WRITE );
use constant MAIN_SCRIPT => '/User';
-
sub search_form {
! return OpenInteract::Request->instance->template->handler(
! {}, {}, { name => 'base_user::user_search_form' } );
}
! sub listing {
my ( $class, $p ) = @_;
my $R = OpenInteract::Request->instance;
my $params = { main_script => MAIN_SCRIPT,
error_msg => $p->{error_msg} };
my $fetch_params = $class->_search_params;
! $R->DEBUG && $R->scrib( 1, "Searching for users with parameters\n",
Dumper( $fetch_params ) );
$params->{user_iterator} = eval { $R->user->fetch_iterator( $fetch_params) };
--- 8,38 ----
use SPOPS::Secure qw( :level :scope );
! @OpenInteract::Handler::User::ISA = qw( OpenInteract::Handler::GenericDispatcher );
$OpenInteract::Handler::User::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
$OpenInteract::Handler::User::author = 'ch...@cw...';
$OpenInteract::Handler::User::default_method = 'search_form';
! @OpenInteract::Handler::User::forbidden_methods = ();
! %OpenInteract::Handler::User::security = ();
use constant MAIN_SCRIPT => '/User';
sub search_form {
! my ( $class, $p ) = @_;
! my $R = OpenInteract::Request->instance;
! $R->{page}{title} = 'Search for User Records';
! return $R->template->handler( {}, $p,
! { name => 'base_user::user_search_form' } );
}
! sub search {
my ( $class, $p ) = @_;
my $R = OpenInteract::Request->instance;
my $params = { main_script => MAIN_SCRIPT,
+ status_msg => $p->{status_msg},
error_msg => $p->{error_msg} };
my $fetch_params = $class->_search_params;
! $R->DEBUG && $R->scrib( 2, "Searching for users with parameters\n",
Dumper( $fetch_params ) );
$params->{user_iterator} = eval { $R->user->fetch_iterator( $fetch_params) };
***************
*** 41,50 ****
OpenInteract::Error->set( SPOPS::Error->get );
$R->throw({ code => 404 });
}
$R->{page}{title} = 'User Listing';
return $R->template->handler( {}, $params,
! { name => 'base_user::user_list' } );
}
sub _search_params {
my ( $class ) = @_;
--- 40,51 ----
OpenInteract::Error->set( SPOPS::Error->get );
$R->throw({ code => 404 });
+ $params->{error_msg} .= "<br>Error running search: $@";
}
$R->{page}{title} = 'User Listing';
return $R->template->handler( {}, $params,
! { name => 'base_user::user_search_results' } );
}
+
sub _search_params {
my ( $class ) = @_;
***************
*** 100,112 ****
my $params = { main_script => MAIN_SCRIPT,
! error_msg => $p->{error_msg} };
$params->{user} = $p->{user};
unless ( $params->{user} ) {
my $user_id = $R->apache->param( 'user_id' ) || $R->apache->param( 'uid' );
! $params->{user} = eval { $R->user->fetch( $user_id ) };
! if ( $@ ) {
! OpenInteract::Error->set( SPOPS::Error->get );
! $R->throw({ code => 404 });
! $R->scrib( 0, "Cannot retrieve user ($user_id) ($@) $SPOPS::Error::system_msg" );
}
}
--- 101,117 ----
my $params = { main_script => MAIN_SCRIPT,
! error_msg => $p->{error_msg},
! status_msg => $p->{status_msg} };
$params->{user} = $p->{user};
unless ( $params->{user} ) {
my $user_id = $R->apache->param( 'user_id' ) || $R->apache->param( 'uid' );
! if ( $user_id ) {
! $params->{user} = eval { $R->user->fetch( $user_id ) };
! if ( $@ ) {
! OpenInteract::Error->set( SPOPS::Error->get );
! $R->throw({ code => 404 });
! $R->scrib( 0, "Cannot retrieve user ($user_id) ($@) $SPOPS::Error::system_msg" );
! return $class->search_form({ error_msg => "Could not retrieve requested record ($@)" });
! }
}
}
***************
*** 115,142 ****
# or user object, there's no reason to continue
! if ( ! $params->{user} and $p->{level} < SEC_LEVEL_WRITE ) {
my $msg = 'Sorry, you do not have access to create a new user object. Returning to listing.';
$R->scrib( 0, "No permission to create new user." );
! return $class->listing({ error_msg => $msg });
}
my $obj_level = ( $params->{user} )
! ? $params->{user}{tmp_security_level}
! : SEC_LEVEL_WRITE;
$params->{user} ||= $R->user->new({ theme_id => $R->{theme}{theme_id} });
! $R->DEBUG && $R->scrib( 1, "Levels $params->{user}{user_id}: $obj_level/$p->{level}" );
$params->{group_list} = eval { $params->{user}->group };
-
- my $tmpl_name = 'user_detail';
-
- if ( $p->{level} == SEC_LEVEL_WRITE and $obj_level == SEC_LEVEL_WRITE ) {
- $tmpl_name = 'user_form';
- }
$R->{page}{title} = 'View User Detail';
return $R->template->handler( {}, $params,
! { package => 'base_user',
! db => $tmpl_name } );
}
--- 120,141 ----
# or user object, there's no reason to continue
! unless ( $params->{user} or $R->{auth}{is_admin} ) {
my $msg = 'Sorry, you do not have access to create a new user object. Returning to listing.';
$R->scrib( 0, "No permission to create new user." );
! return $class->search_form({ error_msg => $msg });
}
my $obj_level = ( $params->{user} )
! ? $params->{user}{tmp_security_level} : SEC_LEVEL_WRITE;
$params->{user} ||= $R->user->new({ theme_id => $R->{theme}{theme_id} });
! $R->DEBUG && $R->scrib( 1, "Security $params->{user}{user_id}: ($obj_level)" );
$params->{group_list} = eval { $params->{user}->group };
+ my $tmpl_name = ( $obj_level == SEC_LEVEL_WRITE )
+ ? 'user_form' : 'user_detail';
$R->{page}{title} = 'View User Detail';
return $R->template->handler( {}, $params,
! { name => "base_user::$tmpl_name" } );
}
***************
*** 162,166 ****
if ( $obj_level < SEC_LEVEL_WRITE ) {
my $user_msg = 'Sorry, you do not have access to modify this user object. Returning to listing.';
! return $class->listing({ error_msg => $user_msg });
}
--- 161,165 ----
if ( $obj_level < SEC_LEVEL_WRITE ) {
my $user_msg = 'Sorry, you do not have access to modify this user object. Returning to listing.';
! return $class->search_form({ error_msg => $user_msg });
}
***************
*** 173,176 ****
--- 172,177 ----
}
+ my ( @status );
+
# Uncomment the code if you are allowing users to change their own themes
# Track this so we can change the theme if the user changed it.
***************
*** 184,190 ****
--- 185,197 ----
my $password = $apr->param( 'password' );
if ( $password ) {
+ my $password_confirm = $apr->param( 'password_conf' );
+ unless ( $password eq $password_confirm ) {
+ return $class->show({ user => $user,
+ error_msg => 'Passwords do not match. Please re-enter.' });
+ }
$R->DEBUG && $R->scrib( 1, "User asked to change password. Changing." );
$password = $R->user->crypt_it( $password ) if ( $R->CONFIG->{login}{crypt_password} );
$user->{password} = $password;
+ push @status, "Password changed";
}
***************
*** 196,200 ****
$R->scrib( 0, "Cannot save user object: $SPOPS::Error::system_msg" );
return $class->show({ user => $user,
! error_msg => 'Cannot save user object! See error log for details...' });
}
--- 203,207 ----
$R->scrib( 0, "Cannot save user object: $SPOPS::Error::system_msg" );
return $class->show({ user => $user,
! error_msg => "Error saving user record ($@)" });
}
***************
*** 212,215 ****
--- 219,229 ----
$user->make_public();
};
+ if ( $@ ) {
+ $R->scrib( 0, "Error modifying group membership: $@" );
+ my $error_msg = "Record created but group membership inconsistent.";
+ return $class->show({ user => $user,
+ error_msg => $error_msg });
+ }
+ push @status, "User record made part of 'public' group";
}
***************
*** 223,229 ****
# }
! $p->{user} = $user;
! $p->{status_msg} = 'User information updated.';
! return $class->show( $p );
}
--- 237,245 ----
# }
!
! my $action = ( $is_new ) ? 'created' : 'updated';
! unshift @status, "User record successfully $action";
! return $class->show({ user => $user,
! status_msg => join( "<br>\n", @status ) });
}
***************
*** 235,243 ****
my $user = eval { $R->user->fetch( $user_id ) };
if ( $@ or ! $user ) {
! return $class->listing({ error_msg => 'Cannot remove user -- object not created properly.' });
}
if ( $user->{tmp_security_level} < SEC_LEVEL_WRITE ) {
my $user_msg = 'Sorry, you do not have access to remove this user object. Returning to listing.';
! return $class->listing({ error_msg => $user_msg });
}
--- 251,259 ----
my $user = eval { $R->user->fetch( $user_id ) };
if ( $@ or ! $user ) {
! return $class->search_form({ error_msg => 'Cannot remove user -- object not created properly.' });
}
if ( $user->{tmp_security_level} < SEC_LEVEL_WRITE ) {
my $user_msg = 'Sorry, you do not have access to remove this user object. Returning to listing.';
! return $class->search_form({ error_msg => $user_msg });
}
***************
*** 247,286 ****
$R->throw({ code => 405 });
$R->scrib( 0, "Failed to remove user object: ($@) $SPOPS::Error::system_msg" );
! $p->{error_msg} = 'Cannot remove user object! See error log for details...';
}
}
! return $class->listing( $p );
}
1;
-
- __END__
-
- =pod
-
- =head1 NAME
-
- OpenInteract::Handler::User - Functions to manipulate user records
-
- =head1 SYNOPSIS
-
- =head1 DESCRIPTION
-
- =head1 METHODS
-
- =head1 TO DO
-
- =head1 BUGS
-
- =head1 COPYRIGHT
-
- Copyright (c) 2001 intes.net, inc.. All rights reserved.
-
- This library is free software; you can redistribute it and/or modify
- it under the same terms as Perl itself.
-
- =head1 AUTHORS
-
- Chris Winters <ch...@cw...>
-
- =cut
--- 263,272 ----
$R->throw({ code => 405 });
$R->scrib( 0, "Failed to remove user object: ($@) $SPOPS::Error::system_msg" );
! my $error_msg = "Error removing user object. ($@)";
! return $class->search_form({ error_msg => $error_msg });
}
}
! return $class->search_form({ status_msg => 'User record successfully removed' });
}
1;
|
|
From: Chris W. <la...@us...> - 2001-10-31 13:58:04
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_user/template
In directory usw-pr-cvs1:/tmp/cvs-serv1727/template
Modified Files:
new_user_form.tmpl user_detail.tmpl user_form.tmpl
user_list.tmpl user_search_form.tmpl
Log Message:
use template widgets throughout
Index: new_user_form.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/template/new_user_form.tmpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** new_user_form.tmpl 2001/08/13 16:10:15 1.2
--- new_user_form.tmpl 2001/10/31 13:58:01 1.3
***************
*** 1,22 ****
! [%- th = OI.theme_properties -%]
<div align="center">
! <form name="newuser" action="[% main_script %]/edit/" method="post">
! <table border="0" cellpadding="2" cellspacing="0"
! bgcolor=[% th.border_color %]" width="75%">
! <tr><td>
! <table border="0" width="100%" bgcolor="[% th.bgcolor %]"
! cellpadding="3" cellspacing="0">
! <tr bgcolor="[% th.head_bgcolor %]">
! <td colspan="2"><font size="+1" color="[% th.head_font_color %]">
<b>Create an Account</b>
</font></td>
</tr>
<tr><td align="left" colspan="2">
<p>Creating a new account is easy! We only need two things:<br>
! [% th.bullet %] the OI.login you'd like to use<br>
! [% th.bullet %] a working email address
<p>Once you fill out these items below and the username is not
--- 1,19 ----
! [%- DEFAULT theme = OI.theme_properties -%]
<div align="center">
! <form name="newuser" action="/NewUser/edit/" method="post">
! [% INCLUDE table_bordered_begin -%]
! <tr bgcolor="[% theme.head_bgcolor %]">
! <td colspan="2"><font size="+1" color="[% theme.head_font_color %]">
<b>Create an Account</b>
</font></td>
</tr>
+
<tr><td align="left" colspan="2">
<p>Creating a new account is easy! We only need two things:<br>
! [% theme.bullet %] the OI.login you'd like to use<br>
! [% theme.bullet %] a working email address
<p>Once you fill out these items below and the username is not
***************
*** 28,32 ****
</td></tr>
-
[%- IF OI.error_hold.newuser.message %]
<tr align="center">
--- 25,28 ----
***************
*** 37,61 ****
[% END -%]
! <tr>
! <td align="right"><b>Desired Login</b></td>
! <td><font size="-1">
! <input type="text" name="requested_login"
! value="[% requested_login %]" size="15">
! </font></td>
! </tr>
! <tr>
! <td align="right"><b>Working email address</b></td>
! <td><font size="-1">
! <input type="text" name="working_email"
! value="[% working_email %]" size="15">
! </font></td>
! </tr>
! <tr align="right"><td colspan="2">
! <font size="-1"><input type="submit" value="Go!"></font>
! </td></tr>
! </table>
! </td></tr>
! </table>
</form>
--- 33,49 ----
[% END -%]
! [% INCLUDE label_form_text_row( label = 'Desired Login',
! color = theme.bgcolor,
! name = 'requested_login',
! value = requested_login ) -%]
! [% INCLUDE label_form_text_row( label = 'Working email address',
! color = theme.bgcolor,
! name = 'working_email',
! value = working_email ) -%]
!
! [% INCLUDE form_submit_row( value = 'Go!' ) -%]
!
! [% INCLUDE table_bordered_end -%]
</form>
Index: user_detail.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/template/user_detail.tmpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** user_detail.tmpl 2001/09/14 12:23:00 1.3
--- user_detail.tmpl 2001/10/31 13:58:01 1.4
***************
*** 1,64 ****
! [%- theme = OI.theme_properties -%]
! [% OI.comp( 'showerror', error_msg = error_msg ) %]
<div align="center">
<h2 align="center">User Detail</h2>
<p>This screen has detail about a particular user record.</p>
-
- <table border="0" bgcolor="[% theme.border_color %]" width="50%"
- cellpadding="2" cellspacing="0">
- <tr><td>
! <table border="0" width="100%" bgcolor="[% theme.bgcolor %]"
! cellpadding="5" cellspacing="0">
!
! <tr valign="top" align="center" bgcolor="[% theme.head_bgcolor %]">
! <td colspan="2"><font color="[% theme.head_font_color %]" size="+1">
! <b>Review User Detail</b>
! </font></td>
! </tr>
!
! <tr valign="top" bgcolor="[% theme.even_color %]">
! <td align="right"><b>Name</b></td>
! <td><font size="-1">[% user.first_name %] [% user.last_name %]</font></td>
! </tr>
! <tr valign="top" bgcolor="[% theme.odd_color %]">
! <td align="right"><b>E-Mail</b></td>
! <td><font size="-1"><a href="mailto:[% user.email %]">[% user.email %]</a></font></td>
! </tr>
! <tr valign="top" bgcolor="[% theme.even_color %]">
! <td align="right"><b>Login Name</b></td>
! <td><font size="-1">[% user.login_name %]</font></td>
! </tr>
! <tr valign="top" bgcolor="[% theme.odd_color %]">
! <td align="right"><b>Title</b></td>
! <td><font size="-1">[% user.title %]</font> </td>
! </tr>
! <tr valign="top" bgcolor="[% theme.even_color %]">
! <td align="right"><b>Notes</b></td>
! <td><font size="-1">[% user.notes %]</font> </td>
! </tr>
! <tr valign="top" bgcolor="[% theme.odd_color %]">
! <td align="right"><b>Member of Groups</b></td>
! <td><font size="-1">
! [% FOREACH group = group_list %]
! [% theme.bullet %] <a href="/Group/show/?group_id=[% group.group_id %]">[% group.name %]</a><br>
! [% END %]
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% theme.head_bgcolor %]"><td colspan="2"> </td></tr>
!
! </table>
! </td></tr>
! </table>
</div>
--- 1,45 ----
! [%- DEFAULT theme = OI.theme_properties -%]
<div align="center">
+ [%- PROCESS error_message -%]
+ [%- PROCESS status_message -%]
+
<h2 align="center">User Detail</h2>
<p>This screen has detail about a particular user record.</p>
! [% INCLUDE table_bordered_begin( table_width = '50%' ) -%]
! [%- count = 0 -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_text_row( label = 'Name',
! text = "$user.first_name $user.last_name" ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_text_row( label = 'E-Mail',
! text = "<a href='mailto:$user.email'>$user.email</a>" ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_text_row( label = 'Login Name',
! text = user.login_name ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_text_row( label = 'Title',
! text = user.title ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_text_row( label = 'Notes',
! text = user.notes ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_row_begin( label = 'Member of Groups' ) -%]
! <td>[% FOREACH group = group_list -%]
! [% group_url = OI.make_url( base = '/Group/show', group_id = group.group_id ) -%]
! [% theme.bullet %] <a href="[% group_url %]">[% group.name %]</a><br>
! [% END -%]
! </td></tr>
! [% INCLUDE table_bordered_end -%]
</div>
Index: user_form.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/template/user_form.tmpl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** user_form.tmpl 2001/09/14 12:23:00 1.4
--- user_form.tmpl 2001/10/31 13:58:01 1.5
***************
*** 1,90 ****
! [%- theme = OI.theme_properties -%]
! [% OI.comp( 'showerror', error_msg = error_msg ) %]
<div align="center">
-
- <h2 align="center">User Editing</h2>
! <p>This screen allows you to add edit information for a user or create a new one.</p>
! <form name="user" action="[% main_script %]/edit/" method="post"
! onsubmit="return data_check( this )">
! <table border="0" bgcolor="[% theme.border_color %]" width="50%"
! cellpadding="2" cellspacing="0">
! <tr><td>
! <table border="0" width="100%" bgcolor="[% theme.bgcolor %]"
! cellpadding="5" cellspacing="0">
! <tr valign="top" align="center" bgcolor="[% theme.head_bgcolor %]">
! <td colspan="2"><font color="[% theme.head_font_color %]" size="+1">
! [% action = ( user.id ) ? 'Edit a' : 'Create a New' -%]
! <b>[% action %] User</b>
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% theme.even_color %]">
! <td align="right"><b>Name</b> [% theme.required %]</td>
! <td><font size="-1">
! <input type="text" size="12" name="first_name" value="[% user.first_name %]">
! <input type="text" size="12" name="last_name" value="[% user.last_name %]">
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% theme.odd_color %]">
! <td align="right"><b>E-Mail</b> [% theme.required %]</td>
! <td><font size="-1">
! <input type="text" size="30" name="email" value="[% user.email %]">
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% theme.even_color %]">
! <td align="right"><b>Login Name</b> [% theme.required %]</td>
! <td><font size="-1">
! <input type="text" size="30" name="login_name" value="[% user.login_name %]">
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% theme.odd_color %]">
! <td align="right"><b>Password</b> [% IF NOT user.id %][% theme.required %][% END %]</td>
! <td><font size="-1">
! <input type="password" size="15" name="password" value=""><br>
! <input type="password" size="15" name="password_conf" value=""> (<em>confirm</em>)
! [%- IF user.id %]<br>
! <font color="#ff0000">If you do not type anything, the password will not be changed.</font>
[%- END -%]
! </font></td>
! </tr>
!
! <tr valign="top" bgcolor="[% theme.even_color %]">
! <td align="right"><b>Title</b></td>
! <td><font size="-1">
! <input type="text" size="30" name="title" value="[% user.title %]">
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% theme.odd_color %]">
! <td align="right"><b>Notes</b></td>
! <td><font size="-1">
! <textarea name="notes" cols="30" rows="3">[% user.notes %]</textarea>
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% theme.even_color %]">
! <td colspan="2" align="right"><font size="-1">
! <input type="submit" value="Modify">
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% theme.head_bgcolor %]"><td colspan="2"> </td></tr>
! </table>
! </td></tr>
! </table>
! <input type="hidden" name="user_id" value="[% user.id %]">
! </form>
</div>
--- 1,69 ----
! [%- DEFAULT theme = OI.theme_properties -%]
<div align="center">
! [%- PROCESS error_message -%]
! [%- PROCESS status_message -%]
! [%- is_new = ( user.id ) ? 0 : 1 -%]
! [%- action = ( is_new ) ? 'Create a New' : 'Edit a' -%]
! <h2>[% action %] User</h2>
! <p>Make necessary modifications to the user record below. If you do
! not enter a password it will not be changed.</p>
! <form name="user" action="/User/edit/" method="post">
! [% INCLUDE table_bordered_begin -%]
! [%- count = 0;
! valign = 'top'; -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_row_begin( label = 'Name', is_required = 1 ) -%]
! <td>[% INCLUDE form_text( name = 'first_name', size = 12,
! value = user.first_name ) -%]
! [% INCLUDE form_text( name = 'last_name', size = 12,
! value = user.last_name ) -%]
! </td></tr>
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'E-Mail', is_required = 1,
! name = 'email', size = 30,
! value = user.email ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'Login Name', is_required = 1,
! name = 'login_name', size = 30,
! value = user.login_name ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_row_begin( label = 'Password', is_required = is_new ) -%]
! <td>[% INCLUDE form_password( name = 'password', size = 15 ) -%] <br>
! [% INCLUDE form_password( name = 'password_conf', size = 15 ) -%]
! [%- UNLESS is_new -%]
! <br><font color="#ff0000" size="-1">
! If you do not type anything, the password will not be changed.
! </font>
[%- END -%]
! </td></tr>
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'Title',
! name = 'title', size = 30,
! value = user.title ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_textarea_row( label = 'Notes', name = 'notes',
! rows = 3, cols = 30, wrap = 'virtual',
! value = user.notes ) -%]
! [%- count = count + 1 -%]
! [%- INCLUDE form_submit_row( value = 'Modify' ) -%]
! [% INCLUDE table_bordered_end -%]
! [% INCLUDE form_hidden( name = 'user_id', value = user.id ) -%]
! </form>
</div>
Index: user_list.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/template/user_list.tmpl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** user_list.tmpl 2001/09/14 12:23:00 1.4
--- user_list.tmpl 2001/10/31 13:58:01 1.5
***************
*** 1,29 ****
- [%- theme = OI.theme_properties -%]
-
[%########################################
MACROS
########################################-%]
-
- [% MACRO header_cell( label ) BLOCK -%]
- <td><font color="[% theme.head_font_color %]" size="+1">[% label %]</font></td>
- [% END -%]
! [% MACRO user_row( user, count ) BLOCK -%]
! [%- SET row_color = theme.odd_color -%]
! [%- SET row_color = theme.even_color IF count mod 2 == 0 -%]
! <tr bgcolor="[% row_color %]">
! <td><font size="-1">[% user.login_name %]</font></td>
! <td><font size="-1">[% user.full_name %]</font> </td>
! <td><font size="-1">[% user.title %]</font> </td>
! <td><font size="-1">
! [%- IF user.email %]<a href="mailto:[% user.email %]">[% user.email %]</a>
! [%- ELSE %] [% END %]
! </font></td>
! <td><font size="-1">
! [% edit_url = OI.make_url( base = '/User/show/', user_id = user.id ) -%]
! [% remove_url = OI.make_url( base = '/User/remove/', user_id = user.id ) -%]
! <a href="[% edit_url %]">Detail</a><br>
! <a href="[% remove_url %]">Remove</a><br>
! </font></td>
</tr>
[% END -%]
--- 1,21 ----
[%########################################
MACROS
########################################-%]
! [% MACRO user_row BLOCK -%]
! [%- edit_url = OI.make_url( base = '/User/show/',
! user_id = user.id ) -%]
! [%- remove_url = OI.make_url( base = '/User/remove/',
! user_id = user.id ) -%]
! <tr bgcolor="[% PROCESS row_color %]" valign="top">
! <td>[% user.login_name %]</td>
! <td>[% user.full_name %] </td>
! <td>[% user.title %] </td>
! <td>[% IF user.email %]<a href="mailto:[% user.email %]">[% user.email %]</a>
! [%- ELSE %] [% END %]</td>
! <td><a href="[% edit_url %]">Detail</a>
! [%- IF user.tmp_security_level >= OI.security_level.write -%]
! <br><a href="[% remove_url %]">Remove</a>[% END -%]
! </td>
</tr>
[% END -%]
***************
*** 34,83 ****
########################################-%]
! [%- OI.comp( 'showerror', error_msg = error_msg ) -%]
!
! <div align="center">
!
! <table border="0" width="50%" cellpadding="5" cellspacing="0">
! <tr><td align="left">
! <h2 align="center">User Listing</h2>
!
! <p>Listed below are the users matching your criteria. You can get
! further detail about each one or perform other actions on them.</p>
! </td></tr></table>
!
! [% IF NOT user_iterator.has_next -%]
!
! <p align="center"><b>No users matched criteria.</b></p>
!
! [% ELSE -%]
!
! <table border="0" bgcolor="[% theme.border_color %]"
! cellspacing="0" cellpadding="2">
! <tr><td>
! <table border="0" width="100%" bgcolor="[% theme.bgcolor %]"
! cellpadding="5" cellspacing="0">
! <tr bgcolor="[% theme.head_bgcolor %]" align="center">
! [% header_cell( 'Username' ) -%]
! [% header_cell( 'Full Name' ) -%]
! [% header_cell( 'Title' ) -%]
! [% header_cell( 'E-Mail' ) -%]
! [% header_cell( 'Actions' ) -%]
! </tr>
[%- count = 0 -%]
! [% WHILE ( user = user_iterator.get_next ) -%]
! [% user_row( user, count ) -%]
[%- count = count + 1 -%]
[% END %]
! <tr bgcolor="[% theme.head_bgcolor %]"><td colspan="5"> </td></tr>
!
! </table>
! </td></tr>
! </table>
!
! [% END -%]
!
! </div>
--- 26,40 ----
########################################-%]
! [% INCLUDE table_bordered_begin -%]
! [% INCLUDE header_row( label = [ 'Username', 'Full Name', 'Title',
! 'E-Mail', 'Actions' ] ) -%]
[%- count = 0 -%]
! [% WHILE ( user = iterator.get_next ) -%]
! [% user_row() -%]
[%- count = count + 1 -%]
[% END %]
! [% INCLUDE table_bordered_end -%]
Index: user_search_form.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/template/user_search_form.tmpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** user_search_form.tmpl 2001/09/14 12:23:00 1.2
--- user_search_form.tmpl 2001/10/31 13:58:01 1.3
***************
*** 1,46 ****
! [%- theme = OI.theme_properties -%]
! [%########################################
! MACROS
! ########################################-%]
! [% MACRO search_row( label, field_name, count ) BLOCK -%]
! [%- SET row_color = theme.odd_color -%]
! [%- SET row_color = theme.even_color IF count mod 2 == 0 -%]
! <tr bgcolor="[% row_color %]">
! <td align="right"><b>[% label %]</b></td>
! <td><input type="text" name="[% field_name %]" size="25"></td>
! </tr>
! [% END -%]
! [%########################################
! DISPLAY START
! ########################################-%]
! [%- OI.comp( 'showerror', error_msg = error_msg ) -%]
! <h1 align="center">User Search</h2>
! <div align="center">
! <form action="/User/listing/" method="get">
! <table border="0" bgcolor="[% theme.border_color %]"
! cellspacing="0" cellpadding="2">
! <tr><td>
! <table border="0" bgcolor="[% theme.bgcolor %]"
! cellspacing="0" cellpadding="4">
! [% search_row( 'Login', 'login_name', 1 ) -%]
! [% search_row( 'First Name', 'first_name', 2 ) -%]
! [% search_row( 'Last Name', 'last_name', 3 ) -%]
! [% search_row( 'Email', 'email', 4 ) -%]
! <tr bgcolor="[% theme.odd_color %]" align="right">
! <td colspan="2"><input type="submit" value="Search"></td>
! </tr>
! </table>
! </td></tr>
! </table>
</form>
</div>
--- 1,38 ----
! [%- DEFAULT theme = OI.theme_properties -%]
! <div align="center">
! [%- PROCESS error_message -%]
! [%- PROCESS status_message -%]
! <h2>User Search</h2>
! <form action="/User/search/" method="GET">
! [% INCLUDE table_bordered_begin( table_width = '50%' ) -%]
! [%- count = 0 -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'Login', size = 25,
! name = 'login_name' ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'First Name', size = 25,
! name = 'first_name' ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'Last Name', size = 25,
! name = 'last_name' ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'Email', size = 25,
! name = 'email' ) -%]
!
! [%- count = count + 1 -%]
! [% INCLUDE form_submit_row( value = 'Search' ) -%]
+ [% INCLUDE table_bordered_end -%]
+
</form>
+
</div>
|
|
From: Chris W. <la...@us...> - 2001-10-31 13:57:39
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_user/template In directory usw-pr-cvs1:/tmp/cvs-serv1619/template Added Files: user_search_results.meta user_search_results.tmpl Log Message: added search results page that uses the listing as a component --- NEW FILE: user_search_results.meta --- name: user_search_results title: Results of user search package: base_user --- NEW FILE: user_search_results.tmpl --- [%- DEFAULT theme = OI.theme_properties -%] [%- PROCESS error_message -%] [%- PROCESS status_message -%] <div align="center"> <table border="0" width="50%" cellpadding="5" cellspacing="0"> <tr><td align="left"> <h2 align="center">User Listing</h2> <p>Listed below are the users matching your criteria. You can get further detail about each one or perform other actions on them.</p> </td></tr></table> [% IF user_iterator.has_next -%] [%- INCLUDE base_user::user_list( iterator = user_iterator ) -%] [% ELSE -%] <p align="center"><b>No users matched criteria.</b></p> [% END -%] </div> |
|
From: Chris W. <la...@us...> - 2001-10-31 12:57:31
|
Update of /cvsroot/openinteract/OpenInteract/template
In directory usw-pr-cvs1:/tmp/cvs-serv19363
Added Files:
form_password
Log Message:
added widget for password
--- NEW FILE: form_password ---
[%########################################
form_password( name, size, maxlength, field_label )
Generate a password field.
Defaults:
size = 20
maxlength = 50
########################################-%]
[%- DEFAULT size = 20;
DEFAULT maxlength = 50; -%]
[%- field_pre_label -%]
<input type="password" name="[% name %]"
size="[% size %]" maxlength="[% maxlength %]">
[%- field_label -%]
|
|
From: Chris W. <la...@us...> - 2001-10-30 23:47:53
|
Update of /cvsroot/openinteract/SPOPS/SPOPS In directory usw-pr-cvs1:/tmp/cvs-serv14391 Modified Files: HashFile.pm Log Message: doh! Index: HashFile.pm =================================================================== RCS file: /cvsroot/openinteract/SPOPS/SPOPS/HashFile.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** HashFile.pm 2001/10/30 23:46:50 1.14 --- HashFile.pm 2001/10/30 23:47:51 1.15 *************** *** 5,9 **** use strict; use Data::Dumper; - use File::Copy qw( cp ); use SPOPS; --- 5,8 ---- *************** *** 129,132 **** --- 128,132 ---- use strict; + use File::Copy qw( cp ); @SPOPS::TieFileHash::ISA = (); |
|
From: Chris W. <la...@us...> - 2001-10-30 23:46:53
|
Update of /cvsroot/openinteract/SPOPS/SPOPS
In directory usw-pr-cvs1:/tmp/cvs-serv14170
Modified Files:
HashFile.pm
Log Message:
update to always make a backup when a file is opened
Index: HashFile.pm
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/SPOPS/HashFile.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** HashFile.pm 2001/10/12 21:00:26 1.13
--- HashFile.pm 2001/10/30 23:46:50 1.14
***************
*** 4,9 ****
use strict;
- use SPOPS;
use Data::Dumper;
@SPOPS::HashFile::ISA = qw( SPOPS );
--- 4,10 ----
use strict;
use Data::Dumper;
+ use File::Copy qw( cp );
+ use SPOPS;
@SPOPS::HashFile::ISA = qw( SPOPS );
***************
*** 51,84 ****
my ( $self, $p ) = @_;
my $obj = tied %{ $self };
unless ( $obj->{perm} eq 'write' ) {
die "Cannot save $obj->{filename}: it was opened as read-only.\n";
}
unless ( $obj->{filename} ) {
! die "Cannot save data: the filename has been erased. Did you assign an empty hash to the object?\n";
}
! if ( -f "$obj->{filename}.backup" ) {
! unlink( "$obj->{filename}.backup}" ); # just to be sure...
}
if ( -f $obj->{filename} ) {
! rename( $obj->{filename}, "$obj->{filename}.backup" )
|| die "Cannot rename old file to make room for new one. Error: $!";
}
return undef unless ( $self->pre_save_action( $p ) );
my %data = %{ $obj->{data} };
$p->{dumper_level} ||= 2;
local $Data::Dumper::Indent = $p->{dumper_level};
! my $string = Data::Dumper->Dump( [ \%data ], [ 'data' ] );
eval { open( INFO, "> $obj->{filename}" ) || die $! };
if ( $@ ) {
! rename( "$obj->{filename}.backup", $obj->{filename} )
|| die "Cannot open file for writing (reason: $@ ) and ",
"cannot move backup file to original place. Reason: $!";
die "Cannot open file for writing. Backup file restored. Error: $@";
}
! print INFO $string;
close( INFO );
! if ( -f "$obj->{filename}.backup" ) {
! unlink( "$obj->{filename}.backup" )
! || warn "Cannot remove the old data file. It still lingers in $obj->{filename}.old....\n";
}
return undef unless ( $self->post_save_action( $p ) );
--- 52,92 ----
my ( $self, $p ) = @_;
my $obj = tied %{ $self };
+
unless ( $obj->{perm} eq 'write' ) {
die "Cannot save $obj->{filename}: it was opened as read-only.\n";
}
+
unless ( $obj->{filename} ) {
! die "Cannot save data: the filename has been erased. Did you assign ",
! "an empty hash to the object?\n";
}
!
! my $temp_filename = "$obj->{filename}.tmp";
! if ( -f $temp_filename ) {
! unlink( $temp_filename ); # just to be sure...
}
if ( -f $obj->{filename} ) {
! rename( $obj->{filename}, $temp_filename )
|| die "Cannot rename old file to make room for new one. Error: $!";
}
+
return undef unless ( $self->pre_save_action( $p ) );
+
my %data = %{ $obj->{data} };
$p->{dumper_level} ||= 2;
local $Data::Dumper::Indent = $p->{dumper_level};
!
eval { open( INFO, "> $obj->{filename}" ) || die $! };
if ( $@ ) {
! rename( $temp_filename, $obj->{filename} )
|| die "Cannot open file for writing (reason: $@ ) and ",
"cannot move backup file to original place. Reason: $!";
die "Cannot open file for writing. Backup file restored. Error: $@";
}
! print INFO Data::Dumper->Dump( [ \%data ], [ 'data' ] );
close( INFO );
! if ( -f $temp_filename ) {
! unlink( $temp_filename )
! || warn "Cannot remove the old data file. It still lingers in ($temp_filename)\n";
}
return undef unless ( $self->post_save_action( $p ) );
***************
*** 155,158 ****
--- 163,173 ----
my $data = undef;
if ( $file_exists ) {
+
+ # First create a backup...
+
+ cp( $filename, "${filename}.backup" );
+
+ # Then open up the file
+
open( PD, $filename ) || die "Cannot open ($filename). Reason: $!";
local $/ = undef;
|
|
From: Chris W. <la...@us...> - 2001-10-30 02:55:48
|
Update of /cvsroot/openinteract/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv14060
Modified Files:
FAQ
Log Message:
added HUP restart failure and edited slightly some of the other items
Index: FAQ
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/FAQ,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** FAQ 2001/10/17 12:09:19 1.11
--- FAQ 2001/10/30 02:55:45 1.12
***************
*** 10,13 ****
--- 10,26 ----
QQQQQQQQQQ
+ I installed a new package (using 'oi_manage apply_package') or
+ upgraded an existing package (using 'oi_manage upgrade_package') and
+ restarted Apache, but my changes aren't taking effect.
+
+ AAAAAAAAAA
+
+ OpenInteract (specifically, SPOPS) doesn't agree with a simple restart
+ (using '-HUP' or 'apachectl restart') of Apache. You have to stop
+ Apache completely, then start it back up.
+
+
+ QQQQQQQQQQ
+
When trying to run 'oi_manage install_sql' I see one of the following
messages:
***************
*** 72,75 ****
--- 85,89 ----
your 'conf/server.perl' file.
+
QQQQQQQQQQ
***************
*** 86,92 ****
Will apply the packages listed from the base installation directory to
! your site. (Remember that you also need to run 'install_sql' and
! 'install_template' to complete the trifecta.)
QQQQQQQQQQ
--- 100,107 ----
Will apply the packages listed from the base installation directory to
! your site. (Remember that you also need to run 'install_sql' to
! complete the task.)
+
QQQQQQQQQQ
***************
*** 123,126 ****
--- 138,142 ----
to let you know the settings it's using.
+
QQQQQQQQQQ
***************
*** 137,144 ****
following:
! local $R->db->{AutoCommit} = 0;
eval { $object_type_a->save };
if ( $@ ) {
! $R->db->rollback;
# throw error message and exit from procedure
}
--- 153,162 ----
following:
! my $db = $R->db( 'main ');
! local $db->{AutoCommit} = 0;
!
eval { $object_type_a->save };
if ( $@ ) {
! $db->rollback;
# throw error message and exit from procedure
}
***************
*** 146,155 ****
eval { object_type_b->save };
if ( $@ ) {
! $R->db->rollback;
# throw error message and exit from procedure
}
! $R->db->commit;
QQQQQQQQQQ
--- 164,174 ----
eval { object_type_b->save };
if ( $@ ) {
! $db->rollback;
# throw error message and exit from procedure
}
! $db->commit;
+
QQQQQQQQQQ
***************
*** 228,232 ****
problem went away upgrading to Apache 1.3.20.
! The problem is that it would not correctly parse lines like this:
RewriteRule ^/(.*) http://oi.server.com:8080/$1 [P]
--- 247,252 ----
problem went away upgrading to Apache 1.3.20.
! The problem seems to be that it would not correctly parse lines like
! this:
RewriteRule ^/(.*) http://oi.server.com:8080/$1 [P]
***************
*** 248,252 ****
-
QQQQQQQQQQ
--- 268,271 ----
***************
*** 281,285 ****
-
QQQQQQQQQQ
--- 300,303 ----
***************
*** 307,312 ****
/home/httpd/...)
- How come?
-
AAAAAAAAAA
--- 325,328 ----
***************
*** 323,327 ****
I edited a (news|classified|random) item and OpenInteract saved my
! changes but created a new one at the same time. What's up?
AAAAAAAAAA
--- 339,343 ----
I edited a (news|classified|random) item and OpenInteract saved my
! changes but created a new (and empty) record at the same time.
AAAAAAAAAA
***************
*** 361,364 ****
--- 377,381 ----
easier to capture by the static front-end proxy server.
+
QQQQQQQQQQ
***************
*** 383,393 ****
I'm getting some harsh aqua shades in background colors, row colors,
! etc. What's happening?
AAAAAAAAAA
Make sure you don't have a space between your pound and color
! declaration in the various theme color definitions. For instance, IE
! seems to interpret '# eeeeee' as '#00eeee'.
Similarly, if you don't chomp whitespace properly in a TT tag, you
--- 400,410 ----
I'm getting some harsh aqua shades in background colors, row colors,
! etc
AAAAAAAAAA
Make sure you don't have a space between your pound and color
! declaration in the various theme color definitions. For instance, MS
! Internet Explorer seems to interpret '# eeeeee' as '#00eeee'.
Similarly, if you don't chomp whitespace properly in a TT tag, you
***************
*** 401,404 ****
--- 418,422 ----
<...bgcolor="#00eeee">
+ Yuck-o.
==================================================
|
|
From: Chris W. <la...@us...> - 2001-10-30 02:25:11
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_page/OpenInteract/Handler
In directory usw-pr-cvs1:/tmp/cvs-serv910/pkg/base_page/OpenInteract/Handler
Modified Files:
Page.pm
Log Message:
fix the forbidden reference
Index: Page.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_page/OpenInteract/Handler/Page.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Page.pm 2001/10/29 14:48:26 1.9
--- Page.pm 2001/10/30 02:25:08 1.10
***************
*** 199,203 ****
if ( $@ =~ /^security/ ) {
my $admin_email = $R->CONFIG->{mail}{admin_email};
! return $class->_forbiden_message( $admin_email )
}
elsif ( $@ =~ /^access/ ) {
--- 199,203 ----
if ( $@ =~ /^security/ ) {
my $admin_email = $R->CONFIG->{mail}{admin_email};
! $R->throw({ code => 303 });
}
elsif ( $@ =~ /^access/ ) {
***************
*** 469,483 ****
return ( $active <= $now and $now <= $expires );
- }
-
-
- sub _forbidden_message {
- my ( $class, $mail ) = @_;
- return <<FORBID;
- <h2>Access Forbidden</h2>
- <p>You do not have access rights to view this page. Please e-mail the
- administrator at <a href="mailto:$mail">$mail</a> if you feel you have
- received this message in error.</p>
- FORBID
}
--- 469,472 ----
|
|
From: Chris W. <la...@us...> - 2001-10-30 02:25:10
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_page In directory usw-pr-cvs1:/tmp/cvs-serv910/pkg/base_page Modified Files: Changes package.conf Log Message: fix the forbidden reference Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_page/Changes,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Changes 2001/10/29 14:48:26 1.8 --- Changes 2001/10/30 02:25:07 1.9 *************** *** 1,4 **** --- 1,10 ---- Revision history for OpenInteract package base_page. + 0.27 Mon Oct 29 19:42:47 EST 2001 + + Didn't find the reference to _forbidden_page in + OI/Handler/Page.pm earlier because I'd misspelled the method + call -- doh! + 0.26 Mon Oct 29 10:01:52 EST 2001 Index: package.conf =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_page/package.conf,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** package.conf 2001/10/29 14:48:26 1.8 --- package.conf 2001/10/30 02:25:08 1.9 *************** *** 1,4 **** name base_page ! version 0.26 author Chris Winters <ch...@cw...> module File::Basename --- 1,4 ---- name base_page ! version 0.27 author Chris Winters <ch...@cw...> module File::Basename |
|
From: Chris W. <la...@us...> - 2001-10-30 02:24:42
|
Update of /cvsroot/openinteract/OpenInteract/OpenInteract/Template
In directory usw-pr-cvs1:/tmp/cvs-serv660/OpenInteract/Template
Modified Files:
Process.pm
Log Message:
always use () after a variable method call (5.6 didn't complain...)
Index: Process.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract/Template/Process.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Process.pm 2001/10/25 15:25:51 1.17
--- Process.pm 2001/10/30 02:24:39 1.18
***************
*** 184,188 ****
foreach my $block_class ( keys %{ $pkg->{template_block} } ) {
my $block_method = $pkg->{template_block}{ $block_class };
! my $item_blocks = eval { $block_class->$block_method };
foreach my $block_name ( keys %{ $item_blocks } ) {
$R->DEBUG && $R->scrib( 1, "Found template block ($block_name) in",
--- 184,188 ----
foreach my $block_class ( keys %{ $pkg->{template_block} } ) {
my $block_method = $pkg->{template_block}{ $block_class };
! my $item_blocks = eval { $block_class->$block_method() };
foreach my $block_name ( keys %{ $item_blocks } ) {
$R->DEBUG && $R->scrib( 1, "Found template block ($block_name) in",
|
|
From: Chris W. <la...@us...> - 2001-10-30 02:24:22
|
Update of /cvsroot/openinteract/OpenInteract/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv517/OpenInteract
Modified Files:
Utility.pm
Log Message:
-> instead of => (5.6 didn't complain about it...)
Index: Utility.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract/Utility.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Utility.pm 2001/10/28 02:41:00 1.4
--- Utility.pm 2001/10/30 02:24:19 1.5
***************
*** 79,83 ****
type => 'email',
system_msg => $@,
! extra => { %header_info, attachments -> $attachments } });
die $msg;
}
--- 79,83 ----
type => 'email',
system_msg => $@,
! extra => { %header_info, attachments => $attachments } });
die $msg;
}
|