Interchange

CVS log for interchange/lib/Vend/Data.pm

[BACK] Up to [Local Repository] / interchange / lib / Vend

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 2.68: download - view: text, markup, annotated - select for diffs
Tue Aug 12 22:02:57 2008 UTC (3 months, 1 week ago) by jon
Branches: MAIN
CVS tags: REL_5_7_1, HEAD
Diff to: previous 2.67: preferred, colored
Changes since revision 2.67: +3 -3 lines
Allow explicit manual table exports even when NoExportExternal is enabled.

This could be done from any invocation of Vend::Data::export_database,
but is here done only from the [backup-database] tag used in the admin.

Revision 2.67: download - view: text, markup, annotated - select for diffs
Mon May 5 15:14:00 2008 UTC (6 months, 2 weeks ago) by markj
Branches: MAIN
CVS tags: STABLE_5_6-root, STABLE_5_6-branch, REL_5_6_1, REL_5_5_3
Diff to: previous 2.66: preferred, colored
Changes since revision 2.66: +8 -3 lines
Extend set_slice() to allow control of upsert behavior.

Calls to set_slice() are forced to use the upsert model of data
manipulation.  This can be a highly desirable editing model, but it also
has disadvantages, particularly in the context of the 'set' and 'autoset'
form actions, which imply--but don't enforce--a distinction between
insert and update at the data-storage level.

The effects on insert can be particularly insidious, where one faces
having the assumed behavior on duplicate primary keys thwarted by a
surreptitious conversion to a SQL update. In such an instance, instead of
existing data being protected by a duplicate PK error, the extant record
is replaced by the data from the insert. Detecting this condition,
particularly on a large table, is virtually impossible.

While the results of an update-to-insert adjustment are more benign, it
still presents a nuisance if a strict update is intended. To correct it,
one merely needs to delete the newly created, unanticipated row, and such
behavior does not destroy existing data.

To enforce update or insert, set_slice()'s $key arg can be optionally
passed as an array ref, essentially replacing the existing call:

  set_slice($key,$fary,$vary)

with

  set_slice([$opt, $key],$fary,$vary)

where $opt->{dml} is set to the desired value. $opt as a hash ref is
used so that any possible future opt-style params can simply be loaded
into the existing calling structure.

Change details:

* Default behavior for set_slice() is 'upsert'. If you do nothing to
  your code or catalog, the behavior remains unchanged.

* $opt->{dml} can be 'insert', 'update', or anything else. If it's
  anything else, it has no specific behavior currently. It defaults the
  value 'upsert' just to be somewhat self-documenting and open up the
  possibility of behaviors based on that value in the future.

* Despite the decision to key it off of 'dml', this has no effect on
  deletes. Deletes have no ambiguous behavior, reflected in the fact that
  deletes have their own dedicated method.

* Change only has core impact when processing requests through
  Vend::Data::update_data(). However, any direct calls to set_slice() may
  avail themselves of the new feature simply by overloading the $key arg
  in the same fashion.

* Behavior of Vend::Data::update_data() can be in three modes,
  controllable by the new 'dml' pragma.

  + No pragma setting works in current mode, with upsert behavior.

  + Pragma 'dml=preserve' restricts inserts to insert-only, but allows
    the fall-through behavior from update to insert. As the name preserve
    implies, it means no existing data can be clobbered.

    The advantage to preserve is the easy use of set_slice() as a
    record-cloning operation. In the table editor, one can clone a
    record by simply changing the PK. Without this behavior, one must
    completely re-enter existing data to the new key's name to clone.

  + Pragma 'dml=strict' forces update or insert to only perform the
    requested action.

Revision 2.66: download - view: text, markup, annotated - select for diffs
Tue Mar 25 17:13:21 2008 UTC (7 months, 3 weeks ago) by jon
Branches: MAIN
CVS tags: REL_5_5_2
Diff to: previous 2.65: preferred, colored
Changes since revision 2.65: +2 -2 lines
Various minor UTF-8 changes.

Correct attribution of &Vend::CharSet::display_chars (which is from
perluniintro manpage).

Enable localization of an error string.

Match content type more tightly in 2 spots ("text" is only trustworthy
in the MIME major type, not minor, and even that may be a stretch).

Simplify request method matching in a few places for readability and a
(trivial) performance benefit.

Use conventional $c lexical instead of $g for catalog hashref.

Fix tab/space differences to match context.

Update copyrights of files changed in 2008.

Revision 2.65: download - view: text, markup, annotated - select for diffs
Wed Mar 12 20:13:31 2008 UTC (8 months, 1 week ago) by jon
Branches: MAIN
Diff to: previous 2.64: preferred, colored
Changes since revision 2.64: +5 -1 lines
Add new database feature AUTO_NUMBER_FILE.

This allows specifying a nonstandard location and/or filename for a table's
default counter file.

Can also be used to share a counter file across multiple tables.

Usage example in catalog.cfg:

    Database  area  AUTO_NUMBER_FILE  counters/generic.autonumber

Revision 2.64: download - view: text, markup, annotated - select for diffs
Sat Mar 8 20:57:21 2008 UTC (8 months, 1 week ago) by jon
Branches: MAIN
Diff to: previous 2.63: preferred, colored
Changes since revision 2.63: +1 -10 lines
Allow empty field changes to stick, fixing "(none)" image selections.

Fix by David Christensen <david@endpoint.com>.

Same problem as mentioned by Cameron Prince on interchange-users 2007-02-10,
but this fix covers more cases.

Revision 2.54.2.2: download - view: text, markup, annotated - select for diffs
Fri Mar 30 12:15:27 2007 UTC (19 months, 3 weeks ago) by pajamian
Branches: STABLE_5_4-branch
CVS tags: REL_5_4_3
Diff to: previous 2.54.2.1: preferred, colored; branchpoint 2.54: preferred, colored
Changes since revision 2.54.2.1: +3 -3 lines
New Free Software Foundation Address in headers of various files

Revision 2.63: download - view: text, markup, annotated - select for diffs
Fri Mar 30 11:39:44 2007 UTC (19 months, 3 weeks ago) by pajamian
Branches: MAIN
CVS tags: REL_5_5_1, DEB_5_5_1_1_1, DEB_5_5_1
Diff to: previous 2.62: preferred, colored
Changes since revision 2.62: +3 -3 lines
New Free Software Foundation Address in headers of various files

Revision 2.62: download - view: text, markup, annotated - select for diffs
Sat Feb 24 05:48:26 2007 UTC (20 months, 3 weeks ago) by jon
Branches: MAIN
Diff to: previous 2.61: preferred, colored
Changes since revision 2.61: +16 -6 lines
Add new catalog directives:

NoExport __TABLENAME__
NoExportExternal Yes

