Branch: Tag:

2000-06-01

2000-06-01 15:04:47 by Martin Nilsson <mani@lysator.liu.se>

Added the documentation method to the image cache

Rev: server/base_server/roxen.pike:1.489

4:   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.      // ABS and suicide systems contributed freely by Francesco Chemolli - constant cvs_version="$Id: roxen.pike,v 1.488 2000/06/01 12:54:10 nilsson Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.489 2000/06/01 15:04:47 nilsson Exp $";      // Used when running threaded to find out which thread is the backend thread,   // for debug purposes only.
2068:    mapping data_cache = ([]); // not normally used.    mapping meta_cache = ([]);    +  string documentation(void|string tag_n_args) { +  Stdio.File doc_file; +  if(!(doc_file=Stdio.File("base_server/image_cache.xml"))) return ""; +  string doc=doc_file->read(); +  if(!tag_n_args) +  return Parser.HTML()->add_container("ex", "")->feed(doc)->read(); +  return replace(doc, "###", tag_n_args); +  }       static mapping meta_cache_insert( string i, mapping what )    {