diff options
author | ivan <ivan> | 2003-08-05 20:12:28 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-08-05 20:12:28 +0000 |
commit | 6c6c206041f01df39d1fcb3aee5c9e1dfac24d41 (patch) | |
tree | e57995002ba6ddb1f86a6ba88bf706e771242933 /httemplate/browse/part_pkg.cgi | |
parent | 791463c5192d40eb7fc9683402c3e3d0a883878b (diff) |
fix for "Variable "%num_active_cust_pkg" will not stay shared" error
Diffstat (limited to 'httemplate/browse/part_pkg.cgi')
-rwxr-xr-x | httemplate/browse/part_pkg.cgi | 8 |
1 files changed, 3 insertions, 5 deletions
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}; -} - %> |