These prevent any export of some or all SQL tables to products/*.txt
from being done, to stop clutter in products/ from auto-export which
helps make the products/ directory nicer to use under version control.
Note that this makes the admin export function silently do nothing for
SQL tables, though it still works for GDBM tables.

With help from Mark Johnson <mark@endpoint.com>.

Revision 2.61: download - view: text, markup, annotated - select for diffs
Sat Feb 24 03:17:06 2007 UTC (20 months, 3 weeks ago) by jon
Branches: MAIN
Diff to: previous 2.60: preferred, colored
Changes since revision 2.60: +1 -2 lines
Remove redundant check, presumably a debugging leftover.

Revision 2.60: download - view: text, markup, annotated - select for diffs
Sat Dec 16 15:59:05 2006 UTC (23 months ago) by mheins
Branches: MAIN
Diff to: previous 2.59: preferred, colored
Changes since revision 2.59: +11 -2 lines
* Fix attribute-based pricing for options.

* Add ability to set price to zero with mv_price by checking for "FREE" value.
  Previously, the zero is returned and ignored for price chain purposes.

* Allow setting of values in data to "undef" in field by setting

	<input type="hidden" name="mv_data_undef:field" value="1">

Revision 2.59: download - view: text, markup, annotated - select for diffs
Wed Aug 9 13:56:16 2006 UTC (2 years, 3 months ago) by racke
Branches: MAIN
Diff to: previous 2.58: preferred, colored
Changes since revision 2.58: +2 -2 lines
really log name of non-existent database

Revision 2.58: download - view: text, markup, annotated - select for diffs
Wed May 17 16:36:47 2006 UTC (2 years, 6 months ago) by mheins
Branches: MAIN
Diff to: previous 2.57: preferred, colored
Changes since revision 2.57: +2 -2 lines
* Refine error message to possibly point to problem.

Revision 2.54.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 6 20:06:00 2006 UTC (2 years, 7 months ago) by jon
Branches: STABLE_5_4-branch
CVS tags: REL_5_4_2, REL_5_4_1
Diff to: previous 2.54: preferred, colored
Changes since revision 2.54: +2 -2 lines
Fix typo in sub call.

Revision 2.57: download - view: text, markup, annotated - select for diffs
Thu Apr 6 20:04:53 2006 UTC (2 years, 7 months ago) by jon
Branches: MAIN
Diff to: previous 2.56: preferred, colored
Changes since revision 2.56: +2 -2 lines
Fix typo in sub call.

Revision 2.56: download - view: text, markup, annotated - select for diffs
Wed Apr 5 14:42:19 2006 UTC (2 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.55: preferred, colored
Changes since revision 2.55: +3 -3 lines
* Add lockout to list of SpecialSub routines allowed.

* If user-configured lockout routine returns true, it replaces the
  current routine completely. If it returns false, the normal one
  is run as well.

* Move the logging out of Vend::Dispatch to the do_lockout routine, so
  that you can avoid the log entry if your user-configured routine handles
  the lockout.

* Make the number of seconds for robot reset adjustable from its
  current hardcoded 30:

  	Limit   lockout_reset_seconds

  Maybe that should be robot_reset_seconds, I don't know.

* Change use of $Vend::Cfg->{Limit}{member} to $::Limit->{member}. As
  Limit is used in iterative routines like chain_cost, this should
  improve performance.

Revision 2.55: download - view: text, markup, annotated - select for diffs
Mon Jan 30 17:33:55 2006 UTC (2 years, 9 months ago) by jon
Branches: MAIN
Diff to: previous 2.54: preferred, colored
Changes since revision 2.54: +2 -68 lines
Remove antiquated [sql] tag.

To be noted in UPGRADE document.

Revision 2.54: download - view: text, markup, annotated - select for diffs
Sun Oct 23 14:23:45 2005 UTC (3 years ago) by mheins
Branches: MAIN
CVS tags: STABLE_5_4-root, REL_5_4_0, REL_5_3_3, REL_5_3_2, DEB_5_3_0_20051028_1
Branch point for: STABLE_5_4-branch
Diff to: previous 2.53: preferred, colored
Changes since revision 2.53: +7 -1 lines
* Add logic to have AutoModifier work for matrix items. Only works
  for the non-table, non-foreign key call version, i.e.

  	  AutoModifier  modifier

		 or

  	  AutoModifier  modifier=field

  It will look in the mv_ib first, then the first then second
  products file, for both the code and the mv_sku.

  This might not be completely what would always be wanted, since
  it has the precedence:

  		mv_ib->code
  		mv_ib->mv_sku
  		products->code
  		products->mv_sku
  		variants->code
  		variants->mv_sku

  It is important in this case to make sure you have the table set in
  the item, as otherwise products->sku will shadow variants->code.

Revision 2.53: download - view: text, markup, annotated - select for diffs
Thu Sep 22 16:37:52 2005 UTC (3 years, 1 month ago) by mheins
Branches: MAIN
CVS tags: DEB_5_3_0_20051004_1
Diff to: previous 2.52: preferred, colored
Changes since revision 2.52: +18 -3 lines
* Improve ability of AutoModifier, make consistent in both places where
  it can be set.

* Current variations:

	AutoModifier  category
	AutoModifier  outboard:category
	AutoModifier  outboard:category:foreign

  all stay the same -- only difference is that :: is now accepted same as :.

* New variation:

	  AutoModifier attribute=table:column
	  AutoModifier attribute=table:column:foreign

  is accepted. This removes the requirement that the attribute be named
  the same thing as the table column.

* Added regression test that checks all of the above.

* Will look for existing documentation to update.

* Your regression tests will require a "rm products/products2.sql" to
  update the data for that table.

Revision 2.52: download - view: text, markup, annotated - select for diffs
Wed Aug 24 19:41:19 2005 UTC (3 years, 2 months ago) by jon
Branches: MAIN
Diff to: previous 2.51: preferred, colored
Changes since revision 2.51: +2 -2 lines
Removed duplicate test.

Revision 2.51: download - view: text, markup, annotated - select for diffs
Thu Jun 9 19:28:45 2005 UTC (3 years, 5 months ago) by mheins
Branches: MAIN
Diff to: previous 2.50: preferred, colored
Changes since revision 2.50: +3 -2 lines
* Don't read salestax.asc if in "multi" mode.

* Correct package of routine.

Revision 2.50: download - view: text, markup, annotated - select for diffs
Fri May 13 04:10:58 2005 UTC (3 years, 6 months ago) by mheins
Branches: MAIN
Diff to: previous 2.49: preferred, colored
Changes since revision 2.49: +15 -1 lines
* Change imagehelper routine and its accompanying Data.pm routine to
  allow it to rename the image to match a field name.

  Noticed when showing a new user the item input that they had no
  non-manual way to get the rightly named image up there -- of
  course they had saved their image with some long quote-filled
  name.

  If you set the extended.name_from_field to "sku", it will automatically
  rename "Some very long name, it's a Windows thing.jpg" to 00001.jpg (or
  whatever the SKU is).

Revision 2.49: download - view: text, markup, annotated - select for diffs
Thu May 12 17:54:37 2005 UTC (3 years, 6 months ago) by mheins
Branches: MAIN
Diff to: previous 2.48: preferred, colored
Changes since revision 2.48: +2 -2 lines
* Prevent a Global database from instantiating $C and screwing up configuration.

* Allow setting of no-import status within the table config instead of
  the action-at-a-distance of NoImport. Allows global database tables
  to control their own destiny.

Revision 2.48: download - view: text, markup, annotated - select for diffs
Sat Apr 30 15:09:58 2005 UTC (3 years, 6 months ago) by mheins
Branches: MAIN
Diff to: previous 2.47: preferred, colored
Changes since revision 2.47: +2 -1 lines
* We had been running without warnings so long, we had gotten a bit sloppy
  in our code in some places.

  Because we do lots of uninitialized hash member stuff with arrays
  of fields and $opt, it is basically unreasonable for us to run with
  the "use of uninitialized variable" warnings. Because we do a fair
  amount of numerical comparisons on empty string values, it seemed
  unreasonable to run with "string value in numeric gt" enabled.

  Also, because Safe, HTML::Entities, and some other modules have
  these checks enabled, page code is bound to have warnings issued
  no matter what you do.

  It seems better to run with some warnings enabled so that we can
  catch bad code practice.

  So I have made the code run without warnings prior to and after
  interpolate_html(), and turned off warnings by default in the
  page code.

  If it is desirable to turn on warnings for pages, you can use
  [pragma perl_warnings_in_page] and see warnings for that page
  (or by default if you put in catalog.cfg).

* In general these changes are:

	 no warnings qw(uninitialized numeric);

  in most pages.

* Add $::Pragma->{perl_warnings_in_page}.

* Remove defined checks when simple set tests will do.

* Streamline some code.

Revision 2.47: download - view: text, markup, annotated - select for diffs
Thu Apr 28 01:54:44 2005 UTC (3 years, 6 months ago) by mheins
Branches: MAIN
Diff to: previous 2.46: preferred, colored
Changes since revision 2.46: +5 -3 lines

* Various variable initializations and tests to avoid warnings.

Revision 2.46: download - view: text, markup, annotated - select for diffs
Sat Jan 1 00:09:12 2005 UTC (3 years, 10 months ago) by jon
Branches: MAIN
Diff to: previous 2.45: preferred, colored
Changes since revision 2.45: +2 -2 lines
Terminate a statement with a semicolon for standard style, even though it's
syntactically correct at the end of a block.

Revision 2.45: download - view: text, markup, annotated - select for diffs
Fri Dec 24 18:00:34 2004 UTC (3 years, 10 months ago) by jon
Branches: MAIN
Diff to: previous 2.44: preferred, colored
Changes since revision 2.44: +11 -10 lines
Optimization to item_price routine:

Don't worry about the database the item comes from unless using PriceField,
since it doesn't matter otherwise.

This allows pricing to work when a product isn't in ProductFiles as long as
the CommonAdjust can return a valid price.

Revision 2.44: download - view: text, markup, annotated - select for diffs
Thu Oct 7 00:10:01 2004 UTC (4 years, 1 month ago) by jon
Branches: MAIN
Diff to: previous 2.43: preferred, colored
Changes since revision 2.43: +14 -1 lines
Add a new database configuration parameter, POSTEXPORT, which allows
calling one or more subs or globalsubs after each time that database
is exported.

Sub is called with database name, exported filename (absolute path), and
an options hash consisting of the options given to the export call and
values for 'delim' and 'record_delim' for structuring the file pointed
to by filename.

For example, it could be used to send an email notification, make a log
file entry, or do postprocessing on the exported text file.

Written and contributed by Ethan Rowe <ethan@endpoint.com> (with a little
tweaking by me).

Revision 2.43: download - view: text, markup, annotated - select for diffs
Mon Jun 7 03:05:31 2004 UTC (4 years, 5 months ago) by mheins
Branches: MAIN
Diff to: previous 2.42: preferred, colored
Changes since revision 2.42: +2 -2 lines
( Continuation of previous changes to these files, inadvertently committed. )

* Spreadsheets can now do file upload, including those linked inside
  another table.

Revision 2.42: download - view: text, markup, annotated - select for diffs
Mon Jun 7 03:01:45 2004 UTC (4 years, 5 months ago) by mheins
Branches: MAIN
Diff to: previous 2.41: preferred, colored
Changes since revision 2.41: +82 -17 lines
* Allow table editor to set mv_return_table if not already set, ensures
  that a linked spreadsheet won't command the table upon return to the
  select page.

* Allow a field's restrict_allow to be set to control expansion of
  append/prepend values.

* Make ui_wizard_fields control when ui_data_fields not set. Used
  to always come from ui_data_fields.

Revision 2.41: download - view: text, markup, annotated - select for diffs
Fri Jun 4 06:17:16 2004 UTC (4 years, 5 months ago) by mheins
Branches: MAIN
Diff to: previous 2.40: preferred, colored
Changes since revision 2.40: +10 -2 lines
* Skip uploading blob files as well as standard {image,upload}helper
  files/filenames.

Revision 2.40: download - view: text, markup, annotated - select for diffs
Fri Jun 4 04:05:35 2004 UTC (4 years, 5 months ago) by mheins
Branches: MAIN
Diff to: previous 2.39: preferred, colored
Changes since revision 2.39: +11 -4 lines
* Improve self-contained database definitions by allowing field names
  to come directly from the CREATE_EMPTY_TXT parameter:

  	Database foo CREATE_EMPTY_TXT   code  description bar baz

  This prevents problems with later SQL "alter table ...." statements not
  being acknowleged by IC because the NAME parameter does not match the
  NAME array returned by DBI.

Revision 2.39: download - view: text, markup, annotated - select for diffs
Thu Jun 3 06:31:18 2004 UTC (4 years, 5 months ago) by mheins
Branches: MAIN
Diff to: previous 2.38: preferred, colored
Changes since revision 2.38: +19 -12 lines
* Add ability for Vend::Data::update_data to store filename
  and file size info in one upload. Adds the variable
  definitions:

  	mv_data_file_name_to_$name
  	mv_data_file_size_to_$name

  For instance, if you do:

	<INPUT TYPE=hidden NAME="mv_data_file_name_to_body" VALUE="filename">
	<INPUT TYPE=hidden NAME="mv_data_file_size_to_body" VALUE="size">
	<INPUT TYPE=hidden NAME="mv_data_file_field" VALUE="body">
	<INPUT TYPE=file NAME="body">

   the uploaded file would be stored to the "body" field, its
   name to "filename", and its size to "size".

   Size is a simple integer with all its implied limits. In
   actual practice HTTP server timeouts and browser file upload
   limits will ensure the value is large enough.

* Add new uploadblob widget with core and meta-editor support.

  If you have a BLOB field and want to upload files to it, select
  the "uploadblob=File upload to BLOB" widget. It will present
  a file upload widget, and provide the proper fields to do the
  upload.

  If you select the extended.size_to = <fieldname> option in
  the meta editor, the size of the uploaded file will be stored
  to <fieldname>. Ditto for extended.name_to, which stores the
  file name (minus prepending path) to <fieldname>.

  For example, you might do:

  	[display
		type=uploadblob
		name=body
		size_to=size
		name_to=filename
		]

	This will produce:

	<INPUT TYPE=hidden NAME="mv_data_file_name_to_body" VALUE="filename">
	<INPUT TYPE=hidden NAME="mv_data_file_size_to_body" VALUE="size">
	<INPUT TYPE=hidden NAME="mv_data_file_field" VALUE="body">
	<INPUT TYPE=file NAME="body">

* Add ability to define your widget types for display in the meta editor
  in the Variable UI_WIDGET_TYPES. Includes metadata formatting for
  the Preferences editor.

Revision 2.38: download - view: text, markup, annotated - select for diffs
Sun Apr 11 16:34:50 2004 UTC (4 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.37: preferred, colored
Changes since revision 2.37: +2 -2 lines
* Change MULTIPLE_KEYS to COMPOSITE_KEY for better intuitiveness.

Revision 2.37: download - view: text, markup, annotated - select for diffs
Sun Apr 11 05:05:49 2004 UTC (4 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.36: preferred, colored
Changes since revision 2.36: +15 -3 lines
* Add new Class DBI_CompositeKey which allows multiple-key tables to
  be used in Interchange in the majority of ways other tables are
  used.

  Setup is simple. Just use a normal DBI looking table, then
  add

    Database foo MULTIPLE_KEYS key1 key2 key3

  This implies:

    Database foo Class  DBI_CompositeKey

  If you have not already set up the table as a DBI type
  (i.e. "Database foo foo.txt dbi:mysql:foobase") then
  this will fail.

  You should definitely have a COLUMN_DEF for each key. CREATE_SQL
  or using NoImport works fine, too.

  If you want a unique constraint you have to add it. If you
  don't have unique set, you may get anomalous behavior.

  -- Keys are passed via arrays, hashes, or null-separation. For
     instance:

     [data table=foo col=value1 key.0=foo key.1=bar key.2=baz]

     [data table=foo col=value1 key.key1=foo key.key2=bar key.key3=baz]

     [data table=foo col=value1 key=` join "\0", qw/foo bar baz/`]

     All three of the above will return the same thing, as will:

         [perl tables=foo]
            my $db = $Db{foo};
            my @key = qw/foo bar baz/;
            my %key = (
                        key1 => 'foo',
                        key2 => 'bar',
                        key3 => 'baz',
                    );
            my $try1 = $db->field(\@key, 'value1');
            my $try2 = $db->field(\%key, 'value1');
            my $try3 = $db->field( join("\0", @key), 'value1');

            if($try1 eq $try2 and $try1 eq $try3) {
                return "Access methods returned same value.";
            }
            else {
                return "ERROR: Access methods returned differing values.";
            }
        [/perl]

   -- [import-fields table=foo] works, but the {cleanse} option is
      not allowed.

   -- [import table=foo ...] works.

   -- Exports work.

   -- Imports from text files work, i.e. removing .sql file.

   -- Table editor works.

   -- Flex-select works. There is not as yet a batch delete, but that
      should be possible in the future. "Edit keys in sequence" is unlikely
      to ever work.

   -- Autonumbering and AUTO_SEQUENCE are obviously moot.

   -- $db->set_slice(), $db->get_slice work. So does $db->delete_record().
      All use the same key types as other access methods.

   -- $db->set_row() works, but doesn't do the one-field insert behavior.
      Probably a plus. 8-) It should set _Default_ary, but that is not
      tested.

Revision 2.36: download - view: text, markup, annotated - select for diffs
Fri Apr 2 17:37:46 2004 UTC (4 years, 7 months ago) by mheins
Branches: MAIN
CVS tags: STABLE_5_2-root, STABLE_5_2-branch, REL_5_2_1, REL_5_2_0, REL_5_1_1, REL_5_1_0, DEB_5_2_1_1
Diff to: previous 2.35: preferred, colored
Changes since revision 2.35: +9 -8 lines
* Add ability to control directory creation and umask of uploaded files.

  Automatic creation of directory:

   [set mv_auto_create_dir]1[/set]

  The umask for creation operation:

   [set mv_create_umask]02[/set]

Revision 2.35: download - view: text, markup, annotated - select for diffs
Thu Mar 4 00:17:37 2004 UTC (4 years, 8 months ago) by mheins
Branches: MAIN
Diff to: previous 2.34: preferred, colored
Changes since revision 2.34: +6 -1 lines
* Prevent spurious Database error when in PreFork mode. While I am not
  certain, I think it is caused by the fake "mv_null" database that
  Vend::Table::Editor uses.

Revision 2.34: download - view: text, markup, annotated - select for diffs
Thu Feb 12 18:22:08 2004 UTC (4 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.33: preferred, colored
Changes since revision 2.33: +22 -6 lines
* Add ability to export only portions of tables based on a where= parameter.
  Only works for DBI tables at the current time.

  If the where parameter is a scalar, just passed as a "WHERE" clause,
  i.e.

  	  [export table=products where="prod_group='Ladders'"]

  You can pass anything that won't cause a syntax error, even including
  an "order by" or "limit".

  If you want to pass multiple things, or not worry about quoting,
  you can do:

  	[export table=products where.prod_group=Ladders]

  The normal caveats for hash parameters apply, i.e. you cannot
  do:

  	where.prod_group="[cgi foo]"

  You *can* do:

  	where.prod_group=`$Tag->cgi('foo')`

	or

	where.prod_group=`$CGI->{foo}`

  Normal DBI quoting is always done, so you don't include quotes.

Revision 2.33: download - view: text, markup, annotated - select for diffs
Tue Dec 9 11:05:41 2003 UTC (4 years, 11 months ago) by racke
Branches: MAIN
CVS tags: STABLE_5_0-root, STABLE_5_0-branch, REL_5_0_2, REL_5_0_1, REL_5_0_0_RC2, REL_5_0_0_RC1, REL_5_0_0, DEB_5_0_0_2
Diff to: previous 2.32: preferred, colored
Changes since revision 2.32: +2 -2 lines
Allow multiline values for [scratch mv_data_enable].

Revision 2.32: download - view: text, markup, annotated - select for diffs
Wed Nov 5 17:12:57 2003 UTC (5 years ago) by mheins
Branches: MAIN
Diff to: previous 2.31: preferred, colored
Changes since revision 2.31: +4 -4 lines
* Fix problem where intervening image fields were not being set empty
  on upload.

* Localize an error message.

Revision 2.31: download - view: text, markup, annotated - select for diffs
Tue Sep 9 23:45:32 2003 UTC (5 years, 2 months ago) by racke
Branches: MAIN
CVS tags: REL_4_9_9, DEB_4_9_8_20031014_1, DEB_4_9_8_20031010_1, DEB_4_9_8_20030911_1
Diff to: previous 2.30: preferred, colored
Changes since revision 2.30: +4 -5 lines
update_data: removed unused variables and
corrected variable references in debug statements

Revision 2.30: download - view: text, markup, annotated - select for diffs
Sat Aug 9 15:14:11 2003 UTC (5 years, 3 months ago) by mheins
Branches: MAIN
Diff to: previous 2.29: preferred, colored
Changes since revision 2.29: +1 -34 lines

* Remove extraneous POD entries.

Revision 2.29: download - view: text, markup, annotated - select for diffs
Wed Jun 25 16:38:17 2003 UTC (5 years, 4 months ago) by mheins
Branches: MAIN
CVS tags: DEB_4_9_8_20030706_1
Diff to: previous 2.28: preferred, colored
Changes since revision 2.28: +1 -3 lines
Various minor cleanup, prevents warnings on startup.

  * Remove extra meta_record routine and change references to
    UI::Primitive::meta_record to Vend::Table::Editor::meta_record.

  * Delete {Source} value from $Vend::Cfg to save memory.

  * Remove unused stub Vend::Data::dbref.

  * Change Vend::Util::dbref to be a simple pointer to
    Vend::Data::database_exists_ref. Remove extra "my $loc".

  * Remove improperly exported parse_locale routine from Vend::Util.
    (Another parse_locale in Vend::Config, and all calls in the code
     contain package reference.)

  * Update dont_warn() routine to only include need variables/handles.

  * Remove "prime" of sort routine in Vend::Search no longer necessary
    now that Perl 5.005 is not supported.

Revision 2.28: download - view: text, markup, annotated - select for diffs
Wed Jun 18 17:34:44 2003 UTC (5 years, 5 months ago) by jon
Branches: MAIN
CVS tags: REL_4_9_8, DEB_4_9_8_2
Diff to: previous 2.27: preferred, colored
Changes since revision 2.27: +3 -2 lines
The great copyright, email address, URL, and version update.

Revision 2.27: download - view: text, markup, annotated - select for diffs
Tue Apr 1 04:12:32 2003 UTC (5 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.26: preferred, colored
Changes since revision 2.26: +7 -8 lines

* Add new Vend::File module with minimal functions.

* Relocate following routines (and their subsidiaries) from Vend::Util:

	canonpath
	catdir
	catfile
	exists_filename
	file_modification_time
	file_name_is_absolute
	get_filename
	lockfile
	path
	readfile
	readfile_db
	set_lock_type
	unlockfile
	writefile

  Added stubs so that package-based calls to those routines will not
  break software.

* Added CatalogUser directive that allows setting in interchange.cfg
  of allowed username that is used for access to absolute-path names.

  	CatalogUser  foundation  joe
  	CatalogUser  reports     jane

  This sets the user for allowed_file() for further read/write checks
  based on username.

* Created allowed_file() routine and replaced all current inline checks
  for NoAbsolute with call to that routine. It behaves as:

  NoAbsolute is No: all files are accessible, always

  Allowed for read/write:
  	Path name is relative with no ..
  	Path name is absolute but in the catalog directory
  	Path name is absolute but in a TemplateDir

  Allowed for read:
	CatalogUser set to a valid username and file is readable by that user
	CatalogUser set to a valid username and file is readable by a group
	 containing that user

  Allowed for write:
	CatalogUser set to a valid username and file is writable by that user
	CatalogUser set to a valid username and file is writable by a group
	 containing that user

* Changed display_special_page so that special page entries with ../
  will not break things.

* TODO:

	-- Code read for open() calls.
	-- Code read for chmod() calls.
	-- Code read for unlink() calls.

* Passes all regression tests; takes an order on foundation; runs UI including
  file navigator.

Revision 2.26: download - view: text, markup, annotated - select for diffs
Mon Mar 31 15:42:36 2003 UTC (5 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.25: preferred, colored
Changes since revision 2.25: +2 -1 lines

* Prevent NOT NULL errors for data that is actually supposed to be defined.

Revision 2.25: download - view: text, markup, annotated - select for diffs
Fri Feb 28 18:26:49 2003 UTC (5 years, 8 months ago) by jon
Branches: MAIN
Diff to: previous 2.24: preferred, colored
Changes since revision 2.24: +6 -6 lines
Prevent internal server error if quantity pricing row cannot be found for
whatever reason.

Revision 2.24: download - view: text, markup, annotated - select for diffs
Wed Feb 12 03:59:12 2003 UTC (5 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.23: preferred, colored
Changes since revision 2.23: +20 -117 lines

* Major update to product options.

* Options are now modular in much the same way as Vend::Payment is.
  You can add an unlimited number of option types simply by dropping
  a module into Vend::Options.

* By default, the old 4.8 style options are in force, implemented
  with Vend::Options::Old48.

  If you add this to catalog.cfg (in etc/after.cfg in foundation):

  	OptionsEnable   option_type

  The "option_type" names a field in the products file which controls
  the option type. This enables new-style options.

  It can also be in a specific table and field, ala AutoModifier:

  	OptionsEnable   table:field

  Indeed, this is added to AutoModifer after catalog.cfg.

* There are two new-style options included:

	Vend::Options::Matrix
	Vend::Options::Simple

  These are equivalent to the current matrix and simple options.

* Options behavior is controlled in catalog.cfg by a locale-style
  multiple hash (ala UserDb or Route):

  	Options   Matrix   sort            o_sort,o_group
  	Options   Matrix   variant_table   my_variants

* To find and add a new option type, simply set something in
  catalog.cfg:

  	Options  MyOptions  table  my_options

  That will cause a require of Vend::Options::MyOptions.

* The matrix products have been moved to the "variants" table.

* The options table contains options for both Matrix and Simple types,
  but only fields for building those simple-type options (which are
  used to generate variants for Matrix). The followign fields
  have been removed from options:

	differential
	mv_shipmode
	o_enable
	o_exclude
	o_footer
	o_header
	o_include
	o_master
	o_matrix
	o_modular
	phantom
	volume
	weight

* The variants table is a subset of the fields in products.

* The admin page for each option style is defined in its
  admin_page routine, usually an include from inclued/Options/OptionType.

* size and color fields removed from products table, option_type added.

Revision 2.23: download - view: text, markup, annotated - select for diffs
Thu Feb 6 20:27:16 2003 UTC (5 years, 9 months ago) by jon
Branches: MAIN
Diff to: previous 2.22: preferred, colored
Changes since revision 2.22: +7 -5 lines
A few minor things:

* Have NonTaxableField check all ProductFiles tables for the field if
  needed, instead of just the one in mv_ib or the first ProductFiles
  table. This allows NonTaxableField to work with options when the base
  product has a nontaxable field, but the options table has no nontaxable
  field (as in Foundation). This should have no effect on people using
  NonTaxableField the standard way.

* Add option to product_common and item_common that allows an empty
  field to be returned. In effect this option means "give me the value
  of this field from the first ProductFiles table that has the field
  at all" instead of "give me the first true value from a ProductFiles
  table that has the field".

* Optimize item_common a bit by looking at each table only once.

Revision 1.13.4.10: download - view: text, markup, annotated - select for diffs
Sat Jan 25 22:21:27 2003 UTC (5 years, 9 months ago) by racke
Branches: LINUXIA
Diff to: previous 1.13.4.9: preferred, colored; branchpoint 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13.4.9: +1134 -151 lines
updated LINUXIA branch to 4.9 sources in order to use it as testbed again

Revision 2.0.2.8: download - view: text, markup, annotated - select for diffs
Fri Jan 24 06:51:52 2003 UTC (5 years, 9 months ago) by jon
Branches: STABLE_4_8-branch
CVS tags: REL_4_8_9, REL_4_8_8, REL_4_8_7
Diff to: previous 2.0.2.7: preferred, colored; branchpoint 2.0: preferred, colored
Changes since revision 2.0.2.7: +2 -2 lines
Update copyright dates.

Revision 2.22: download - view: text, markup, annotated - select for diffs
Thu Jan 23 05:00:16 2003 UTC (5 years, 9 months ago) by jon
Branches: MAIN
Diff to: previous 2.21: preferred, colored
Changes since revision 2.21: +27 -12 lines
* Support sparsely-populated quantity pricing tables.
* Fix bug in field name ranges in CommonAdjust where q99..q101 was handled
  as a Perl alphanumeric range q99, r00, r01, r02, etc. instead of
  q99, q100, q101.
* Add regression test for these changes.

Revision 2.0.2.7: download - view: text, markup, annotated - select for diffs
Wed Jan 22 01:39:16 2003 UTC (5 years, 10 months ago) by racke
Branches: STABLE_4_8-branch
Diff to: previous 2.0.2.6: preferred, colored; branchpoint 2.0: preferred, colored
Changes since revision 2.0.2.6: +2 -2 lines
merged changes 2.20 vs 2.21
+++ 2.21 +++
this should fix a longstanding bug where Interchange get stuck into
an infinite loop on startup in case of wrong SQL database access
information, which occurs on the second table maybe due to the
bad setting in DBI, please test this change

Revision 2.21: download - view: text, markup, annotated - select for diffs
Mon Dec 16 11:05:33 2002 UTC (5 years, 11 months ago) by racke
Branches: MAIN
CVS tags: REL_4_9_6
Diff to: previous 2.20: preferred, colored
Changes since revision 2.20: +2 -2 lines
this should fix a longstanding bug where Interchange get stuck into
an infinite loop on startup in case of wrong SQL database access
information, which occurs on the second table maybe due to the
bad setting in DBI, please test this change

Revision 2.20: download - view: text, markup, annotated - select for diffs
Fri Dec 13 21:35:29 2002 UTC (5 years, 11 months ago) by mheins
Branches: MAIN
Diff to: previous 2.19: preferred, colored
Changes since revision 2.19: +36 -11 lines
A number of minor changes to Vend::Data.

* Allow a database to spring into existence without a .txt file. TO
  do this, you define the field names in the NAME paramter.

      Database will_be_there  will_be_there.txt  __SQLDSN__
      Database will_be_there  NAME   code  field1 field2
      Database will_be_there  CREATE_EMPTY_TXT  1

  All it does is create the .txt file (or whatever the name is) from
  the value of NAME array. It does take delimiters into account.

  You must be just a bit careful, since if you then remove the .txt
  file it will of course recreate the table. Of course you should
  take that into account when setting this non-default parameter. 8-)

  This will allow some one-file configurations to be added to the
  system -- I guess it would be nice if you could define a default
  import, too. (TODO?)

* Allow autonumber for the linked-table behavior of update_data. Before,
  you couldn't autonumber because the determination of whether the data
  would be set was whether the key value is present. This allows
  you to set mv_data_qual=fieldname and have a non-empty value in
  that field determine whether to insert or not.

* Minor cleanup, including ensuring $obj->{DELIMITER} and $obj->{delimiter}
  match. I would remove one, but am too afraid of interaction with
  old configs.

Revision 2.19: download - view: text, markup, annotated - select for diffs
Tue Dec 10 20:09:43 2002 UTC (5 years, 11 months ago) by jon
Branches: MAIN
CVS tags: REL_4_9_5
Diff to: previous 2.18: preferred, colored
Changes since revision 2.18: +2 -2 lines
Remove unused variable.

Revision 2.18: download - view: text, markup, annotated - select for diffs
Tue Nov 26 15:17:32 2002 UTC (5 years, 11 months ago) by jon
Branches: MAIN
CVS tags: REL_4_9_4
Diff to: previous 2.17: preferred, colored
Changes since revision 2.17: +2 -2 lines
Remove unused variable.

Revision 2.0.2.6: download - view: text, markup, annotated - select for diffs
Tue Nov 26 03:21:10 2002 UTC (5 years, 11 months ago) by jon
Branches: STABLE_4_8-branch
Diff to: previous 2.0.2.5: preferred, colored; branchpoint 2.0: preferred, colored
Changes since revision 2.0.2.5: +3 -2 lines
Sweeping update of Akopia/Red Hat references, to prepare for 4.8 release
with current Interchange URLs and contact information.

Revision 2.17: download - view: text, markup, annotated - select for diffs
Sun Oct 6 00:03:34 2002 UTC (6 years, 1 month ago) by mheins
Branches: MAIN
Diff to: previous 2.16: preferred, colored
Changes since revision 2.16: +4 -2 lines
* Add database option:

	DatabaseDefault  HIDE_AUTO_FILES  1

  Result is to hide all .sql, .*dbm, and .autonumber files
  by putting a "." in front of them.

  I got sick of having the directory listing scroll off the
  screen.

  WARNING: If this is set after databases are imported, they
  will be overwritten! So do it at the beginning.

  I don't think this one should be recommended in the documentation...

Revision 2.16: download - view: text, markup, annotated - select for diffs
Mon Sep 16 23:06:31 2002 UTC (6 years, 2 months ago) by mheins
Branches: MAIN
Diff to: previous 2.15: preferred, colored
Changes since revision 2.15: +568 -22 lines
* Move most all code out of bin/interchange. The only routines
  that remain are:

		dontwarn
		version
		usage
		catch_warnings
		parse_options
		main_loop

   Once the initial startup for Interchange is done, this code
   is completely out of the picture.

* Create new Vend::Dispatch module which contains the bulk of the
  code removed from bin/interchange.

* Move the important update_data() subroutine to Vend::Data.

* Move the session-related routines to Vend::Session.

* Move the order-related routines do_order() and update_quantity()
  to Vend::Order.

* Change many ::uneval() calls to plain uneval() or Vend::Util::uneval().

* Remove various unused tags and routines....

Revision 2.15: download - view: text, markup, annotated - select for diffs
Sat Aug 10 02:30:26 2002 UTC (6 years, 3 months ago) by mheins
Branches: MAIN
CVS tags: REL_4_9_2
Diff to: previous 2.14: preferred, colored
Changes since revision 2.14: +2 -1 lines
* Patches to make instant database handling of delimited files work.

* Changed _file_security_scalar in Scan.pm to use the standard
  file_name_is_absolute() routine instead of homegrown check.

  Which exposed a rather nasty little fault in the logic there.

  	-- If the search type is db, and the basename of the source
	   file for the table does not match the table name, there is
	   a big problem. The table name will be transformed by this
	   routine, and the search will fail with a "foo non-existent
	   table" error.

  I don't think this has bitten very many people, because in
  practice most people name the file the same as the table, but
  it should be corrected. Unfortunately, we don't know the search
  type until after this is done.

  My idea is that we no longer be able to find the file name for
  a text search based on the table name. I doubt many people were
  intentionally using this feature, and all you have to do is
  pass "products.txt" on the fi= spec to solve the problem.

Revision 2.14: download - view: text, markup, annotated - select for diffs
Wed Aug 7 08:02:59 2002 UTC (6 years, 3 months ago) by mheins
Branches: MAIN
Diff to: previous 2.13: preferred, colored
Changes since revision 2.13: +53 -3 lines
* Add new "instant database", which allows you to build a database for
  editing or any other use by specifying a file name.

  The file name must be relative, even if NoAbsolute is not set, and
  it must end in .txt or .asc. (Add .csv?)

  Imported every time, of course, but only written when something
  has been changed (by flagging a _Dirty bit).

    [flag type=write table=Content_txt]
    [data include/menus/Content.txt page 001]

    [data table=include/menus/Content.txt col=page key=001 value="YES!"]
    [data include/menus/Content.txt page 001]

    [perl tables="Content_txt"]
        my $db = $Db{Content_txt};

        my $ary = $db->query('select code,page,name from Content_txt');

        my $count = 0;
        for(@$ary) {
            push @out, uneval($_) . "\n";
            $count++;
        }

        return join "\n", "Showed $count records in Content_txt.", @out;
    [/perl]

   All normal database operations seem to work.

* Fix a bug in escape_form that didn't unescape %NN parms.

Revision 2.13: download - view: text, markup, annotated - select for diffs
Fri Aug 2 11:44:55 2002 UTC (6 years, 3 months ago) by racke
Branches: MAIN
Diff to: previous 2.12: preferred, colored
Changes since revision 2.12: +9 -4 lines
these changes are made in order to get Shadow working with text databases

Revision 2.12: download - view: text, markup, annotated - select for diffs
Sun Jul 14 03:21:05 2002 UTC (6 years, 4 months ago) by jon
Branches: MAIN
CVS tags: REL_4_9_1
Diff to: previous 2.11: preferred, colored
Changes since revision 2.11: +15 -1 lines
Add two new utility functions useful with multiple ProductFiles:
product_row and product_row_hash do the same thing as product_field
except they return the entire row found.

(If I missed some other function that does the same thing, let me know.)

Revision 2.11: download - view: text, markup, annotated - select for diffs
Mon Jul 8 15:32:06 2002 UTC (6 years, 4 months ago) by mheins
Branches: MAIN
Diff to: previous 2.10: preferred, colored
Changes since revision 2.10: +2 -2 lines
* Fix bug where wrong value was used to select $Vend::Interplate::Db key
  in Safe mode.

Revision 2.0.2.5: download - view: text, markup, annotated - select for diffs
Thu Jun 27 22:38:24 2002 UTC (6 years, 4 months ago) by jon
Branches: STABLE_4_8-branch
CVS tags: REL_4_8_6, DEB_4_8_6_20021108_1
Diff to: previous 2.0.2.4: preferred, colored; branchpoint 2.0: preferred, colored
Changes since revision 2.0.2.4: +2 -2 lines
Update Andrew Wilcox's email address at his request.

Revision 2.10: download - view: text, markup, annotated - select for diffs
Thu Jun 27 22:24:10 2002 UTC (6 years, 4 months ago) by jon
Branches: MAIN
Diff to: previous 2.9: preferred, colored
Changes since revision 2.9: +2 -2 lines
Update Andrew Wilcox's email address at his request.

Revision 2.9: download - view: text, markup, annotated - select for diffs
Mon Jun 17 22:24:07 2002 UTC (6 years, 5 months ago) by jon
Branches: MAIN
Diff to: previous 2.8: preferred, colored
Changes since revision 2.8: +2 -2 lines
Big copyright date update. This will be the last time that Red Hat
copyright notices get updated en masse, since the bulk of new code will
very likely come from non-Red Hat employees.

Revision 2.8: download - view: text, markup, annotated - select for diffs
Sat May 25 13:27:58 2002 UTC (6 years, 5 months ago) by racke
Branches: MAIN
Diff to: previous 2.7: preferred, colored
Changes since revision 2.7: +9 -1 lines
initial checkin of the new Shadow database type - this is not
doing anything useful yet, but I want to give a heads up on that

Revision 1.13.4.9: download - view: text, markup, annotated - select for diffs
Mon Feb 18 20:22:35 2002 UTC (6 years, 9 months ago) by racke
Branches: LINUXIA
Diff to: previous 1.13.4.8: preferred, colored; branchpoint 1.13: preferred, colored
Changes since revision 1.13.4.8: +6 -3 lines
backported catch for missing database entry

Revision 2.7: download - view: text, markup, annotated - select for diffs
Tue Feb 5 01:33:11 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.6: preferred, colored
Changes since revision 2.6: +3 -3 lines
	* Fix problem with $Tag->display() called with null table, affecting
	  "wizard" mode.

	* Re-introduce "restrict" tag into Interchange, unintentionally
	  omitted when the great tag move was made.

	* Clean up of [sql ...] tag, which now becomes useful as a way
	  of doing [query list=1 ...].

	* Give proper encoding behavior to [display type=value ...]

	* Fix bad status code on PGP failure.

Revision 2.6: download - view: text, markup, annotated - select for diffs
Thu Jan 31 17:57:02 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.5: preferred, colored
Changes since revision 2.5: +24 -28 lines
	* Remove some debug, fix bad indentation.

Revision 2.0.2.4: download - view: text, markup, annotated - select for diffs
Thu Jan 24 05:07:01 2002 UTC (6 years, 9 months ago) by jon
Branches: STABLE_4_8-branch
CVS tags: STRONGHOLD_4_8_4_approx, REL_4_8_5, REL_4_8_4, DEB_4_8_5_20020527_1, DEB_4_8_3_20020306_1
Diff to: previous 2.0.2.3: preferred, colored; branchpoint 2.0: preferred, colored
Changes since revision 2.0.2.3: +2 -2 lines
Update version number and copyright year, to prepare for the eventual
day when we release version 4.8.4.

Revision 2.5: download - view: text, markup, annotated - select for diffs
Sat Dec 29 19:49:33 2001 UTC (6 years, 10 months ago) by mheins
Branches: MAIN
Diff to: previous 2.4: preferred, colored
Changes since revision 2.4: +49 -3 lines
* Add new MIRROR parameter for databases. This allows creation of a
  DBM or Memory mirror.

  Sequence is:

	1. Table is always imported at config time.
	2. Table is only imported once.
	3. Text file is not required, but should be set so export
	   can work properly and so there is a placeholder.

  A complete configuration is:

	  Database  products_mem  products_mem.txt  TAB
	  Database  products_mem  MIRROR  products
	  Database  products_mem  MEMORY  1

  MIRROR name is not set in stone yet, probably not apropos
  enough; suggestions are welcome.

  Benchmarks for 1000 separate (i.e. tag_data, no caching)
  accesses (repeated tries show these are representative):

	Doing products_mem:
	Class=MEMORY DSN=
	Data returned 247 bytes
	TIME=0.200

	Doing products:
	Class=DBI DSN=dbi:mysql:test_mfound
	Data returned 247 bytes
	TIME=0.670

	Doing alias_mem:
	Class=MEMORY DSN=
	Data returned 9 bytes
	TIME=0.180

	Doing alias:
	Class=DBI DSN=dbi:Pg:dbname=wikicms
	Data returned 9 bytes
	TIME=0.700

	Doing wiki_mem:
	Class=GDBM DSN=
	Data returned 400 bytes
	TIME=0.300

	Doing wiki_mem2:
	Class=MEMORY DSN=
	Data returned 400 bytes
	TIME=0.180

	Doing wiki:
	Class=DBI DSN=dbi:Pg:dbname=wikicms
	Data returned 400 bytes
	TIME=0.710

 Gains should be even bigger as no database connections are needed
 on a busy system.

Revision 2.4: download - view: text, markup, annotated - select for diffs
Fri Dec 28 17:55:44 2001 UTC (6 years, 10 months ago) by mheins
Branches: MAIN
Diff to: previous 2.3: preferred, colored
Changes since revision 2.3: +35 -1 lines
	* Add new experimental [PREFIX-common field] that returns common
	  data based on code then mv_sku. Sequence is:

	  	1. If mv_ib is set (i.e. item is ordered from a specific database)
		   then that is looked for first with item code.
		2. Other ProductFiles are scanned in order for code match.
	  	3. If mv_ib is set (i.e. item is ordered from a specific database)
		   then that is looked for with mv_sku (if existant).
		4. Other ProductFiles are scanned in order for mv_sku match.

	  In all cases, the data is returned if it has a length.

	  Example:

		products.txt:
	  	sku   description
		os28005	Trim Brush

		options.txt:
	  	sku   description
		os28005-CAM-BLK	Trim Brush, Camel Hair, Black
		os28005-CAM-WHT

		Cart:
		[
			{
				code => 'os28005-CAM-BLK',
				quantity => 1,
				mv_ib => 'options',
				mv_sku => 'os28005',
			},
			{
				code => 'os28005-CAM-WHT',
				quantity => 1,
				mv_ib => 'options',
				mv_sku => 'os28005',
			},
		]

		[item-list]
			FIELD [item-code]: [item-field description]
			COMMON [item-code]: [item-common description]
		[/item-list]

		Yields:

		    FIELD os28005-CAM-BLK: Trim Brush, Camel Hair, Black
		    COMMON os28005-CAM-BLK: Trim Brush, Camel Hair, Black

		    FIELD os28005-CAM-WHT:
		    COMMON os28005-CAM-WHT: Trim Brush

    * Add inventory check option for [item-options ...] tag. If the
	  item is a matrix option, the option will not be returned if
	  the quantity is less than 1.

	  Example:

	  		[item-options inventory=inventory::quantity]

Revision 2.3: download - view: text, markup, annotated - select for diffs
Thu Oct 25 23:31:03 2001 UTC (7 years ago) by jon
Branches: MAIN
Diff to: previous 2.2: preferred, colored
Changes since revision 2.2: +7 -2 lines
Prevent corruption of tab-delimited DB exports by filtering tabs to spaces.
Unfortunately any delimiter presents these kinds of problems, but few have
fairly safe default replacements like tab->space.

Also make a tiny optimization around $nuke checking.

Revision 2.0.2.3: download - view: text, markup, annotated - select for diffs
Thu Oct 25 23:26:06 2001 UTC (7 years ago) by jon
Branches: STABLE_4_8-branch
CVS tags: REL_4_8_3
Diff to: previous 2.0.2.2: preferred, colored; branchpoint 2.0: preferred, colored
Changes since revision 2.0.2.2: +7 -2 lines
Prevent corruption of tab-delimited DB exports by filtering tabs to spaces.
Unfortunately any delimiter presents these kinds of problems, but few have
fairly safe default replacements like tab->space.

Also make a tiny optimization around $nuke checking.

Revision 2.0.2.2: download - view: text, markup, annotated - select for diffs
Thu Oct 18 11:31:40 2001 UTC (7 years, 1 month ago) by racke
Branches: STABLE_4_8-branch
Diff to: previous 2.0.2.1: preferred, colored; branchpoint 2.0: preferred, colored
Changes since revision 2.0.2.1: +4 -1 lines
give an appropriate error message if a class couldn't be found

Revision 2.2: download - view: text, markup, annotated - select for diffs
Sat Oct 6 06:14:23 2001 UTC (7 years, 1 month ago) by mheins
Branches: MAIN
Diff to: previous 2.1: preferred, colored
Changes since revision 2.1: +4 -2 lines
	* Minor change to support ic:GDBM_File:directory DSN setting....

	* Optional for 4.8 branch.

Revision 2.1: download - view: text, markup, annotated - select for diffs
Wed Sep 26 14:16:28 2001 UTC (7 years, 1 month ago) by racke
Branches: MAIN
merged changes 2.0 vs 2.0.2.1

Revision 2.0.2.1: download - view: text, markup, annotated - select for diffs
Wed Sep 26 14:07:03 2001 UTC (7 years, 1 month ago) by racke
Branches: STABLE_4_8-branch
Diff to: previous 2.0: preferred, colored
Changes since revision 2.0: +6 -2 lines
use a better error message than
Can't call method "open_table" on an undefined value

Revision 1.13.4.8: download - view: text, markup, annotated - select for diffs
Tue Sep 11 11:00:08 2001 UTC (7 years, 2 months ago) by racke
Branches: LINUXIA
Diff to: previous 1.13.4.7: preferred, colored; branchpoint 1.13: preferred, colored
Changes since revision 1.13.4.7: +15 -1 lines
merged changes 1.17.2.20 vs 1.17.2.21

Revision 2.0: download - view: text, markup, annotated - select for diffs
Wed Jul 18 02:23:13 2001 UTC (7 years, 4 months ago) by jon
Branches: MAIN
CVS tags: STABLE_4_8-root, REL_4_8_2, REL_4_8_1, REL_4_7_7, REL_4_7_6, PRE_REL_4_8_0, DEB_4_8_1_2
Branch point for: STABLE_4_8-branch
Upping major version number after trunk/branch switch.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed Jul 18 01:56:44 2001 UTC (7 years, 4 months ago) by jon
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +349 -107 lines
Move DEV_4_7_0 development branch to repository trunk.

Revision 1.17.2.23: download - view: text, markup, annotated - select for diffs
Fri Jul 6 17:37:45 2001 UTC (7 years, 4 months ago) by heins
Branches: DEV_4_7_0
Diff to: previous 1.17.2.22: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.2.22: +3 -3 lines
Table/{DBI,Common}.pm, Data.pm, Config.pm:
	* Add INDEX capability for SQL databases -- uses CREATE INDEX template.

	* Change INDEX Database parameter to array type, adjusting routines
	  in Vend::Table::Common to handle for ASCII indexing.

Order.pm:

	* Add handling for encryptor type "none" in pgp_encrypt.

Util.pm:

	* Slightly change mime_type routine, no fuctional changes.

	* Fix type in violation handler in readin()

Revision 1.17.2.22: download - view: text, markup, annotated - select for diffs
Fri Jun 29 02:19:25 2001 UTC (7 years, 4 months ago) by jon
Branches: DEV_4_7_0
CVS tags: REL_4_7_5
Diff to: previous 1.17.2.21: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.21: +4 -7 lines
Update copyright notices and email addresses.
Standardize module headers and remove a few shebang lines.

Revision 1.17.2.21: download - view: text, markup, annotated - select for diffs
Tue Apr 24 15:30:34 2001 UTC (7 years, 6 months ago) by racke
Branches: DEV_4_7_0
CVS tags: REL_4_7_4, REL_4_7_3, REL_4_7_2
Diff to: previous 1.17.2.20: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.20: +15 -1 lines
changes to track product categories and complete order info

Revision 1.17.2.20: download - view: text, markup, annotated - select for diffs
Wed Apr 18 06:40:06 2001 UTC (7 years, 7 months ago) by heins
Branches: DEV_4_7_0
Diff to: previous 1.17.2.19: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.19: +1 -0 lines

New dynamic variable setup encompasses three things:

	1. New "DirConfig" directive that allows you to batch-set a bunch
	of variables from files. The syntax:

		DirConfig  <directive-name>  <directory-glob>

	<directive-name> is usually "Variable", but could be any hash-based
	directive. (No other standard directives currently make sense to set this
	way.)

	<directory-glob> is a filespec that could encompass multiple directories.
	Files are ignored.

	The directories are read for file *names* that contain only word characters,
	i.e. something that would be a valid Variable. (This alone might make
	it not suitable for other uses, but picking up the junk from the
	in-directory-backup-file people would be intolerable.)

	Then the contents of the file is used to set the variable of the
	file name.

	The source file name is kept in $Vend::Cfg->{DirConfig}{Variable}{VARNAME},
	for use if dynamic_variables Pragma is set.

	2. Pragma dynamic_variables enables dynamic updating of variables
	from files...

	If enabled, all @_VARIABLE_@ and __VARIABLE__ settings are checked
	first to see if the source file is defined. If there is a key
	present, even if its contents are blank, it is returned. Example: in
	the case of this catalog.cfg entry:

		DirConfig   Variable   templates/foundation/regions

	If the file NOLEFT_TOP is present at catalog config time, __VARIABLE__ will
	equal [include templates/foundation/regions/NOLEFT_TOP].

	3. ...as well as database. The file takes precedence, but if
	VariableDatabase is configured and there is a record existant
	with the key equal to the VARIABLE name, then it will be used.

This is probably very confusing, but will be necessary for the new template
manager I am working on. I can think of quite a few other uses as well....

Revision 1.17.2.19: download - view: text, markup, annotated - select for diffs
Mon Apr 16 00:25:52 2001 UTC (7 years, 7 months ago) by heins
Branches: DEV_4_7_0
Diff to: previous 1.17.2.18: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.18: +1 -1 lines
Very minor change, NWN. Use Vend::Cat instead of Vend::Cfg reference.

Revision 1.17.2.18: download - view: text, markup, annotated - select for diffs
Sun Apr 15 05:59:10 2001 UTC (7 years, 7 months ago) by heins
Branches: DEV_4_7_0
Diff to: previous 1.17.2.17: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.17: +2 -1 lines

  * Added Tie::ShadowHash to list of carried modules. We should add
    to Bundle::Interchange, but it hasn't changed for 3 years and the
	version we carry about should be OK. Using the "extra" method of
	distribution.

  * Cleanup of Vend::Server and scripts/interchange.PL (along with
    some other modules) to move IC closer to being thread-safe for
    server execution. This should make it fairly reasonable to
    start testing with the PreFork mode, which is pretty
    worthwhile.

	WARNING: This is a dangerous change. I have messed with the state of
	the global variables, and it is not at all inconceivable this will
	need to be backed out as a show-stopper is found. If you are relying
	on the code to any degree, I suggest you wait a while before making
	this update.

	Standard low traffic mode,
		MaxServers   5

	% /h/cgi-bin/nph-bench
	Doing 1 times, pages=blank, concurrency=-n 50 -c 5.
	BEGIN round 1
	gfound blank: Requests per second:    5.13
	mfound blank: Requests per second:    4.80
	pfound blank: Requests per second:    4.80
	END round 1


	RPC mode
		PreFork             Yes
		StartServers        5
		MaxRequestsPerChild 100

	Doing 1 2 3 times, pages=blank, concurrency=-n 50 -c 5.
	BEGIN round 1
	gfound blank: Requests per second:    37.94
	mfound blank: Requests per second:    38.88
	pfound blank: Requests per second:    35.69
	END round 1
	BEGIN round 2
	gfound blank: Requests per second:    36.10
	mfound blank: Requests per second:    37.04
	pfound blank: Requests per second:    21.21
	END round 2
	BEGIN round 3
	gfound blank: Requests per second:    27.92
	mfound blank: Requests per second:    34.84
	pfound blank: Requests per second:    30.92
	END round 3

	gfound=DBM
	mfound=MySQL
	pfound=PostGres

	Both are serving a page without ITL in it, which essentially measures
	overhead introduced by the IC server. Some of the variance in the second is
	due to having to re-fork servers once reaching MaxRequestsPerChild.

	Here are some times for a page which has only

		<XMP>
		[query list=1 sql="select * from products"][sql-code] [sql-param description] [sql-price]
		[/query]
		</XMP>

	Without prefork:
		Doing 1 times, pages=dbtest, concurrency=-n 50 -c 5.
		BEGIN round 1
		gfound dbtest: Requests per second:    2.54
		mfound dbtest: Requests per second:    2.46
		pfound dbtest: Requests per second:    1.79

	With prefork:
		Doing 1 times, pages=dbtest, concurrency=-n 50 -c 5.
		BEGIN round 1
		gfound dbtest: Requests per second:    4.23
		mfound dbtest: Requests per second:    4.36
		pfound dbtest: Requests per second:    2.51
		END round 1

	All are measured on my 800MHz Athlon with IDE. Sessions are zeroed before
	each run, and a new session is created every time.

	Postgres is consistently slower than MySQL and GDBM in these cases. I
	did the same query using Benchmark, and it is obvious the DB takes up
	much of the time.

Revision 1.17.2.17: download - view: text, markup, annotated - select for diffs
Mon Apr 9 06:22:49 2001 UTC (7 years, 7 months ago) by heins
Branches: DEV_4_7_0
Diff to: previous 1.17.2.16: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.16: +12 -6 lines

  * Fix chained_cost bug where key was improperly read as an
    attribute, causing zero pricing for gift_cert in Foundation
    demo.

Revision 1.17.2.16: download - view: text, markup, annotated - select for diffs
Wed Apr 4 04:12:15 2001 UTC (7 years, 7 months ago) by jon
Branches: DEV_4_7_0
Diff to: previous 1.17.2.15: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.15: +2 -2 lines
Change second chained cost levels limit check to use new Limit directive,
as requested on the mail list:

http://developer.akopia.com/archive/interchange-users/2000/msg06847.html
http://developer.akopia.com/archive/interchange-users/2001/msg02996.html

Tested, but if there's some hidden problem I missed, please back out the
change.

Revision 1.17.2.15: dow