Index: trunk/ippTools/share/disttool_pending_fake.sql
===================================================================
--- trunk/ippTools/share/disttool_pending_fake.sql	(revision 27458)
+++ trunk/ippTools/share/disttool_pending_fake.sql	(revision 30387)
@@ -15,5 +15,6 @@
     0 as quality,
     distRun.no_magic,
-    0 as magicked
+    0 as magicked,
+    IFNULL(Label.priority, 10000) AS priority
 FROM distRun
 JOIN distTarget USING(target_id, stage, clean)
@@ -26,6 +27,8 @@
     ON distRun.dist_id = distComponent.dist_id 
     AND fakeProcessedImfile.class_id = distComponent.component
+LEFT JOIN Label ON distRun.label = Label.label
 WHERE
     distRun.state = 'new'
     AND distRun.stage = 'fake'
     AND distComponent.dist_id IS NULL
+    AND (Label.active OR Label.active IS NULL)
