Changeset 6137 for trunk

Show
Ignore:
Timestamp:
02/03/12 18:03:45 (4 months ago)
Author:
mtld
Message:

don't track image dependencies without target

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pustefix-core/src/main/java/de/schlund/pfixxml/ImageThemedSrc.java

    r6136 r6137  
    7474        } 
    7575         
    76         String[]        themes    = null; 
     76        boolean dolog = !targetKey.equals("__NONE__"); 
     77        String[] themes = null; 
    7778           
    7879        VirtualTarget target = null; 
     
    120121                res = ResourceUtil.getResource(uri); 
    121122            } 
    122             DependencyTracker.logImage(context, res, parent_part_in, parent_product_in, targetGen, targetKey, "image"); 
     123            if(dolog) { 
     124                DependencyTracker.logImage(context, res, parent_part_in, parent_product_in, targetGen, targetKey, "image"); 
     125            } 
    123126            return src; 
    124127        } else if (isThemedSrc(src, themed_path, themed_img)) { 
     
    151154                String parent_path = IncludeDocumentExtension.getSystemId(context); 
    152155                Resource relativeParent = parent_path.equals("") ? null : ResourceUtil.getResource(parent_path); 
    153                 DependencyTracker.logTyped("image", res, "", "", relativeParent, parent_part_in, parent_product_in, target); 
    154                 //DependencyTracker.logImage(context, testsrc, parent_part_in, parent_product_in, targetGen, targetKey, "image"); 
     156                if(dolog) { 
     157                    DependencyTracker.logTyped("image", res, "", "", relativeParent, parent_part_in, parent_product_in, target); 
     158                } 
    155159            } else { 
    156160             
     
    169173                if (res.exists()) { 
    170174                    LOG.info("    -> Found src '" + testsrc + "'"); 
    171                     DependencyTracker.logImage(context, res, parent_part_in, parent_product_in, targetGen, targetKey, "image"); 
     175                    if(dolog) { 
     176                        DependencyTracker.logImage(context, res, parent_part_in, parent_product_in, targetGen, targetKey, "image"); 
     177                    } 
    172178                    return testsrc; 
    173179                } 
     
    176182                    // "real" missing and "missing, but we found a better version" -- but make sure editor copes with it. 
    177183                    //DependencyTracker.logImage(context, testsrc, parent_part_in, parent_product_in, targetGen, targetKey, "shadow"); 
    178                     DependencyTracker.logImage(context, res, parent_part_in, parent_product_in, targetGen, targetKey, "image"); 
     184                    if(dolog) { 
     185                        DependencyTracker.logImage(context, res, parent_part_in, parent_product_in, targetGen, targetKey, "image"); 
     186                    } 
    179187                    LOG.info("    -> Image src '" + testsrc + "' not found, trying next theme"); 
    180188                } else { 
    181                     DependencyTracker.logImage(context, res, parent_part_in, parent_product_in, targetGen, targetKey, "image"); 
     189                    if(dolog) { 
     190                        DependencyTracker.logImage(context, res, parent_part_in, parent_product_in, targetGen, targetKey, "image"); 
     191                    } 
    182192                    LOG.warn("    -> No themed image found!"); 
    183193                }