Roxen.git / server / etc / modules / Variable.pmod / Schedule.pike

version» Context lines:

Roxen.git/server/etc/modules/Variable.pmod/Schedule.pike:117:    if( !vals[0] )    return -1;       // Every n:th hour.    if( vals[0] == 1 )    if( !last )    return time(1);    else    return last + 3600 * vals[1];    -  // Every n:th day at x. +     mapping m = localtime( last || time(1) );    m->min = m->sec = 0;    if( !vals[3] ) { -  // Every day at x. +  // Every n:th day at x. +  if (!last) +  {    for(int i; i<vals[2]; i++)    m = next_or_same_time( m, vals[4] );    return mktime(m);    } -  +  else +  {    for(int i; i<vals[2]; i++) -  +  m = next_time( m, vals[4] ); +  return mktime(m); +  } +  } +  +  // Every x-day at y. +  if (!last)    { -  +  for(int i; i<vals[2]; i++) +  { +  m = next_or_same_time( next_or_same_day( m, vals[3]-1, vals[4]+1 ), +  vals[4], 6*24*3600 ); +  } +  } +  else +  { +  for(int i; i<vals[2]; i++) +  {    m = next_or_same_time( next_or_same_day( m, vals[3]-1, vals[4] ),    vals[4], 6*24*3600 );    } -  +  }    return mktime(m);   }      string render_form( RequestID id, void|mapping additional_args )   {    string res, inp1, inp2, inp3;       res = "<table>"    "<tr valign='top'><td><input name='" + path() + "' value='0' type='radio' " +    checked(0,0) + " /></td><td>" + LOCALE(482, "Never") + "</td></tr>\n";