summaryrefslogtreecommitdiff
path: root/FS/FS/part_pkg.pm
diff options
context:
space:
mode:
authorivan <ivan>2010-10-10 20:52:37 +0000
committerivan <ivan>2010-10-10 20:52:37 +0000
commit7430f21fafadacc4e28078f0273b5e3aeb131800 (patch)
tree314b8194fb73ada145c26c247dddc2756a41e8f7 /FS/FS/part_pkg.pm
parentdefa6c82c0fbc69b06c97d229caad39248a01c1c (diff)
simple protection against selecting and using package add-ons that point to the same package. (still need to detect and break more complex self-referential loops)
Diffstat (limited to 'FS/FS/part_pkg.pm')
-rw-r--r--FS/FS/part_pkg.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm
index 85269c5a6..d3534fbc7 100644
--- a/FS/FS/part_pkg.pm
+++ b/FS/FS/part_pkg.pm
@@ -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=>'!=', $self->pkgpart },
},
order_by => "ORDER BY hidden",
});