Branch: Tag:

2000-07-05

2000-07-05 12:37:22 by Per Hedbor <ph@opera.com>

Do the stat like the load() is done, that is, try to check for normal files as well as files in roxen. Also, only store the MTIME component, to save space in the cache

Rev: server/modules/graphics/cimg.pike:1.21

7:      roxen.ImageCache the_cache;    - constant cvs_version = "$Id: cimg.pike,v 1.20 2000/06/03 04:10:30 nilsson Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.21 2000/07/05 12:37:22 per Exp $";   constant module_type = MODULE_PARSER;   constant module_name = "Image converter";   constant module_doc = "Provides the tag <tt>&lt;cimg&gt;</tt> that can be used "
120:    "data":args->data,    ]);    -  a->stat = id->conf->stat_file( a->src,id ); +  if( a->src ) +  catch +  { +  a->stat = (id->conf->stat_file( a->src,id ) || +  file_stat( a->src ))[ ST_MTIME ]; +  };    -  a["background-color"] = id->misc->defines->bgcolor -  || "#eeeeee"; +  a["background-color"] = id->misc->defines->bgcolor || "#eeeeee";       foreach( glob( "*-*", indices(args)), string n )    a[n] = args[n];