Roxen.git / server / config_interface / actions / change_version.pike

version» Context lines:

Roxen.git/server/config_interface/actions/change_version.pike:16:   {    int cannot_change_back;    string file( string fn )    {    return Stdio.read_bytes( "../"+dir+"/"+fn );    }       Calendar.Day get_date_from_cvsid( string data )    {    string q; -  if( !sscanf( data, "%*s$Id: %*s,v %s\n", q ) ) +  if (sscanf( data, "%*s$Id: %*s,v %s\n", q ) < 3)    return 0;    return Calendar.dwim_day( (q/" ")[1] );    }       Calendar.Day reldate()    { -  +  return 0; +     Calendar.Day d2, d = get_date_from_cvsid( version_h );    if( !d )    {    d=get_date_from_cvsid( file( "base_server/roxen.pike" )||"" );       foreach( ({"base_server/roxen.pike",    "base_server/configuration.pike",    "base_server/roxenloader.pike",    "start",    "base_server/module.pike" }),
Roxen.git/server/config_interface/actions/change_version.pike:74:    if( a && b )    res += ({ Server( f, a+"."+b,s ) });    };    }    }    return res;   }      string nice_relative_date( object t )   { +  if (!t) +  return "n/a";    if( t->how_many( Calendar.Month() ) )    if( t->how_many( Calendar.Month() ) == 1 )    return sprintf( (string)_(43,"1 month") );    else    return sprintf( (string)_(44,"%d months"),    t->how_many( Calendar.Month() ) );    if( t->how_many( Calendar.Day() ) == 1 ) return (string)_(139,"one day");       if( t->how_many( Calendar.Day() ) == 0 ) return "-";    return sprintf( (string)_(45,"%d days"),
Roxen.git/server/config_interface/actions/change_version.pike:133:    foreach( available_versions(), Server f )    {    res += "<tr><td>";    if( f->version != roxen.roxen_ver+"."+roxen.roxen_build )    res += "<input type='radio' name='server' value='"+f->dir+"' /> ";    else    res += "";    res += "</td>";       Calendar.Day d = f->reldate(); -  Calendar.Day diff = d->distance( Calendar.now() ); +  Calendar.Day diff = d && d->distance( Calendar.now() );       warn += f->cannot_change_back;    res +=    "<td>"+f->version+"</td>"    "<td>"+(f->cannot_change_back?"<img alt='#' src='&usr.err-2;' />":"")+    "</td>"    "<td></td>" -  "<td>"+(d->set_language( roxen.get_locale()+"_UNICODE" ) -  ->format_ext_ymd())+ +  "<td>"+(d ? d->set_language( roxen.get_locale()+"_UNICODE" ) +  ->format_ext_ymd() : "n/a")+    "</td>"    "<td></td>"    "<td>"+nice_relative_date( diff )+"</td>"    "<td></td>"    "<td>"+f->dir+"</td></tr>\n";    }    res +=    "</table>\n"    "</box-frame>\n"    "<br clear='all'/>\n"
Roxen.git/server/config_interface/actions/change_version.pike:181:    res += "<table><tr><td valign='top'>"    "<img src='&usr.err-2;' alt='#' /></td>\n"    "<td>"+    _(154,"Note that you will have to start the new server manually because "    "you may have to answer a few questions for the new environment file.")+    "</td>\n"    "</tr></table>\n"    "<br clear='all'/>\n"    "<br />";    -  res += "<submit-gbutton>"+_(138,"Change version")+"</submit-gbutton> " -  "<cf-cancel href='./?class="+action+"'/>"; +  res += "<submit-gbutton align='middle'>"+_(138,"Change version")+"</submit-gbutton> " +  "<cf-cancel href='./?class="+action+"&amp;&usr.set-wiz-id;'/>";       return res;   }