Branch: Tag:

2000-09-19

2000-09-19 14:58:29 by Per Hedbor <ph@opera.com>

Less sensitive to errors in the argument cache (as an example: Relaying another site with different gtext images)

Rev: server/modules/graphics/graphic_text.pike:1.246

1:   // This is a roxen module. Copyright © 1996 - 2000, Roxen IS.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.245 2000/09/19 14:21:32 kuntri Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.246 2000/09/19 14:58:29 per Exp $";      #include <module.h>   inherit "module";
538:    id = (object)text;    text = args->text;    } -  +  if( !mappingp( args ) || !stringp( text )) +  // errors in the argument cache. Not all that unsusual when using the +  // relay module. +  return 0;    if(!args->verbatim) // typographically correct...    {    text = replace(text, nbsp, " ");
668:      mapping find_internal(string f, RequestID id)   { +  catch +  {    if( strlen(f)>4 && query("ext") && f[-4]=='.') // Remove .ext    f = f[..strlen(f)-5];    if( strlen(f) && f[0]=='$' )
680:    }    }    return image_cache->http_file_answer( f, id ); +  }; +  return 0;   }