Up to [Local Repository] / interchange / code / Filter
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Fix incorrect license in headers GPL v2 -> GPL v2 "or later". Update copyrights.
Fix incorrect license in headers GPL v2 -> GPL v2 "or later". Update copyrights.
Big copyright and version number update to prepare for 5.3.2 release.
* Add Stefan's suggested Visibility modification for CodeDef options.
By default the visibility is public.
It wants something like:
codedef:JavaScriptCheck
Will return all public Descriptions.
codedef:JavaScriptCheck:private -- return public and private.
codedef:JavaScriptCheck:private,admin -- return public,private,admin
If Visibility is "with Foo::Bar", it checks to see if $Foo::Bar::VERSION
is true and returns the option if it is.
* Create routine to automatically select Routine for certain type of
CodeDef. Currently there are many separate methods of doing that.
This one prefers local over global, and is called with:
codedef_routine($type, $name);
For instance, codedef_routine('OrderCheck', 'multistate') will
return $Vend::Cfg->{CodeDef}{OrderCheck}{multistate} if it exists,
otherwise returns $Global::CodeDef->{OrderCheck}{multistate}.
* Modify Form.pm to use this for JavaScriptCheck. More will be
added.
* Modify filters to add private Visibility for non-mainstream filters.
* Modify meta editor to use this.
* Add descriptions to filters. Some descriptions for trivial, obsolete, or very complex filters were left commented out to not clutter a filter list with garbage. * Fix codedef:foo options callout to not be case sensitive. * Sort codedef:foo return lists by label.
* The great filter breakout! * All filters are now CodeDef definitions in code/Filter/*. * Besides plain move from Interpolate.pm, changes made to Filter/* include: * Adding/fixing header/license/cvsid line (all files) * Indenting (where needed) * Lowercasing output html (where needed) * Changes to Interpolate.pm: * Removed whole %Filter = ( ... ) I tested everything with the new eg/pcode script, and tried re-starting Interchange and running few filters on test page. Seems OK.
updated LINUXIA branch to 4.9 sources in order to use it as testbed again
* Add new filter, "next_sequential". Allows selection of a next-sequential value based on a field (and qualified by a field). [filter op="next_sequential.survey_q.sort"][cgi sort][/filter] will: 1. Return the existing value if present. 2. If existing value is blank, return max + 1 in the sort field, i.e. equivalent to: SELECT sort FROM survey_q ORDER BY sort DESC LIMIT 1 If another argument of a field name is passed, i.e. filter => 'next_sequential.survey_q.sort.sel', then you get: SELECT sort FROM survey_q WHERE sel = '[cgi sel]' ORDER BY sort DESC LIMIT 1 This allows a next-sequential numbering for things that need it. Developed to support general-purpose survey UI for Ton's excellent product rating system. * Profile "process_filter" updated to support this -- it had no ability to employ database entries in filters before, which could have been a maddeningly subtle problem with other people's attempts at such things.