Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fix long-undiscovered bug whereby certain LARGE or HUGE tables coul…
…d have large searches embarked upon by hitting return with the cursor in the entry box. Discovered when one administrator developed the habit of going to a user screen then hitting (or holding down) the ENTER Key repeatedly, crashing the catalog. Believe this same phenomenon has caused many mystery crashes over the years. To fix, add mv_form_profile=some_spec to Will consider adding new "mv_form_profile_direct" to Interchange to avoid having to institute a mandatory profile circumlocution for these types of admin functions.
- Loading branch information
Mike Heins
committed
Sep 29, 2016
1 parent
fedd953
commit 4bc69a0
Showing
5 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
CodeDef some_spec OrderCheck 1 | ||
CodeDef some_spec Description Check to see some value is input. Designed for flex_select/mv_like_spec. | ||
CodeDef some_spec Routine <<EOR | ||
sub { | ||
## $ref is to Vend::Session->{'values'} hash | ||
## $var is the passed name of the variable | ||
## $val is the current value of the checked variable | ||
my($ref, $var, $val, $len) = @_; | ||
$len ||= 3; | ||
my @things = split /\0/, $val; | ||
my $found; | ||
|
||
### If reference not defined, don't want to fail this check | ||
unless (defined $ref->{$var} ) { | ||
return (1, $var, '') if $found >= $len; | ||
} | ||
|
||
for(@things) { | ||
$found += length($_); | ||
} | ||
return (1, $var, '') if $found >= $len; | ||
return (undef, $var, | ||
errmsg( "Must input some sort of search -- at least $len characters total") | ||
); | ||
} | ||
EOR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
__NAME__ some_spec | ||
## Used to prevent empty mv_like_spec when present | ||
## Useful for flex-select tag that could conceivably do large checks | ||
&fatal=yes | ||
&fail=admin/error | ||
mv_like_spec=some_spec 2 | ||
__END__ |