X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg.pm;h=a073cf2c923264cfa75df0480b68a2b132377608;hb=4ad8b72c0dde10d4907298277181ddfaa99dafb6;hp=b267a62f4196a8e5bd760c4b1ca4704cdb25a66f;hpb=5250c44bd7f282c7d782bf0e8349af12376929df;p=freeside.git diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index b267a62f4..a073cf2c9 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -823,7 +823,7 @@ argument. sub add_freq { my( $self, $date, $freq ) = @_; - $freq = $self->freq if !defined($freq); + $freq = $self->freq unless $freq; #change this bit to use Date::Manip? CAREFUL with timezones (see # mailing list archive) @@ -941,6 +941,8 @@ sub _part_pkg_link { qsearch({ table => 'part_pkg_link', hashref => { 'src_pkgpart' => $self->pkgpart, 'link_type' => $type, + #protection against infinite recursive links + 'dst_pkgpart' => { op=>'!=', value=> $self->pkgpart }, }, order_by => "ORDER BY hidden", });