Branch: Tag:

2009-11-26

2009-11-26 15:12:34 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Now uses Roxen.timeout_dequantifier() to calculate the timeouts.

Rev: server/modules/graphics/atlas.pike:1.20
Rev: server/modules/graphics/business.pike:1.155
Rev: server/modules/graphics/cimg.pike:1.84
Rev: server/modules/graphics/gbutton.pike:1.121
Rev: server/modules/graphics/graphic_text.pike:1.309
Rev: server/modules/graphics/gxml.pike:1.48

7:      roxen.ImageCache the_cache;    - constant cvs_version = "$Id: cimg.pike,v 1.83 2009/11/24 15:17:33 grubba Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.84 2009/11/26 15:12:33 grubba 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 "
380:    mapping a = get_my_args( check_args( args ), id );    string data;    -  int timeout = UNDEFINED; -  if (args["unix-time"]) { -  timeout = (int)args["unix-time"] - time(1); -  } -  timeout = Roxen.time_dequantifier(args, timeout); -  if (!zero_type(timeout)) { -  // Clean up the args mapping. -  foreach(({ "unix-time", "seconds", "minutes", "beats", "hours", -  "days", "weeks", "months", "years" }), string arg) { -  m_delete(args, arg); -  } -  // Make sure the timeout is positive (and reasonable). -  if (timeout < 60) timeout = 60; -  } +  int timeout = Roxen.timeout_dequantifier(args);       mixed err = catch // This code will fail if the image does not exist.    {
444:       array do_return(RequestID id)    { -  int timeout = UNDEFINED; -  if (args["unix-time"]) { -  timeout = (int)args["unix-time"] - time(1); -  } -  timeout = Roxen.time_dequantifier(args, timeout); -  if (!zero_type(timeout)) { -  // Clean up the args mapping. -  foreach(({ "unix-time", "seconds", "minutes", "beats", "hours", -  "days", "weeks", "months", "years" }), string arg) { -  m_delete(args, arg); -  } -  // Make sure the timeout is positive (and reasonable). -  if (timeout < 60) timeout = 60; -  } +  int timeout = Roxen.timeout_dequantifier(args);    mapping a = get_my_args( check_args( args ), id );    args -= a;    string ext = "";
496:       array do_return(RequestID id)    { -  int timeout = UNDEFINED; -  if (args["unix-time"]) { -  timeout = (int)args["unix-time"] - time(1); -  } -  timeout = Roxen.time_dequantifier(args, timeout); -  if (!zero_type(timeout)) { -  // Clean up the args mapping. -  foreach(({ "unix-time", "seconds", "minutes", "beats", "hours", -  "days", "weeks", "months", "years" }), string arg) { -  m_delete(args, arg); -  } -  // Make sure the timeout is positive (and reasonable). -  if (timeout < 60) timeout = 60; -  } +  int timeout = Roxen.timeout_dequantifier(args);    string filename = "";    mapping a = get_my_args (check_args (args), id);