Changeset 2999


Ignore:
Timestamp:
Dec 4, 2006, 12:56:59 PM (16 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #453: End date is not allowed to be empty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/admin/news/index.jsp

    r2978 r2999  
    132132    News news = (News)cc.getObject("item");
    133133    Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
    134     Date startDate = dateFormatter.parseString(request.getParameter("start_date"));
    135     Date newsDate = dateFormatter.parseString(request.getParameter("news_date"));
     134    Date startDate = dateFormatter.parseString(Values.getStringOrNull(request.getParameter("start_date")));
     135    Date newsDate = dateFormatter.parseString(Values.getStringOrNull(request.getParameter("news_date")));
    136136    if (news == null)
    137137    {
     
    148148    }
    149149    news.setName(Values.getStringOrNull(request.getParameter("title")));
    150     news.setEndDate(dateFormatter.parseString(request.getParameter("end_date")));
     150    news.setEndDate(dateFormatter.parseString(Values.getStringOrNull(request.getParameter("end_date"))));
    151151    news.setDescription(Values.getStringOrNull(request.getParameter("description")));
    152152    dc.commit();
Note: See TracChangeset for help on using the changeset viewer.