simple protection against selecting and using package add-ons that point to the same...
[freeside.git] / FS / FS / part_pkg.pm
index ec88e1b..130bd86 100644 (file)
@@ -907,6 +907,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=>'!=', $self->pkgpart },
                         },
             order_by => "ORDER BY hidden",
          });