Permalink
Commits on Feb 24, 2010
  1. Update WHATSNEW

    pajamian committed Feb 24, 2010
  2. Correct RobotLimit comments in catalog.cfg.

    pajamian committed Feb 24, 2010
    Correct comments in catalog.cfg for Limit robot_expire.
    Add comments for Limit ip_session_expire.
Commits on Jan 5, 2010
Commits on Oct 23, 2009
  1. Fixed bug that causes options to not show in some places.

    pajamian committed Oct 23, 2009
    This removes the checks for the o_enable field in the master options table
    record which we no longer write to the table for new options from etc/report,
    etc/receipt.html and etc/mail_receipt.  The check has been replaced with a check
    for the option_type field in the products table.  Note that option_type is
    actually hard-coded in this instance rather than checking
    $Config->{OptionsEnable} as the hard coding is much more efficient.  It might
    pay to set this field name in a catalog variable, though, instead.
Commits on Sep 30, 2009
  1. Get rid of CVS tags.

    pajamian committed Sep 30, 2009
Commits on Sep 15, 2009
  1. Fix typo.

    pajamian committed Sep 15, 2009
  2. flypage SpecialSub changes.

    pajamian committed Sep 15, 2009
    * Revert behavior in the case where the return value is a hashref.
    
    * A return value of undef explicitly states that we should not process a
      flypage.
    
    On 08/31/2009 01:54 PM, Mike Heins wrote:
    > Quoting Peter (peter@pajamian.dhs.org):
    >> On 08/31/2009 12:01 PM, Mike Heins wrote:
    >>> Quoting Jon Jensen (jon@endpoint.com):
    >>>> It looks more reasonable to me than the old code, but the behavior doesn't
    >>>> quite look compatible. Before, $base could be assigned an arbitrary result
    >>>> hashref and thus could be used for a different kind of on-the-fly product,
    >>>> but now it seems the product code has to actually exist in a real
    >>>> database.
    >>> Good point.
    >>>
    >>>> I am not using that feature and don't object to the change, but I thought
    >>>> I'd point out the different behavior.
    >>> Now that I think about it, it was designed to handle OnFly products so the
    >>> change doesn't make sense.
    >> Ok, well that's why I asked.  How about we keep the old code if the
    >> return is a hashref, but if it's just a text scalar which contains a sku
    >> then get $base from product_code_exists_ref()?
    >
    > I think that works.
    >
    >> Also just to give an explicit way to say, "don't display a flypage for
    >> this" a return of undef could result in the flypage being skipped as
    >> if the sku doesn't exist?
    >
    > Yes.
Commits on Sep 13, 2009
  1. Merge branch 'master' of git://github.com/interchange/interchange

    pajamian committed Sep 13, 2009
    Conflicts:
    	WHATSNEW-5.7 ... MANUALLY RESOLVED
  2. Remove bloat that duplicates %z functionality.

    pajamian committed Sep 13, 2009
    On 09/12/2009 09:26 PM, Mike Heins wrote:
    > Quoting Peter (peter@pajamian.dhs.org):
    >> Incidentally why the mess of code in Util.pm to get the same result that
    >> %z would give anyways?
    >
    > Probably because I was stupid when I wrote it, and didn't understand what
    > %z did. Or I did it before %z became standard.
    >
    > It should be changed.
Commits on Sep 1, 2009
  1. Fix "my" scoping bug that was preventing ncheck_category from working…

    pajamian committed Sep 1, 2009
    …. I just
    
    removed $o alltogether as it's not needed.
Commits on Aug 28, 2009
  1. New area_page SpecialSub.

    pajamian committed Aug 28, 2009
    New area_page SpecialSub that allows you to change the page name passed to the
    [area] tag before the tag processes the page name.
  2. flypage SpecialSub fix for non-existent SKUs.

    pajamian committed Aug 28, 2009
    If the flypge SpecialSub returned a non-existent SKU then a blank flypage would
    be displayed (with no data).  This is now fixed so that there is no difference
    to what happens without a SpecialSub.
Commits on Aug 15, 2009
  1. Update WHATSNEW-5.7 file for recent fix to compile_link.

    pajamian committed Aug 15, 2009
    Update WHATSNEW-5.7 file for recent fix to compile_link.
  2. Don't ignore case of passed options to compile_link.

    pajamian committed Aug 15, 2009
    compile_link was confusing the -s socketfile option with the new -S status
    because Getopt::Long ignores option case by default.  This fixes the problem by
    passing the no_ignore_case config parameter to Getopt::Long.
Commits on Jul 20, 2009
  1. Do not specify a default charset if none is passed via MV_HTTP_CHARSET.

    pajamian committed Jul 20, 2009
    Do not specify a default charset if none is passed via MV_HTTP_CHARSET.
    Thanks to Raymond Cheng <rayonnet@hotmail.com> for pointing out the regression
    caused by this.
