From 6c6c206041f01df39d1fcb3aee5c9e1dfac24d41 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 5 Aug 2003 20:12:28 +0000 Subject: fix for "Variable "%num_active_cust_pkg" will not stay shared" error --- httemplate/browse/part_pkg.cgi | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'httemplate') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 7b9436cee..4b9197e0e 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -24,7 +24,9 @@ if ( $cgi->param('active') ) { $num_active_cust_pkg{$part_pkg->pkgpart} = $active_sth->fetchrow_arrayref->[0]; } - $sortby = \*active_cust_pkg_sort; + $sortby = sub { + $num_active_cust_pkg{$b->pkgpart} <=> $num_active_cust_pkg{$a->pkgpart}; + }; } else { $sortby = \*pkgpart_sort; } @@ -137,8 +139,4 @@ sub pkgpart_sort { $a->pkgpart <=> $b->pkgpart; } -sub active_cust_pkg_sort { - $num_active_cust_pkg{$b->pkgpart} <=> $num_active_cust_pkg{$a->pkgpart}; -} - %> -- cgit v1.2.1