/[projects]/android/TrainInfoService/src/dk/thoerup/traininfoservice/RequestPlotter.java
ViewVC logotype

Diff of /android/TrainInfoService/src/dk/thoerup/traininfoservice/RequestPlotter.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1312 by torben, Tue Apr 19 16:39:07 2011 UTC revision 1313 by torben, Tue Apr 19 16:46:39 2011 UTC
# Line 368  public class RequestPlotter extends Http Line 368  public class RequestPlotter extends Http
368                  return (p != 0);                  return (p != 0);
369          }          }
370    
371            int getCount(String param) {
372                    if (param == null || param.equals("")) {
373                            return 1;
374                    }
375                                    
376                    return Integer.parseInt(param);
377            }
378    
379            
380          @Override          @Override
381          protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {          protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
382                                    
383                                    
384                  int count = Integer.parseInt( req.getParameter("count") );                  int count = getCount( req.getParameter("count") );
385                                    
386                  if (count > 30) //limit to 30 days                  if (count > 30) //limit to 30 days
387                          count = 30;                          count = 30;

Legend:
Removed from v.1312  
changed lines
  Added in v.1313

  ViewVC Help
Powered by ViewVC 1.1.20