Branch: Tag:

2004-09-12

2004-09-12 00:08:47 by Marc Dirix <marc@electronics-design.nl>

Re-established some SiteBuilder code, however instead of #if constant(Sitebuilder):
#ifdef SiteBuilder.

Rev: server/modules/graphics/cimg.pike:1.62
Rev: server/modules/graphics/gbutton.pike:1.108
Rev: server/modules/misc/language2.pike:1.28
Rev: server/pike_modules/LazyImage.pmod/module.pmod:1.19

7:      core.ImageCache the_cache;    - constant cvs_version = "$Id: cimg.pike,v 1.61 2004/06/06 11:03:59 _cvs_stephen Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.62 2004/09/12 00:08:46 _cvs_dirix Exp $";   constant module_type = MODULE_TAG;   constant module_name = "Graphics: Image converter";   constant module_doc = "Provides the tag <tt>&lt;cimg&gt;</tt> that can be used "
180:    layers = core.decode_layers( args->data, opts );    else    { + #ifndef SiteBuilder    mixed tmp = core.load_layers( args->src, id, opts ); -  + #else +  mixed tmp; +  // Let SiteBuilder get a chance to decode its argument data +  if (Sitebuilder.sb_start_use_imagecache) { +  Sitebuilder.sb_start_use_imagecache(args, id); +  tmp = roxen.load_layers(args->src, id, opts); +  Sitebuilder.sb_end_use_imagecache(args, id); +  } else +  { +  tmp = roxen.load_layers(args->src, id, opts); +  } + #endif    if (mappingp(tmp)) {    if (tmp->error == Protocols.HTTP.HTTP_UNAUTH)    return tmp;