Commits on Jul 1, 2009
Commits on Jun 24, 2009
  1. Fix pod

    pajamian committed Jun 24, 2009
    Fix pod in BusinessOnlinePayment.pm.  Thanks to Rene Hertell for pointing out
    the problem and Gert van der Spoel for providing the fix.
Commits on Jun 15, 2009
  1. Fixed [convert-date] regression as reported by Marty Tennison.

    pajamian committed Jun 15, 2009
    Fixed regression in [convert-date] that caused it to display Sunday for every
    day of the week if a raw date was passed and the adjust attribute was not.
    Thanks to Marty Tennison <marty@dripdepot.com> for reporting the bug.
Commits on May 20, 2009
  1. New user_merge specialsub is run from the [user-merge] usertag. Argum…

    pajamian committed May 20, 2009
    …ents
    
    passed to the sub are: ($from_user, $from_urec, $to_user, $to_urec, $udb, $tdb)
    with the following values:
    
    $from_user - The username of the user being merged from.
    $from_urec - Hashref of columns in the userdb table for the user being merged
                 from.
    $to_user   - The username of the user being merged to.
    $to_urec   - Hashref of columns in the userdb table for the user being merged
                 to.  Any changes made to this hashref will be recorded back into
                 the userdb for this user.
    $udb       - $db object for the userdb table.
    $tdb       - $db object for the transactions table.
    
    The return value should be false to indicate that normal processing of the merge
    should continue as normal for this from user (continue on to merge carts and
    transactions) or true to indicate that no further processing should be done for
    this user (do not merge the carts or transactions).  A false return value will
    also cause any changes to $to_urec to be recorded into the userdb for the to
    user at the conclusion of the merge.  Note that if there are multiple from users
    then this specialsub will be run for each of the from users.
    
    Example:
    
    SpecialSub user_merge user_merge_sub
    Sub user_merge_sub <<EOS
    sub {
    	my ($from_user, $from_urec, $to_user, $to_urec, $udb, $tdb) = @_;
    
    	# Copy first and last name over from from user:
    	$to_urec->{fname} = $from_urec->{fname};
    	$to_urec->{lname} = $from_urec->{lname};
    
    	# False return value tells the [user-merge] tag to save the new $to_urec
    	# structure off as well as to continue with normal processing of the
    	# merge.
    	return;
    }
    EOS
  2. MaxQuantity fixes:

    pajamian committed May 20, 2009
    * A null or non-numerical entry in the table(s) for the maxquantity field should
      result in no maximum quantity enforcement for that product.
    
    * Remove redundant code for fetching the quantity from the table(s).
    
    * Fix instance where two DB hits are used to fetch one value.
    
    * Get rid of goto.
    
    * Basically a rewrite of the correspondign block of code.
