From bbrossaud@users.chorem.org Thu Jul 15 11:14:24 2010 From: bbrossaud@users.chorem.org To: bow-commits@list.chorem.org Subject: [Bow-commits] r84 - in trunk/src/main: java/org/chorem/bow webapp Date: Thu, 15 Jul 2010 11:14:24 +0200 Message-ID: <20100715091424.AF1EE1591F@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7306036404942999548==" --===============7306036404942999548== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: bbrossaud Date: 2010-07-15 11:14:24 +0200 (Thu, 15 Jul 2010) New Revision: 84 Url: http://chorem.org/repositories/revision/bow/84 Log: moved regenerate token in preferences page Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java trunk/src/main/webapp/bookmarkHome.jsp trunk/src/main/webapp/bookmarkSearch.jsp trunk/src/main/webapp/preferences.jsp Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-07-15 08:4= 3:11 UTC (rev 83) +++ trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-07-15 09:1= 4:24 UTC (rev 84) @@ -163,6 +163,7 @@ log.debug("Going to actionGenerateToken"); } this.actionGenerateToken(request, response, user, sessio= n); + request.getRequestDispatcher("preferences.jsp").forward(= request, response); } else if (action.equals("deleteTag") && user !=3D null) { if (log.isDebugEnabled()) { log.debug("Going to actionDeleteTag"); @@ -492,7 +493,6 @@ tokenActions.setPermanentToken(""); } } - redirectToTheGoodPage(request, response); } =20 protected void actionModifyBookmark(HttpServletRequest request, HttpServ= letResponse response, User user) @@ -1025,11 +1025,11 @@ } } } - proxy.store(newUser); + newUser =3D proxy.store(newUser); + session.setAttribute("user", newUser); =20 - session.setAttribute("user", newUser); preference =3D proxy.restore(Preference.class, newUser.getWikittyId(= )); - request.setAttribute("preference", preference); + session.setAttribute("preference", preference); } =20 protected void sendMail(String email, String password) Modified: trunk/src/main/webapp/bookmarkHome.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/src/main/webapp/bookmarkHome.jsp 2010-07-15 08:43:11 UTC (rev 83) +++ trunk/src/main/webapp/bookmarkHome.jsp 2010-07-15 09:14:24 UTC (rev 84) @@ -129,7 +129,6 @@
  • Preferences=
  • bow?acti= on=3DaddUrl&token=3D<%=3DtemporaryToken%>&url=3D'+encodeURIComponent(url)+'&n= ameAndTags=3D'+encodeURIComponent(nameAndTags);var%20script=3Ddocument.create= Element('script');script.src=3Dlink;script.type=3D'text/javascript';document.= body.appendChild(script);}void(0);">Temporary token
  • bow?acti= on=3DaddUrl&token=3D<%=3DpermanentToken%>&url=3D'+encodeURIComponent(url)+'&n= ameAndTags=3D'+encodeURIComponent(nameAndTags);var%20script=3Ddocument.create= Element('script');script.src=3Dlink;script.type=3D'text/javascript';document.= body.appendChild(script);}void(0);">Current permanent token
  • -
  • Regenerate pe= rmanent token
  • Modified: trunk/src/main/webapp/bookmarkSearch.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/src/main/webapp/bookmarkSearch.jsp 2010-07-15 08:43:11 UTC (rev 83) +++ trunk/src/main/webapp/bookmarkSearch.jsp 2010-07-15 09:14:24 UTC (rev 84) @@ -111,7 +111,6 @@
  • Preferences=
  • bow?action=3DaddUrl&token=3D<%=3DtemporaryToken%>&u= rl=3D'+encodeURIComponent(url)+'&nameAndTags=3D'+encodeURIComponent(nameAndTa= gs);var%20script=3Ddocument.createElement('script');script.src=3Dlink;script.= type=3D'text/javascript';document.body.appendChild(script);void(0);">Temporar= y token
  • bow?action=3DaddUrl&token=3D<%=3DpermanentToken%>&u= rl=3D'+encodeURIComponent(url)+'&nameAndTags=3D'+encodeURIComponent(nameAndTa= gs);var%20script=3Ddocument.createElement('script');script.src=3Dlink;script.= type=3D'text/javascript';document.body.appendChild(script);void(0);">Current = permanent token
  • -
  • &fullTextLine=3D<%=3DfullText%>">Regenerate permanent token