[interchange-cvs] interchange - heins modified dist/lib/UI/pages/admin/layout_auto.html
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Wed Oct 31 14:01:01 2001
User: heins
Date: 2001-10-31 19:00:55 GMT
Modified: dist/lib/UI/pages/admin layout_auto.html
Log:
* Fix cat_type->narrow collation problem found by Simon B.
<music@labyrinth.net.au>. Doesn't apply to stable branch
unless we want to add it.
Revision Changes Path
2.2 +4 -1 interchange/dist/lib/UI/pages/admin/layout_auto.html
rev 2.2, prev_rev 2.1
Index: layout_auto.html
===================================================================
RCS file: /anon_cvs/repository/interchange/dist/lib/UI/pages/admin/layout_auto.html,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -r2.1 -r2.2
--- layout_auto.html 2001/09/21 16:51:11 2.1
+++ layout_auto.html 2001/10/31 19:00:55 2.2
@@ -193,6 +193,7 @@
display_type => 'name',
);
my %catmap;
+ my $narrow;
my $lt;
my $search_code;
if($CGI->{cat_type} eq 'simple') {
@@ -201,6 +202,7 @@
$search_code = '';
}
elsif($CGI->{cat_type} eq 'narrow') {
+ $narrow = 1;
$lt = 'simple';
$selector = <<EOF;
category=~CATEGORY~
@@ -255,7 +257,8 @@
foreach my $row (@$ary) {
my $area = $row->[$fh->{$acol}];
my $cat = $row->[$fh->{$ccol}];
- next if $catdone{$cat}++;
+ my $donetag = $narrow ? "$area:$cat" : $cat;
+ next if $catdone{$donetag}++;
my $key = $cdb->set_row('');
return "no cat autonumbering available" if ! $key;