Author: kcardineaud Date: 2011-06-30 14:44:14 +0200 (Thu, 30 Jun 2011) New Revision: 150 Url: http://nuiton.org/repositories/revision/scmwebeditor/150 Log: Change some bad value of string Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainAction.java trunk/src/main/resources/struts.xml trunk/src/main/webapp/PrivateSvnRedirect.jsp Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainAction.java =================================================================== --- trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainAction.java 2011-06-30 10:05:45 UTC (rev 149) +++ trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainAction.java 2011-06-30 12:44:14 UTC (rev 150) @@ -192,7 +192,7 @@ request.setAttribute("projectUrl", projectUrl); //Suppression du repertoire temporaire delTempDirectory(svnSess); - return "erreurPath"; + return "errorPath"; } @@ -203,18 +203,18 @@ mineType = getMineType(CheckOutFile); } catch (Exception e) { if(log.isErrorEnabled()) { - log.error("",e); + log.error("Can't get MimeType",e); } } // Si le fichier n'est pas de type texte, on ne peut pas l'éditer - if( !mineType.matches(".*text.*|.*xml.*|.*javascript.*") ) { + if(mineType==null || !mineType.matches(".*text.*|.*xml.*|.*javascript.*") ) { request.setAttribute("projectUrl", projectUrl); //On supprime le repertoire temporaire delTempDirectory(svnSess); - return "erreurPath"; + return "errorPath"; } else { request.setAttribute("minetype", mineType); @@ -244,7 +244,7 @@ */ delTempDirectory(svnSess); request.setAttribute(PARAMETER_SCM_EDITOR_URL, svnSess.getProjectUrl()); - return "erreurPath"; + return "errorPath"; } catch (IOException e) { log.error("Can't find the checkout file",e); } Modified: trunk/src/main/resources/struts.xml =================================================================== --- trunk/src/main/resources/struts.xml 2011-06-30 10:05:45 UTC (rev 149) +++ trunk/src/main/resources/struts.xml 2011-06-30 12:44:14 UTC (rev 150) @@ -8,7 +8,7 @@ <action name="checkout" class="org.nuiton.scmwebeditor.actions.ScmWebEditorMainAction" method="execute"> <result name="noParameter" >/OutConnection.jsp</result> <result name="login" >/PrivateSvnRedirect.jsp</result> - <result name="erreurPath" >/BadFileRedirect.jsp</result> + <result name="errorPath" >/BadFileRedirect.jsp</result> <result name="editPage" >/ModificationViewer.jsp</result> </action> Modified: trunk/src/main/webapp/PrivateSvnRedirect.jsp =================================================================== --- trunk/src/main/webapp/PrivateSvnRedirect.jsp 2011-06-30 10:05:45 UTC (rev 149) +++ trunk/src/main/webapp/PrivateSvnRedirect.jsp 2011-06-30 12:44:14 UTC (rev 150) @@ -23,7 +23,7 @@ TYPE=password NAME=pw SIZE=12></label></p> <input type="submit" value="Submit" name="Save" /> <input type="button" value="Exit" name="Cancel" - onclick="cancelRedirect(this.form.project_url);" /></form> + onclick="cancelRedirect(this.form.projectUrl);" /></form> <p>©2004-2009 CodeLutin</p> </body> </html> \ No newline at end of file