[freeside-commits] freeside/httemplate/edit part_pkg.cgi, 1.111, 1.111.2.1
Ivan,,,
ivan at wavetail.420.am
Wed Nov 25 11:58:52 PST 2009
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv10070
Modified Files:
Tag: FREESIDE_1_9_BRANCH
part_pkg.cgi
Log Message:
don't consider disabled report classes, don't load up the whole table just to see if there are any
Index: part_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/part_pkg.cgi,v
retrieving revision 1.111
retrieving revision 1.111.2.1
diff -u -d -r1.111 -r1.111.2.1
--- part_pkg.cgi 20 Jul 2009 14:26:12 -0000 1.111
+++ part_pkg.cgi 25 Nov 2009 19:58:50 -0000 1.111.2.1
@@ -239,6 +239,11 @@
my $disabled_type = $acl_edit_either ? 'checkbox' : 'hidden';
+#arg. access rights for cloning are Hard.
+# on the one hand we don't really want cloning (customizing a package) to fail
+# for want of finding the source package in normal usage
+# on the other hand, we don't want people using the clone link to be able to
+# see
my $agent_clone_extra_sql =
' ( '. FS::part_pkg->curuser_pkgs_sql.
" OR ( part_pkg.custom = 'Y' ) ".
@@ -246,7 +251,12 @@
my $conf = new FS::Conf;
my $taxproducts = $conf->exists('enable_taxproducts');
-my $census = scalar( qsearch( 'part_pkg_report_option', {} ) );
+
+my $sth = dbh->prepare("SELECT COUNT(*) FROM part_pkg_report_option".
+ " WHERE disabled IS NULL OR disabled = '' ")
+ or die dbh->errstr;
+$sth->execute or die $sth->errstr;
+my $census = $sth->fetchrow_arrayref->[0];
#XXX
# - tr-part_pkg_freq: month_increments_only (from price plans)
More information about the freeside-commits
mailing list