
slanning at bricolage
Apr 30, 2008, 6:17 AM
Post #1 of 1
(93 views)
Permalink
|
Revision: 8209 Author: slanning Date: 2008-04-30 06:17:30 -0700 (Wed, 30 Apr 2008) ViewCVS: http://viewsvn.bricolage.cc/?rev=8209&view=rev Log Message: ----------- Fix for bug 1232. (can't edit categories with 3 keywords) There was a fix in place in 1.10.3, but it turns out that doesn't work. This isn't an ideal fix, but it does work and requires a sort of minimal change to the code. A better fix would require looking deeper into whatever add_more.mc does. Bugzilla Links: -------------- http://bugs.bricolage.cc/show_bug.cgi?id=1232 Modified Paths: -------------- bricolage/branches/rev_1_10/comp/admin/profile/category/edit.html bricolage/branches/rev_1_10/lib/Bric/Changes.pod Modified: bricolage/branches/rev_1_10/comp/admin/profile/category/edit.html =================================================================== --- bricolage/branches/rev_1_10/comp/admin/profile/category/edit.html 2008-04-30 13:07:15 UTC (rev 8208) +++ bricolage/branches/rev_1_10/comp/admin/profile/category/edit.html 2008-04-30 13:17:30 UTC (rev 8209) @@ -73,14 +73,14 @@ my $kws = $cat->get_keywords; # This prevents an alert demanding you fill in the required 'Name' my $meths = get_package_name('keyword')->my_meths; -my $meths_copy = { %$meths }; # avoids modifying the original $METHS -$meths_copy->{name} = { %{ $meths_copy->{name} } }; -$meths_copy->{name}{req} = 0; +my $orig_req = $meths->{name}{req}; # save for restore after next call +$meths->{name}{req} = 0; $m->comp('/widgets/add_more/add_more.mc', type => 'keyword', param => \%ARGS, fields => [qw(keyword)], name => 'keyword', deleteLabelOnly => 1, reset_key => $reset, objs => $kws, incr => 4, no_edit => [qw(keyword)], - num => @$kws >= 4 ? @$kws + 2 : 4, read_only => $no_edit, meths => $meths_copy, + num => @$kws >= 4 ? @$kws + 2 : 4, read_only => $no_edit, meths => $meths, formName => 'cat_profile'); +$meths->{name}{req} = $orig_req; # restore original value $m->comp("/widgets/wrappers/sharky/table_bottom.mc"); # Output the ad strings. Modified: bricolage/branches/rev_1_10/lib/Bric/Changes.pod =================================================================== --- bricolage/branches/rev_1_10/lib/Bric/Changes.pod 2008-04-30 13:07:15 UTC (rev 8208) +++ bricolage/branches/rev_1_10/lib/Bric/Changes.pod 2008-04-30 13:17:30 UTC (rev 8209) @@ -22,6 +22,11 @@ =over +=item * + +Really fix bug 1232 (saving categories with 3 keywords), that was falsely claimed +to have been fixed in 1.10.3. [Scott] + =back =head1 VERSION 1.10.5 (2008-04-29) @@ -726,7 +731,7 @@ =item * -Fixed an apparently old bug with editing keywords in the Category Profile, +Fixed an apparently old bug (1232) with editing keywords in the Category Profile, where you couldn't Save if there were exactly 3 keywords. [Scott] =item *
|