Commits on May 1, 2009
  1. * New adjust_time() function allows time adjustment based on secs, mi…

    pajamian committed May 1, 2009
    …ns, hours,
    
      days, weeks, months and years.  Also can string multiple adjustments together
      and compensate for daylight savings time changes over the adjustment period.
    
      This sub (in Util.pm) accepts up to three arguments.  The first (required)
      argument is the adjustment to be made and is a signed number followed by one
      of seconds, minutes, hours, days, weeks, months or years (these can be
      abbreviated).  The second optional argument is a unixtime to be adjusted and
      defaults to the current time.  If the third argument is true then the
      resulting time will be compensated for any daylight savings time differences.
      The sub uses POSIX::mktime() to do the conversions and so does not come with a
      new module requirement for Interchange.
    
    * _set_acl() in UserDB.pm now uses adjust_time() instead of time_to_seconds().
    
    * [pay-cert] tag now uses the new adjust_time() function instead of the older
      time_to_seconds().
    
    * [component], [convert-date] and [css] now use the new adjust_time() function
      instead of the older time_to_seconds().
    
    * [convert-date] now has new compensate_dst argument that when set to 1 will
       compensate the adjusted time for daylight savings time changes (it basically
       passes 1 as the third argument to adjust_time()).
    
    * fixed bug in [convert-date] that skewed the time by one hour if the starting
      date was during daylight savings time and an adjustment was made.
    
    * [time] now uses adjust_time() instead of the older time_to_seconds().  There
      is also a new compensate_dst attribute that when set to 1 will compensate the
      adjusted time for daylight savings time changes (it basically passes 1 as the
      third argument to adjust_time()).
    
    Following are examples that help to illustrate all of the above new features.
    Note that many of the examples may require adjustment depending on your local
    time zone and locale settings:
    
    Code:
    <pre>
    Current time: [time]%c[/time]
    +5 hours: [time adjust="+5 hours"]%c[/time]
    +5 years: [time adjust="+5 years"]%c[/time]
    -8.3 months: [time adjust="-8.3 months"]%c[/time]
    +2.6 days: [time adjust="+2.6 days"]%c[/time]
    +7.7 months: [time adjust="+7.7 months"]%c[/time]
    +7 months: [time adjust="+7 months"]%c[/time]
    +7 months (compensate_dst): [time adjust="+7 months" compensate_dst=1]%c[/time]
    +5: [time adjust="+5"]%c[/time]
    -500 hours=1: [time adjust="-500" hours=1]%c[/time]
    hours=+500: [time hours=+500]%c[/time]
    +500: [time adjust="+500"]%c[/time]
    +5 years, 6 months, 3 days, -4 hours, 7 minutes (compensate_dst): [time adjust="+5 years, 6 months, 3 days, -4 hours, 7 minutes" compensate_dst=1]%c[/time]
    
    duration filter:
    [cgi name=start_date set=200502120800 hide=1]
    [cgi name=offset set="12 hours 10 mins" hide=1]
    20050212201000: [filter duration.start_date.offset][/filter]
    20050212200500: [filter duration.-dummy.12.hours.5.mins]200502120800[/filter]
    
    convert-date tag:
    200807151600: [convert-date adjust="+6 months" format="%c"]200807151600[/convert-date]
    200807151600 (compensate_dst): [convert-date adjust="+6 months" format="%c" compensate_dst=1]200807151600[/convert-date]
    </pre>
    
    
    Results:
    Current time: Fri May  1 05:40:47 2009
    +5 hours: Fri May  1 10:40:47 2009
    +5 years: Thu May  1 05:40:47 2014
    -8.3 months: Fri Aug 22 22:28:47 2008
    +2.6 days: Sun May  3 20:04:47 2009
    +7.7 months: Tue Dec 22 21:28:46 2009
    +7 months: Tue Dec  1 04:40:47 2009
    +7 months (compensate_dst): Tue Dec  1 05:40:47 2009
    +5: Fri May  1 10:40:47 2009
    -500 hours=1: Fri Apr 10 09:40:47 2009
    hours=+500: Fri May 22 01:40:47 2009
    +500: Fri May  1 10:40:47 2009
    +5 years, 6 months, 3 days, -4 hours, 7 minutes (compensate_dst): Tue Nov  4 01:33:47 2014
    
    duration filter:
    
    
    20050212201000: 20050212201000
    20050212200500: 20050212200500
    
    convert-date tag:
    200807151600 +6 months: Thu 15 Jan 2009 03:00:00 PM PST
    (compensate_dst): Thu 15 Jan 2009 04:00:00 PM PST
Commits on Mar 16, 2009
  1. Added SourcePriority catalog directive:

    pajamian committed Mar 16, 2009
    SourcePriority <source_list>
    
    <source_list> is a prioritized list of cgi variables to get the source
    (affiliate) name from.  Can also include the following:
    
    mv_pc - has the current special casing of mv_pc, (ie RESET is special as
    are values that contain only digits).
    
    cookie-foo check the cookie with the foo label.
    
    session - stop here if session already exists, do not check any further
    variables.
    
    session-foo - stop here if foo session variable is set.
    
    Default: SourcePriority mv_pc mv_source
    
    Examples:
    
    Check the MV_SOURCE cookie for an affiliate name as well as the other defaults:
    SourcePriority mv_pc mv_source cookie-MV_SOURCE
    
    ...as above, but you don't want your affiliates using mv_pc:
    SourcePriority mv_source cookie-MV_SOURCE
    
    Check the cgi variable affid instead:
    SourcePriority affid
    
    Say you send affiliate traffic to other sites, and you don't want
    those sites to get credit for sales if a customer follows a banner from
    them back to your site:
    SourcePriority session mv_pc mv_source
    
    If you want affiliates who use the specialsource cgi variable instead of
    mv_source to get special treatment and can override customers who
    already have sessions:
    SourcePriority specialsource session mv_pc mv_source
    
    If you want to allow affiliates to get credit if there is a
    session but only if no other affiliate is already set:
    SourcePriority session-source mv_pc mv_source
Commits on Oct 24, 2008
  1. Fix vulnerability where a string passed in the mv_order_item CGI vari…

    pajamian committed Oct 24, 2008
    …able is
    
    displayed verbatim without any input sanitation if there is a valid sku in
    mv_sku.  Thanks to Mat from Bibliopolis for discovering and reporting the
    vulnerability.
Commits on Aug 13, 2008
  1. Provide reasonable defaults for shipping mode and country at checkout…

    pajamian committed Aug 13, 2008
    … to avoid "not enough information" errors.
Commits on Apr 23, 2008
  1. Fixed bug where previous rows values were left in $Row if [loop] is i…

    pajamian committed Apr 23, 2008
    …terated with [PREFIX-next].
Commits on Mar 4, 2008
  1. Fix closing </b> tag

    pajamian committed Mar 4, 2008
Commits on Jan 4, 2008
  1. Fix typo

    pajamian committed Jan 4, 2008